OSDN Git Service

scm: add the feature of SCM command availability automatic check in administration...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 4 May 2011 07:49:02 +0000 (07:49 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 4 May 2011 07:49:02 +0000 (07:49 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5632 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/projects/settings/_repository.rhtml
config/locales/en.yml

index 8646268..113930b 100644 (file)
@@ -8,10 +8,16 @@
 <div class="box tabular">
 <p>
 <%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %>
+<% if @repository %>
+<br />
+<%= 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 %>
 </p>
 <% button_disabled = true %>
 <% if @repository %>
-<%   button_disabled = false %>
+<%   button_disabled = ! @repository.class.scm_available %>
 <%=    repository_field_tags(f, @repository)%>
 <% end %>
 </div>
index f441b5b..57036f6 100644 (file)
@@ -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