To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / settings / _repositories.rhtml @ 442:753f1380d6bc
History | View | Annotate | Download (3.87 KB)
| 1 | 0:513646585e45 | Chris | <% form_tag({:action => 'edit', :tab => 'repositories'}) do %>
|
|---|---|---|---|
| 2 | |||
| 3 | 441:cbce1fd3b1b7 | Chris | <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 | |||
| 45 | 0:513646585e45 | Chris | <div class="box tabular settings"> |
| 46 | <p><%= setting_check_box :autofetch_changesets %></p> |
||
| 47 | |||
| 48 | 441:cbce1fd3b1b7 | Chris | <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> |
||
| 51 | 0:513646585e45 | Chris | |
| 52 | 441:cbce1fd3b1b7 | Chris | <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) }" %>
|
||
| 59 | 0:513646585e45 | Chris | </p>
|
| 60 | |||
| 61 | <p><%= setting_text_field :repositories_encodings, :size => 60 %><br /> |
||
| 62 | <em><%= l(:text_comma_separated) %></em></p> |
||
| 63 | |||
| 64 | <p><%= setting_text_field :repository_log_display_limit, :size => 6 %></p> |
||
| 65 | </div>
|
||
| 66 | |||
| 67 | 441:cbce1fd3b1b7 | Chris | <fieldset class="box tabular settings"> |
| 68 | <legend><%= l(:text_issues_ref_in_commit_messages) %></legend> |
||
| 69 | 0:513646585e45 | Chris | <p><%= setting_text_field :commit_ref_keywords, :size => 30 %><br /> |
| 70 | <em><%= l(:text_comma_separated) %></em></p> |
||
| 71 | |||
| 72 | <p><%= setting_text_field :commit_fix_keywords, :size => 30 %> |
||
| 73 | 441:cbce1fd3b1b7 | Chris | <%= 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 %>
|
||
| 83 | 0:513646585e45 | Chris | <br /><em><%= l(:text_comma_separated) %></em></p> |
| 84 | 119:8661b858af72 | Chris | |
| 85 | <p><%= setting_check_box :commit_logtime_enabled, |
||
| 86 | 441:cbce1fd3b1b7 | Chris | :onclick =>
|
| 87 | "if (this.checked) { Form.Element.enable('settings_commit_logtime_activity_id'); } else { Form.Element.disable('settings_commit_logtime_activity_id'); }"%></p> |
||
| 88 | 119:8661b858af72 | Chris | |
| 89 | 441:cbce1fd3b1b7 | Chris | <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> |
||
| 93 | 0:513646585e45 | Chris | </fieldset>
|
| 94 | |||
| 95 | <%= submit_tag l(:button_save) %>
|
||
| 96 | <% end %> |