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