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 / 22 / 2271decb00153f4ca80ae30e23c680b8a941ca9b.svn-base @ 1298:4f746d8966dd
History | View | Annotate | Download (3.95 KB)
| 1 | 1295:622f24f53b42 | Chris | <%= form_tag({:action => 'edit', :tab => 'repositories'}) do %>
|
|---|---|---|---|
| 2 | |||
| 3 | <fieldset class="box settings enabled_scm"> |
||
| 4 | <legend><%= l(:setting_enabled_scm) %></legend> |
||
| 5 | <%= hidden_field_tag 'settings[enabled_scm][]', '' %> |
||
| 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 | <% enabled = Setting.send(setting).include?(value) %> |
||
| 17 | <tr> |
||
| 18 | <td class="scm_name"> |
||
| 19 | <label> |
||
| 20 | <%= check_box_tag("settings[#{setting}][]", value, enabled, :id => nil) %>
|
||
| 21 | <%= text.to_s %> |
||
| 22 | </label> |
||
| 23 | </td> |
||
| 24 | <td> |
||
| 25 | <% if enabled %> |
||
| 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 | <% end %> |
||
| 34 | </td> |
||
| 35 | <td> |
||
| 36 | <%= scm_class.scm_version_string if enabled %> |
||
| 37 | </td> |
||
| 38 | </tr> |
||
| 39 | <% end %> |
||
| 40 | </table> |
||
| 41 | <p><em class="info"><%= 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) { $('#settings_sys_api_key').removeAttr('disabled'); } else { $('#settings_sys_api_key').attr('disabled', true); }" %></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').attr('disabled')) { $('#settings_sys_api_key').val(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 %> |
||
| 66 | <em class="info"><%= 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.sorted.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 | <em class="info"><%= l(:text_comma_separated) %></em></p> |
||
| 80 | |||
| 81 | <p><%= setting_check_box :commit_cross_project_ref %></p> |
||
| 82 | |||
| 83 | <p><%= setting_check_box :commit_logtime_enabled, |
||
| 84 | :onclick => |
||
| 85 | "if (this.checked) { $('#settings_commit_logtime_activity_id').removeAttr('disabled'); } else { $('#settings_commit_logtime_activity_id').attr('disabled', true); }"%></p>
|
||
| 86 | |||
| 87 | <p><%= setting_select :commit_logtime_activity_id, |
||
| 88 | [[l(:label_default), 0]] + |
||
| 89 | TimeEntryActivity.shared.active.collect{|activity| [activity.name, activity.id.to_s]},
|
||
| 90 | :disabled => !Setting.commit_logtime_enabled?%></p> |
||
| 91 | </fieldset> |
||
| 92 | |||
| 93 | <%= submit_tag l(:button_save) %> |
||
| 94 | <% end %> |