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.rhtml @ 723:d41bf754c0f2

History | View | Annotate | Download (3.87 KB)

1
<% form_tag({:action => 'edit', :tab => 'repositories'}) do %>
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

    
45
<div class="box tabular settings">
46
<p><%= setting_check_box :autofetch_changesets %></p>
47

    
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>
51

    
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) }" %>
59
</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
<fieldset class="box tabular settings">
68
<legend><%= l(:text_issues_ref_in_commit_messages) %></legend>
69
<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
&nbsp;<%= 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
&nbsp;<%= 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
<br /><em><%= l(:text_comma_separated) %></em></p>
84

    
85
<p><%= setting_check_box :commit_logtime_enabled,
86
                         :onclick =>
87
                            "if (this.checked) { Form.Element.enable('settings_commit_logtime_activity_id'); } else { Form.Element.disable('settings_commit_logtime_activity_id'); }"%></p>
88

    
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>
93
</fieldset>
94

    
95
<%= submit_tag l(:button_save) %>
96
<% end %>