]> source.dussan.org Git - redmine.git/commitdiff
scm: show scm commands and versions on administration panel (#4273).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 29 May 2011 10:54:45 +0000 (10:54 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 29 May 2011 10:54:45 +0000 (10:54 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5952 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/settings/_repositories.rhtml
config/locales/en.yml
public/stylesheets/application.css

index 97af65cd9d3ee26cd3a67d4a3b90f0709e8f0fa2..4406d2c2ad83c46a056eb3e946eef20faa719904 100644 (file)
@@ -1,5 +1,53 @@
 <% form_tag({:action => 'edit', :tab => 'repositories'}) do %>
 
+<fieldset class="box tabular settings enabled_scm">
+<legend><%= l(:setting_enabled_scm) %></legend>
+<table>
+  <tr>
+    <th></th>
+    <th></th>
+    <th></th>
+    <th><%= l(:text_scm_command)         %></th>
+    <th><%= l(:text_scm_command_version) %></th>
+  </tr>
+  <% Redmine::Scm::Base.all.collect do |choice| %>
+    <% scm_class = "Repository::#{choice}".constantize %>
+    <% text, value = (choice.is_a?(Array) ? choice : [choice, choice]) %>
+    <% setting = :enabled_scm %>
+    <tr>
+      <td>
+        <%= 
+          check_box_tag(
+              "settings[#{setting}][]",
+               value,
+               Setting.send(setting).include?(value))
+         %>
+      </td>
+      <td class="scm_name">
+        <%= text.to_s %>
+      </td>
+      <td>
+         <%=
+           image_tag(
+              (scm_class.scm_available ? 'true.png' : 'exclamation.png'),
+              :style => "vertical-align:bottom;"
+           )
+           %>
+       </td>
+       <td>
+          <%= scm_class.scm_command %>
+       </td>
+       <td>
+          <%= scm_class.scm_version_string %>
+       </td>
+     </tr>
+  <% end %>
+</table>
+<p class="scm_config">
+<%= l(:text_scm_config) %>
+</p>
+</fieldset>
+
 <div class="box tabular settings">
 <p><%= setting_check_box :autofetch_changesets %></p>
 
@@ -16,8 +64,6 @@
                        "if ($('settings_sys_api_key').disabled == false) { $('settings_sys_api_key').value = randomKey(20) }" %>
 </p>
 
-<p><%= setting_multiselect(:enabled_scm, Redmine::Scm::Base.all) %></p>
-
 <p><%= setting_text_field :repositories_encodings, :size => 60 %><br />
 <em><%= l(:text_comma_separated) %></em></p>
 
index 40d66093e3147499e67db58f777e924674a5e57c..64587aaae26e8a077b57323f51c447976668837b 100644 (file)
@@ -867,17 +867,17 @@ en:
   button_quote: Quote
   button_duplicate: Duplicate
   button_show: Show
-  
+
   status_active: active
   status_registered: registered
   status_locked: locked
-  
+
   version_status_open: open
   version_status_locked: locked
   version_status_closed: closed
 
   field_active: Active
-  
+
   text_select_mail_notifications: Select actions for which email notifications should be sent.
   text_regexp_info: eg. ^[A-Z0-9]+$
   text_min_max_length_info: 0 means no restriction
@@ -946,6 +946,7 @@ en:
   text_mercurial_repository_note: "Local repository (e.g. /hgrepo, c:\hgrepo)"
   text_scm_command: Command
   text_scm_command_version: Version
+  text_scm_config: You can configure your scm commands in config/configuration.yml. Please restart the application after editing it.
 
   default_role_manager: Manager
   default_role_developer: Developer
index 47eb839c8799d1b1c1be0fe83b032af99d3660c4..0b6cc755e1c41f6a250b6b56735a9497d068ef1d 100644 (file)
@@ -434,6 +434,9 @@ input#time_entry_comments { width: 90%;}
 .tabular.settings label{ margin-left: -300px; width: 295px; }
 .tabular.settings textarea { width: 99%; }
 
+.tabular.settings.enabled_scm td.scm_name{ font-weight: bold; }
+.tabular.settings.enabled_scm p.scm_config{ padding-left: 8px; }
+
 fieldset.settings label { display: block; }
 fieldset#notified_events .parent { padding-left: 20px; }