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