From 84b5a6e7b5e0ea4dd21e50bc05729658cead27fe Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 4 May 2011 07:49:02 +0000 Subject: [PATCH] scm: add the feature of SCM command availability automatic check in administration panel (#4273). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5632 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/projects/settings/_repository.rhtml | 8 +++++++- config/locales/en.yml | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/views/projects/settings/_repository.rhtml b/app/views/projects/settings/_repository.rhtml index 864626809..113930b8b 100644 --- a/app/views/projects/settings/_repository.rhtml +++ b/app/views/projects/settings/_repository.rhtml @@ -8,10 +8,16 @@

<%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %> +<% if @repository %> +
+<%= image_tag((@repository.class.scm_available ? 'true.png' : 'exclamation.png'))%> +<%= l(:text_scm_command) -%>: <%= @repository.class.scm_command -%>, +<%= l(:text_scm_version) -%>: <%= @repository.class.scm_version_string %> +<% end %>

<% button_disabled = true %> <% if @repository %> -<% button_disabled = false %> +<% button_disabled = ! @repository.class.scm_available %> <%= repository_field_tags(f, @repository)%> <% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index f441b5bcd..57036f6ad 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -943,6 +943,8 @@ en: text_scm_path_encoding_note: "Default: UTF-8" text_git_repository_note: "Bare and local repository (e.g. /gitrepo, c:\gitrepo)" text_mercurial_repository_note: "Local repository (e.g. /hgrepo, c:\hgrepo)" + text_scm_command: Command + text_scm_version: Version default_role_manager: Manager default_role_developer: Developer -- 2.39.5