# HG changeset patch
# Parent 51fb8ed7ba214f55c6723cdb98107f54d304cdf1
# User Toshi MARUYAMA
[mq]: scm-info-view.diff

diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -82,5 +82,13 @@ class AdminController < ApplicationContr
       [:text_plugin_assets_writable, File.writable?(Engines.public_directory)],
       [:text_rmagick_available, Object.const_defined?(:Magick)]
     ]
-  end  
+    @scm_info = []
+    Redmine::Scm::Base.all.each do |scm|
+      scm_class = "Repository::#{scm}".constantize
+      @scm_info << {:name             => scm_class.scm_name,
+                    :command          => scm_class.scm_command,
+                    :version_string   => scm_class.scm_version_string,
+                    :available        => scm_class.scm_available}
+    end
+  end
 end
diff --git a/app/views/admin/info.rhtml b/app/views/admin/info.rhtml
--- a/app/views/admin/info.rhtml
+++ b/app/views/admin/info.rhtml
@@ -11,4 +11,28 @@
 <% end %>
 </table>
 
+<h3><%=l(:label_scm)%></h3>
+
+<table class="list">
+	<thead>
+		<tr>
+			<th><%=l(:label_scm_name)%></th>
+			<th><%=l(:label_scm_command)%></th>
+			<th><%=l(:label_version)%></th>
+			<th></th>
+		</tr>
+	</thead>
+	<tbody>
+		<% @scm_info.each do |scm| %>
+			<tr class="<%= cycle 'odd', 'even' %>">
+				<td><%= scm[:name] %></td>
+				<td><%= scm[:command] %></td>
+				<td><%= scm[:version_string] %></td>
+				<td><%= image_tag((scm[:available] ? 'true.png' : 'exclamation.png'),
+							:style => "vertical-align:bottom;") %></td>
+			</tr>
+		<% end %>
+	</tbody>
+</table>
+
 <% html_title(l(:label_information_plural)) -%>
diff --git a/config/locales/en.yml b/config/locales/en.yml
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -793,6 +793,8 @@ en:
   label_project_copy_notifications: Send email notifications during the project copy
   label_principal_search: "Search for user or group:"
   label_user_search: "Search for user:"
+  label_scm_name: Name
+  label_scm_command: Command
   
   button_login: Login
   button_submit: Submit
