To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / app / views / settings / _repositories.html.erb @ 912:5e80956cc792

History | View | Annotate | Download (3.79 KB)

1 0:513646585e45 Chris
<% form_tag({:action => 'edit', :tab => 'repositories'}) do %>
2
3 909:cbb26bc654de Chris
<fieldset class="box settings enabled_scm">
4
<%= hidden_field_tag 'settings[enabled_scm][]', '' %>
5 441:cbce1fd3b1b7 Chris
<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 909:cbb26bc654de Chris
        <%=
19 441:cbce1fd3b1b7 Chris
          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 909:cbb26bc654de Chris
<p><em><%= l(:text_scm_config) %></em></p>
42 441:cbce1fd3b1b7 Chris
</fieldset>
43
44 0:513646585e45 Chris
<div class="box tabular settings">
45
<p><%= setting_check_box :autofetch_changesets %></p>
46
47 441:cbce1fd3b1b7 Chris
<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 0:513646585e45 Chris
51 441:cbce1fd3b1b7 Chris
<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 0:513646585e45 Chris
</p>
59
60
<p><%= setting_text_field :repository_log_display_limit, :size => 6 %></p>
61
</div>
62
63 441:cbce1fd3b1b7 Chris
<fieldset class="box tabular settings">
64
<legend><%= l(:text_issues_ref_in_commit_messages) %></legend>
65 0:513646585e45 Chris
<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 441:cbce1fd3b1b7 Chris
&nbsp;<%= 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
&nbsp;<%= 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 0:513646585e45 Chris
<br /><em><%= l(:text_comma_separated) %></em></p>
80 119:8661b858af72 Chris
81
<p><%= setting_check_box :commit_logtime_enabled,
82 441:cbce1fd3b1b7 Chris
                         :onclick =>
83
                            "if (this.checked) { Form.Element.enable('settings_commit_logtime_activity_id'); } else { Form.Element.disable('settings_commit_logtime_activity_id'); }"%></p>
84 119:8661b858af72 Chris
85 441:cbce1fd3b1b7 Chris
<p><%= setting_select :commit_logtime_activity_id,
86
                      [[l(:label_default), 0]] +
87 909:cbb26bc654de Chris
                          TimeEntryActivity.shared.active.collect{|activity| [activity.name, activity.id.to_s]},
88 441:cbce1fd3b1b7 Chris
                      :disabled => !Setting.commit_logtime_enabled?%></p>
89 0:513646585e45 Chris
</fieldset>
90
91
<%= submit_tag l(:button_save) %>
92
<% end %>