##// END OF EJS Templates
Add labels on SCMs....
Jean-Philippe Lang -
r9943:7a4c6d2a1995
parent child
Show More
@@ -1,92 +1,94
1 1 <%= form_tag({:action => 'edit', :tab => 'repositories'}) do %>
2 2
3 3 <fieldset class="box settings enabled_scm">
4 4 <%= hidden_field_tag 'settings[enabled_scm][]', '' %>
5 5 <legend><%= l(:setting_enabled_scm) %></legend>
6 6 <table>
7 7 <tr>
8 8 <th></th>
9 9 <th><%= l(:text_scm_command) %></th>
10 10 <th><%= l(:text_scm_command_version) %></th>
11 11 </tr>
12 12 <% Redmine::Scm::Base.all.collect do |choice| %>
13 13 <% scm_class = "Repository::#{choice}".constantize %>
14 14 <% text, value = (choice.is_a?(Array) ? choice : [choice, choice]) %>
15 15 <% setting = :enabled_scm %>
16 16 <% enabled = Setting.send(setting).include?(value) %>
17 17 <tr>
18 18 <td class="scm_name">
19 <label>
19 20 <%= check_box_tag("settings[#{setting}][]", value, enabled, :id => nil) %>
20 21 <%= text.to_s %>
22 </label>
21 23 </td>
22 24 <td>
23 25 <% if enabled %>
24 26 <%=
25 27 image_tag(
26 28 (scm_class.scm_available ? 'true.png' : 'exclamation.png'),
27 29 :style => "vertical-align:bottom;"
28 30 )
29 31 %>
30 32 <%= scm_class.scm_command %>
31 33 <% end %>
32 34 </td>
33 35 <td>
34 36 <%= scm_class.scm_version_string if enabled %>
35 37 </td>
36 38 </tr>
37 39 <% end %>
38 40 </table>
39 41 <p><em class="info"><%= l(:text_scm_config) %></em></p>
40 42 </fieldset>
41 43
42 44 <div class="box tabular settings">
43 45 <p><%= setting_check_box :autofetch_changesets %></p>
44 46
45 47 <p><%= setting_check_box :sys_api_enabled,
46 48 :onclick =>
47 49 "if (this.checked) { $('#settings_sys_api_key').removeAttr('disabled'); } else { $('#settings_sys_api_key').attr('disabled', true); }" %></p>
48 50
49 51 <p><%= setting_text_field :sys_api_key,
50 52 :size => 30,
51 53 :id => 'settings_sys_api_key',
52 54 :disabled => !Setting.sys_api_enabled?,
53 55 :label => :setting_mail_handler_api_key %>
54 56 <%= link_to_function l(:label_generate_key),
55 57 "if (!$('#settings_sys_api_key').attr('disabled')) { $('#settings_sys_api_key').val(randomKey(20)) }" %>
56 58 </p>
57 59
58 60 <p><%= setting_text_field :repository_log_display_limit, :size => 6 %></p>
59 61 </div>
60 62
61 63 <fieldset class="box tabular settings">
62 64 <legend><%= l(:text_issues_ref_in_commit_messages) %></legend>
63 65 <p><%= setting_text_field :commit_ref_keywords, :size => 30 %>
64 66 <em class="info"><%= l(:text_comma_separated) %></em></p>
65 67
66 68 <p><%= setting_text_field :commit_fix_keywords, :size => 30 %>
67 69 &nbsp;<%= l(:label_applied_status) %>: <%= setting_select :commit_fix_status_id,
68 70 [["", 0]] +
69 71 IssueStatus.find(:all).collect{
70 72 |status| [status.name, status.id.to_s]
71 73 },
72 74 :label => false %>
73 75 &nbsp;<%= l(:field_done_ratio) %>: <%= setting_select :commit_fix_done_ratio,
74 76 (0..10).to_a.collect {|r| ["#{r*10} %", "#{r*10}"] },
75 77 :blank => :label_no_change_option,
76 78 :label => false %>
77 79 <em class="info"><%= l(:text_comma_separated) %></em></p>
78 80
79 81 <p><%= setting_check_box :commit_cross_project_ref %></p>
80 82
81 83 <p><%= setting_check_box :commit_logtime_enabled,
82 84 :onclick =>
83 85 "if (this.checked) { $('#settings_commit_logtime_activity_id').removeAttr('disabled'); } else { $('#settings_commit_logtime_activity_id').attr('disabled', true); }"%></p>
84 86
85 87 <p><%= setting_select :commit_logtime_activity_id,
86 88 [[l(:label_default), 0]] +
87 89 TimeEntryActivity.shared.active.collect{|activity| [activity.name, activity.id.to_s]},
88 90 :disabled => !Setting.commit_logtime_enabled?%></p>
89 91 </fieldset>
90 92
91 93 <%= submit_tag l(:button_save) %>
92 94 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now