@@ -1,5 +1,5 | |||
|
1 |
# |
|
|
2 |
# Copyright (C) 2006-200 |
|
|
1 | # Redmine - project management software | |
|
2 | # Copyright (C) 2006-2009 Jean-Philippe Lang | |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
@@ -27,4 +27,48 module SettingsHelper | |||
|
27 | 27 | {:name => 'repositories', :partial => 'settings/repositories', :label => :label_repository_plural} |
|
28 | 28 | ] |
|
29 | 29 | end |
|
30 | ||
|
31 | def setting_select(setting, choices, options={}) | |
|
32 | if blank_text = options.delete(:blank) | |
|
33 | choices = [[blank_text.is_a?(Symbol) ? l(blank_text) : blank_text, '']] + choices | |
|
34 | end | |
|
35 | setting_label(setting, options) + | |
|
36 | select_tag("settings[#{setting}]", options_for_select(choices, Setting.send(setting).to_s), options) | |
|
37 | end | |
|
38 | ||
|
39 | def setting_multiselect(setting, choices, options={}) | |
|
40 | setting_values = Setting.send(setting) | |
|
41 | setting_values = [] unless setting_values.is_a?(Array) | |
|
42 | ||
|
43 | setting_label(setting, options) + | |
|
44 | hidden_field_tag("settings[#{setting}][]", '') + | |
|
45 | choices.collect do |choice| | |
|
46 | text, value = (choice.is_a?(Array) ? choice : [choice, choice]) | |
|
47 | content_tag('label', | |
|
48 | check_box_tag("settings[#{setting}][]", value, Setting.send(setting).include?(value)) + text.to_s, | |
|
49 | :class => 'block' | |
|
50 | ) | |
|
51 | end.join | |
|
52 | end | |
|
53 | ||
|
54 | def setting_text_field(setting, options={}) | |
|
55 | setting_label(setting, options) + | |
|
56 | text_field_tag("settings[#{setting}]", Setting.send(setting), options) | |
|
57 | end | |
|
58 | ||
|
59 | def setting_text_area(setting, options={}) | |
|
60 | setting_label(setting, options) + | |
|
61 | text_area_tag("settings[#{setting}]", Setting.send(setting), options) | |
|
62 | end | |
|
63 | ||
|
64 | def setting_check_box(setting, options={}) | |
|
65 | setting_label(setting, options) + | |
|
66 | hidden_field_tag("settings[#{setting}]", 0) + | |
|
67 | check_box_tag("settings[#{setting}]", 1, Setting.send("#{setting}?"), options) | |
|
68 | end | |
|
69 | ||
|
70 | def setting_label(setting, options={}) | |
|
71 | label = options.delete(:label) | |
|
72 | label != false ? content_tag("label", l(label || "setting_#{setting}")) : '' | |
|
73 | end | |
|
30 | 74 | end |
@@ -1,34 +1,20 | |||
|
1 | 1 | <% form_tag({:action => 'edit', :tab => 'authentication'}) do %> |
|
2 | 2 | |
|
3 | 3 | <div class="box tabular settings"> |
|
4 |
<p> |
|
|
5 | <%= hidden_field_tag 'settings[login_required]', 0 %> | |
|
6 | <%= check_box_tag 'settings[login_required]', 1, Setting.login_required? %> | |
|
7 | </p> | |
|
8 | ||
|
9 | <p><label><%= l(:setting_autologin) %></label> | |
|
10 | <%= select_tag 'settings[autologin]', options_for_select( [[l(:label_disabled), "0"]] + [1, 7, 30, 365].collect{|days| [l('datetime.distance_in_words.x_days', :count => days), days.to_s]}, Setting.autologin) %></p> | |
|
11 | ||
|
12 | <p><label><%= l(:setting_self_registration) %></label> | |
|
13 | <%= select_tag 'settings[self_registration]', | |
|
14 | options_for_select( [[l(:label_disabled), "0"], | |
|
15 | [l(:label_registration_activation_by_email), "1"], | |
|
16 | [l(:label_registration_manual_activation), "2"], | |
|
17 | [l(:label_registration_automatic_activation), "3"] | |
|
18 | ], Setting.self_registration ) %></p> | |
|
19 | ||
|
20 | <p><label><%= l(:setting_password_min_length) %></label> | |
|
21 | <%= text_field_tag 'settings[password_min_length]', Setting.password_min_length, :size => 6 %></p> | |
|
22 | ||
|
23 | <p><label><%= l(:label_password_lost) %></label> | |
|
24 | <%= hidden_field_tag 'settings[lost_password]', 0 %> | |
|
25 | <%= check_box_tag 'settings[lost_password]', 1, Setting.lost_password? %> | |
|
26 | </p> | |
|
27 | ||
|
28 | <p><label><%= l(:setting_openid) %></label> | |
|
29 | <%= hidden_field_tag 'settings[openid]', 0 %> | |
|
30 | <%= check_box_tag 'settings[openid]', 1, Setting.openid?, :disabled => !Object.const_defined?(:OpenID) %> | |
|
31 | </p> | |
|
4 | <p><%= setting_check_box :login_required %></p> | |
|
5 | ||
|
6 | <p><%= setting_select :autologin, [1, 7, 30, 365].collect{|days| [l('datetime.distance_in_words.x_days', :count => days), days.to_s]}, :blank => :label_disabled %></p> | |
|
7 | ||
|
8 | <p><%= setting_select :self_registration, [[l(:label_disabled), "0"], | |
|
9 | [l(:label_registration_activation_by_email), "1"], | |
|
10 | [l(:label_registration_manual_activation), "2"], | |
|
11 | [l(:label_registration_automatic_activation), "3"]] %></p> | |
|
12 | ||
|
13 | <p><%= setting_text_field :password_min_length, :size => 6 %></p> | |
|
14 | ||
|
15 | <p><%= setting_check_box :lost_password, :label => :label_password_lost %></p> | |
|
16 | ||
|
17 | <p><%= setting_check_box :openid, :disabled => !Object.const_defined?(:OpenID) %></p> | |
|
32 | 18 | </div> |
|
33 | 19 | |
|
34 | 20 | <div style="float:right;"> |
@@ -1,32 +1,21 | |||
|
1 | 1 | <% form_tag({:action => 'edit', :tab => 'display'}) do %> |
|
2 | 2 | |
|
3 | 3 | <div class="box tabular settings"> |
|
4 | <p><label><%= l(:label_theme) %></label> | |
|
5 | <%= select_tag 'settings[ui_theme]', options_for_select( ([[l(:label_default), '']] + Redmine::Themes.themes.collect {|t| [t.name, t.id]}), Setting.ui_theme) %></p> | |
|
4 | <p><%= setting_select :ui_theme, Redmine::Themes.themes.collect {|t| [t.name, t.id]}, :blank => :label_default, :label => :label_theme %></p> | |
|
6 | 5 | |
|
7 | <p><label><%= l(:setting_default_language) %></label> | |
|
8 | <%= select_tag 'settings[default_language]', options_for_select( lang_options_for_select(false), Setting.default_language) %></p> | |
|
6 | <p><%= setting_select :default_language, lang_options_for_select(false) %></p> | |
|
9 | 7 | |
|
10 | <p><label><%= l(:setting_start_of_week) %></label> | |
|
11 | <%= select_tag 'settings[start_of_week]', options_for_select( [[l(:label_language_based), ''], [day_name(1),'1'], [day_name(7),'7']] , Setting.start_of_week) %></p> | |
|
8 | <p><%= setting_select :start_of_week, [[day_name(1),'1'], [day_name(7),'7']], :blank => :label_language_based %></p> | |
|
12 | 9 | |
|
13 | <p><label><%= l(:setting_date_format) %></label> | |
|
14 | <%= select_tag 'settings[date_format]', options_for_select( [[l(:label_language_based), '']] + Setting::DATE_FORMATS.collect {|f| [Date.today.strftime(f), f]}, Setting.date_format) %></p> | |
|
10 | <p><%= setting_select :date_format, Setting::DATE_FORMATS.collect {|f| [Date.today.strftime(f), f]}, :blank => :label_language_based %></p> | |
|
15 | 11 | |
|
16 | <p><label><%= l(:setting_time_format) %></label> | |
|
17 | <%= select_tag 'settings[time_format]', options_for_select( [[l(:label_language_based), '']] + Setting::TIME_FORMATS.collect {|f| [Time.now.strftime(f), f]}, Setting.time_format) %></p> | |
|
12 | <p><%= setting_select :time_format, Setting::TIME_FORMATS.collect {|f| [Time.now.strftime(f), f]}, :blank => :label_language_based %></p> | |
|
18 | 13 | |
|
19 | <p><label><%= l(:setting_user_format) %></label> | |
|
20 | <%= select_tag 'settings[user_format]', options_for_select( @options[:user_format], Setting.user_format.to_s ) %></p> | |
|
14 | <p><%= setting_select :user_format, @options[:user_format] %></p> | |
|
21 | 15 | |
|
22 |
<p> |
|
|
23 | <%= hidden_field_tag 'settings[gravatar_enabled]', 0 %> | |
|
24 | <%= check_box_tag 'settings[gravatar_enabled]', 1, Setting.gravatar_enabled? %> | |
|
25 | </p> | |
|
16 | <p><%= setting_check_box :gravatar_enabled %></p> | |
|
26 | 17 | |
|
27 | <p><label><%= l(:setting_gravatar_default) %></label> | |
|
28 | <%= select_tag 'settings[gravatar_default]', options_for_select([[l(:label_none), ''], ["Wavatars", 'wavatar'], ["Identicons", 'identicon'], ["Monster ids", 'monsterid']], Setting.gravatar_default) %></p> | |
|
29 | </p> | |
|
18 | <p><%= setting_select :gravatar_default, [["Wavatars", 'wavatar'], ["Identicons", 'identicon'], ["Monster ids", 'monsterid']], :blank => :label_none %></p> | |
|
30 | 19 | </div> |
|
31 | 20 | |
|
32 | 21 | <%= submit_tag l(:button_save) %> |
@@ -1,43 +1,32 | |||
|
1 | 1 | <% form_tag({:action => 'edit'}) do %> |
|
2 | 2 | |
|
3 | 3 | <div class="box tabular settings"> |
|
4 | <p><label><%= l(:setting_app_title) %></label> | |
|
5 | <%= text_field_tag 'settings[app_title]', Setting.app_title, :size => 30 %></p> | |
|
4 | <p><%= setting_text_field :app_title, :size => 30 %></p> | |
|
6 | 5 | |
|
7 | <p><label><%= l(:setting_welcome_text) %></label> | |
|
8 | <%= text_area_tag 'settings[welcome_text]', Setting.welcome_text, :cols => 60, :rows => 5, :class => 'wiki-edit' %></p> | |
|
9 | <%= wikitoolbar_for 'settings[welcome_text]' %> | |
|
6 | <p><%= setting_text_area :welcome_text, :cols => 60, :rows => 5, :class => 'wiki-edit' %></p> | |
|
7 | <%= wikitoolbar_for 'settings_welcome_text' %> | |
|
10 | 8 | |
|
11 |
<p> |
|
|
12 | <%= text_field_tag 'settings[attachment_max_size]', Setting.attachment_max_size, :size => 6 %> KB</p> | |
|
9 | <p><%= setting_text_field :attachment_max_size, :size => 6 %> KB</p> | |
|
13 | 10 | |
|
14 |
<p> |
|
|
15 | <%= text_field_tag 'settings[per_page_options]', Setting.per_page_options_array.join(', '), :size => 20 %><br /><em><%= l(:text_comma_separated) %></em></p> | |
|
11 | <p><%= setting_text_field :per_page_options, :size => 20 %><br /> | |
|
12 | <em><%= l(:text_comma_separated) %></em></p> | |
|
16 | 13 | |
|
17 | <p><label><%= l(:setting_activity_days_default) %></label> | |
|
18 | <%= text_field_tag 'settings[activity_days_default]', Setting.activity_days_default, :size => 6 %> <%= l(:label_day_plural) %></p> | |
|
14 | <p><%= setting_text_field :activity_days_default, :size => 6 %> <%= l(:label_day_plural) %></p> | |
|
19 | 15 | |
|
20 | <p><label><%= l(:setting_host_name) %></label> | |
|
21 | <%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %><br /> | |
|
16 | <p><%= setting_text_field :host_name, :size => 60 %><br /> | |
|
22 | 17 | <em><%= l(:label_example) %>: <%= @guessed_host_and_path %></em></p> |
|
23 | 18 | |
|
24 | <p><label><%= l(:setting_protocol) %></label> | |
|
25 | <%= select_tag 'settings[protocol]', options_for_select(['http', 'https'], Setting.protocol) %></p> | |
|
19 | <p><%= setting_select :protocol, [['HTTP', 'http'], ['HTTPS', 'https']] %></p> | |
|
26 | 20 | |
|
27 | <p><label><%= l(:setting_text_formatting) %></label> | |
|
28 | <%= select_tag 'settings[text_formatting]', options_for_select([[l(:label_none), "0"], *Redmine::WikiFormatting.format_names.collect{|name| [name, name]} ], Setting.text_formatting.to_sym) %></p> | |
|
21 | <p><%= setting_select :text_formatting, Redmine::WikiFormatting.format_names.collect{|name| [name, name.to_s]}, :blank => :label_none %></p> | |
|
29 | 22 | |
|
30 | <p><label><%= l(:setting_wiki_compression) %></label> | |
|
31 | <%= select_tag 'settings[wiki_compression]', options_for_select( [[l(:label_none), 0], ["gzip", "gzip"]], Setting.wiki_compression) %></p> | |
|
23 | <p><%= setting_select :wiki_compression, [['Gzip', 'gzip']], :blank => :label_none %></p> | |
|
32 | 24 | |
|
33 |
<p> |
|
|
34 | <%= text_field_tag 'settings[feeds_limit]', Setting.feeds_limit, :size => 6 %></p> | |
|
25 | <p><%= setting_text_field :feeds_limit, :size => 6 %></p> | |
|
35 | 26 | |
|
36 |
<p> |
|
|
37 | <%= text_field_tag 'settings[file_max_size_displayed]', Setting.file_max_size_displayed, :size => 6 %> KB</p> | |
|
27 | <p><%= setting_text_field :file_max_size_displayed, :size => 6 %> KB</p> | |
|
38 | 28 | |
|
39 |
<p> |
|
|
40 | <%= text_field_tag 'settings[diff_max_lines_displayed]', Setting.diff_max_lines_displayed, :size => 6 %></p> | |
|
29 | <p><%= setting_text_field :diff_max_lines_displayed, :size => 6 %></p> | |
|
41 | 30 | </div> |
|
42 | 31 | |
|
43 | 32 | <%= submit_tag l(:button_save) %> |
@@ -1,30 +1,18 | |||
|
1 | 1 | <% form_tag({:action => 'edit', :tab => 'issues'}) do %> |
|
2 | 2 | |
|
3 | 3 | <div class="box tabular settings"> |
|
4 |
<p> |
|
|
5 | <%= hidden_field_tag 'settings[cross_project_issue_relations]', 0 %> | |
|
6 | <%= check_box_tag 'settings[cross_project_issue_relations]', 1, Setting.cross_project_issue_relations? %> | |
|
7 | </p> | |
|
4 | <p><%= setting_check_box :cross_project_issue_relations %></p> | |
|
8 | 5 | |
|
9 |
<p> |
|
|
10 | <%= hidden_field_tag 'settings[display_subprojects_issues]', 0 %> | |
|
11 | <%= check_box_tag 'settings[display_subprojects_issues]', 1, Setting.display_subprojects_issues? %> | |
|
12 | </p> | |
|
6 | <p><%= setting_check_box :display_subprojects_issues %></p> | |
|
13 | 7 | |
|
14 | <p><label><%= l(:setting_issue_done_ratio) %></label> | |
|
15 | <%= select_tag 'settings[issue_done_ratio]', | |
|
16 | options_for_select(Issue::DONE_RATIO_OPTIONS.collect {|i| [l("setting_issue_done_ratio_#{i}"), i]}, Setting.issue_done_ratio) %></p> | |
|
8 | <p><%= setting_select :issue_done_ratio, Issue::DONE_RATIO_OPTIONS.collect {|i| [l("setting_issue_done_ratio_#{i}"), i]} %></p> | |
|
17 | 9 | |
|
18 |
<p> |
|
|
19 | <%= text_field_tag 'settings[issues_export_limit]', Setting.issues_export_limit, :size => 6 %></p> | |
|
10 | <p><%= setting_text_field :issues_export_limit, :size => 6 %></p> | |
|
20 | 11 | </div> |
|
21 | 12 | |
|
22 | 13 | <fieldset class="box settings"><legend><%= l(:setting_issue_list_default_columns) %></legend> |
|
23 |
<%= |
|
|
24 | <% Query.new.available_columns.each do |column| %> | |
|
25 | <label><%= check_box_tag 'settings[issue_list_default_columns][]', column.name, Setting.issue_list_default_columns.include?(column.name.to_s) %> | |
|
26 | <%= column.caption %></label><br /> | |
|
27 | <% end %> | |
|
14 | <%= setting_multiselect(:issue_list_default_columns, | |
|
15 | Query.new.available_columns.collect {|c| [c.caption, c.name.to_s]}, :label => false) %> | |
|
28 | 16 | </fieldset> |
|
29 | 17 | |
|
30 | 18 | <%= submit_tag l(:button_save) %> |
@@ -1,18 +1,14 | |||
|
1 | 1 | <% form_tag({:action => 'edit', :tab => 'mail_handler'}) do %> |
|
2 | 2 | |
|
3 | 3 | <div class="box tabular settings"> |
|
4 |
<p> |
|
|
5 | <%= hidden_field_tag 'settings[mail_handler_api_enabled]', 0 %> | |
|
6 | <%= check_box_tag 'settings[mail_handler_api_enabled]', 1, Setting.mail_handler_api_enabled?, | |
|
7 | :onclick => "if (this.checked) { Form.Element.enable('settings_mail_handler_api_key'); } else { Form.Element.disable('settings_mail_handler_api_key'); }" %> | |
|
8 | </p> | |
|
4 | <p><%= setting_check_box :mail_handler_api_enabled, | |
|
5 | :onclick => "if (this.checked) { Form.Element.enable('settings_mail_handler_api_key'); } else { Form.Element.disable('settings_mail_handler_api_key'); }"%></p> | |
|
9 | 6 | |
|
10 |
<p> |
|
|
11 | <%= text_field_tag 'settings[mail_handler_api_key]', Setting.mail_handler_api_key, | |
|
12 | :size => 30, | |
|
13 | :id => 'settings_mail_handler_api_key', | |
|
14 | :disabled => !Setting.mail_handler_api_enabled? %> | |
|
15 | <%= link_to_function l(:label_generate_key), "if ($('settings_mail_handler_api_key').disabled == false) { $('settings_mail_handler_api_key').value = randomKey(20) }" %></p> | |
|
7 | <p><%= setting_text_field :mail_handler_api_key, :size => 30, | |
|
8 | :id => 'settings_mail_handler_api_key', | |
|
9 | :disabled => !Setting.mail_handler_api_enabled? %> | |
|
10 | <%= link_to_function l(:label_generate_key), "if ($('settings_mail_handler_api_key').disabled == false) { $('settings_mail_handler_api_key').value = randomKey(20) }" %> | |
|
11 | </p> | |
|
16 | 12 | </div> |
|
17 | 13 | |
|
18 | 14 | <%= submit_tag l(:button_save) %> |
@@ -2,31 +2,22 | |||
|
2 | 2 | <% form_tag({:action => 'edit', :tab => 'notifications'}) do %> |
|
3 | 3 | |
|
4 | 4 | <div class="box tabular settings"> |
|
5 | <p><label><%= l(:setting_mail_from) %></label> | |
|
6 | <%= text_field_tag 'settings[mail_from]', Setting.mail_from, :size => 60 %></p> | |
|
7 | ||
|
8 | <p><label><%= l(:setting_bcc_recipients) %></label> | |
|
9 | <%= hidden_field_tag 'settings[bcc_recipients]', 0 %> | |
|
10 | <%= check_box_tag 'settings[bcc_recipients]', 1, Setting.bcc_recipients? %> | |
|
11 | </p> | |
|
12 | ||
|
13 | <p><label><%= l(:setting_plain_text_mail) %></label> | |
|
14 | <%= hidden_field_tag 'settings[plain_text_mail]', 0 %> | |
|
15 | <%= check_box_tag 'settings[plain_text_mail]', 1, Setting.plain_text_mail? %> | |
|
16 | </p> | |
|
5 | <p><%= setting_text_field :mail_from, :size => 60 %></p> | |
|
6 | ||
|
7 | <p><%= setting_check_box :bcc_recipients %></p> | |
|
8 | ||
|
9 | <p><%= setting_check_box :plain_text_mail %></p> | |
|
17 | 10 | </div> |
|
18 | 11 | |
|
19 | <fieldset class="box" id="notified_events"><legend><%=l(:text_select_mail_notifications)%></legend> | |
|
20 | <% @notifiables.each do |notifiable| %> | |
|
21 | <label><%= check_box_tag 'settings[notified_events][]', notifiable, Setting.notified_events.include?(notifiable) %> | |
|
22 | <%= l_or_humanize(notifiable, :prefix => 'label_') %></label><br /> | |
|
23 | <% end %> | |
|
24 | <%= hidden_field_tag 'settings[notified_events][]', '' %> | |
|
25 | <p><%= check_all_links('notified_events') %></p> | |
|
12 | <fieldset class="box settings" id="notified_events"><legend><%=l(:text_select_mail_notifications)%></legend> | |
|
13 | <%= setting_multiselect(:notified_events, | |
|
14 | @notifiables.collect {|notifiable| [l_or_humanize(notifiable, :prefix => 'label_'), notifiable]}, :label => false) %> | |
|
15 | ||
|
16 | <p><%= check_all_links('notified_events') %></p> | |
|
26 | 17 | </fieldset> |
|
27 | 18 | |
|
28 | 19 | <fieldset class="box"><legend><%= l(:setting_emails_footer) %></legend> |
|
29 |
<%= text_area |
|
|
20 | <%= setting_text_area :emails_footer, :label => false, :class => 'wiki-edit', :rows => 5 %> | |
|
30 | 21 | </fieldset> |
|
31 | 22 | |
|
32 | 23 | <div style="float:right;"> |
@@ -1,28 +1,16 | |||
|
1 | 1 | <% form_tag({:action => 'edit', :tab => 'projects'}) do %> |
|
2 | 2 | |
|
3 | 3 | <div class="box tabular settings"> |
|
4 |
<p> |
|
|
5 | <%= hidden_field_tag 'settings[default_projects_public]', 0 %> | |
|
6 | <%= check_box_tag 'settings[default_projects_public]', 1, Setting.default_projects_public? %> | |
|
7 | </p> | |
|
4 | <p><%= setting_check_box :default_projects_public %></p> | |
|
8 | 5 | |
|
9 |
<p> |
|
|
10 | <%= hidden_field_tag 'settings[default_projects_modules][]', '' %> | |
|
11 | <% Redmine::AccessControl.available_project_modules.each do |m| %> | |
|
12 | <label class="block"> | |
|
13 | <%= check_box_tag 'settings[default_projects_modules][]', m, Setting.default_projects_modules.include?(m.to_s) %> | |
|
14 | <%= l_or_humanize(m, :prefix => "project_module_") %> | |
|
15 | </label> | |
|
16 | <% end %> | |
|
17 | </p> | |
|
6 | <p><%= setting_multiselect(:default_projects_modules, | |
|
7 | Redmine::AccessControl.available_project_modules.collect {|m| [l_or_humanize(m, :prefix => "project_module_"), m.to_s]}) %></p> | |
|
18 | 8 | |
|
19 |
<p> |
|
|
20 | <%= hidden_field_tag 'settings[sequential_project_identifiers]', 0 %> | |
|
21 | <%= check_box_tag 'settings[sequential_project_identifiers]', 1, Setting.sequential_project_identifiers? %> | |
|
22 | </p> | |
|
9 | <p><%= setting_check_box :sequential_project_identifiers %></p> | |
|
23 | 10 | |
|
24 |
<p> |
|
|
25 | <%= select_tag('settings[new_project_user_role_id]', options_for_select([["--- #{l(:actionview_instancetag_blank_option)} ---", '']] + Role.find_all_givable.collect {|r| [r.name, r.id]}, Setting.new_project_user_role_id.to_i)) %></p> | |
|
11 | <p><%= setting_select :new_project_user_role_id, | |
|
12 | Role.find_all_givable.collect {|r| [r.name, r.id.to_s]}, | |
|
13 | :blank => "--- #{l(:actionview_instancetag_blank_option)} ---" %></p> | |
|
26 | 14 | </div> |
|
27 | 15 | |
|
28 | 16 | <%= submit_tag l(:button_save) %> |
@@ -1,41 +1,27 | |||
|
1 | 1 | <% form_tag({:action => 'edit', :tab => 'repositories'}) do %> |
|
2 | 2 | |
|
3 | 3 | <div class="box tabular settings"> |
|
4 |
<p> |
|
|
5 | <%= hidden_field_tag 'settings[autofetch_changesets]', 0 %> | |
|
6 | <%= check_box_tag 'settings[autofetch_changesets]', 1, Setting.autofetch_changesets? %> | |
|
7 | </p> | |
|
8 | ||
|
9 | <p><label><%= l(:setting_sys_api_enabled) %></label> | |
|
10 | <%= hidden_field_tag 'settings[sys_api_enabled]', 0 %> | |
|
11 | <%= check_box_tag 'settings[sys_api_enabled]', 1, Setting.sys_api_enabled? %> | |
|
12 | </p> | |
|
13 | ||
|
14 | <p><label><%= l(:setting_enabled_scm) %></label> | |
|
15 | <% REDMINE_SUPPORTED_SCM.each do |scm| -%> | |
|
16 | <%= check_box_tag 'settings[enabled_scm][]', scm, Setting.enabled_scm.include?(scm) %> <%= scm %> | |
|
17 | <% end -%> | |
|
18 | <%= hidden_field_tag 'settings[enabled_scm][]', '' %> | |
|
19 | </p> | |
|
20 | ||
|
21 | <p><label><%= l(:setting_repositories_encodings) %></label> | |
|
22 | <%= text_field_tag 'settings[repositories_encodings]', Setting.repositories_encodings, :size => 60 %><br /><em><%= l(:text_comma_separated) %></em></p> | |
|
23 | ||
|
24 | <p><label><%= l(:setting_commit_logs_encoding) %></label> | |
|
25 | <%= select_tag 'settings[commit_logs_encoding]', options_for_select(Setting::ENCODINGS, Setting.commit_logs_encoding) %></p> | |
|
26 | ||
|
27 | <p><label><%= l(:setting_repository_log_display_limit) %></label> | |
|
28 | <%= text_field_tag 'settings[repository_log_display_limit]', Setting.repository_log_display_limit, :size => 6 %></p> | |
|
4 | <p><%= setting_check_box :autofetch_changesets %></p> | |
|
5 | ||
|
6 | <p><%= setting_check_box :sys_api_enabled %></p> | |
|
7 | ||
|
8 | <p><%= setting_multiselect(:enabled_scm, REDMINE_SUPPORTED_SCM) %></p> | |
|
9 | ||
|
10 | <p><%= setting_text_field :repositories_encodings, :size => 60 %><br /> | |
|
11 | <em><%= l(:text_comma_separated) %></em></p> | |
|
12 | ||
|
13 | <p><%= setting_select :commit_logs_encoding, Setting::ENCODINGS %></p> | |
|
14 | ||
|
15 | <p><%= setting_text_field :repository_log_display_limit, :size => 6 %></p> | |
|
29 | 16 | </div> |
|
30 | 17 | |
|
31 | 18 | <fieldset class="box tabular settings"><legend><%= l(:text_issues_ref_in_commit_messages) %></legend> |
|
32 |
<p> |
|
|
33 | <%= text_field_tag 'settings[commit_ref_keywords]', Setting.commit_ref_keywords, :size => 30 %><br /><em><%= l(:text_comma_separated) %></em></p> | |
|
19 | <p><%= setting_text_field :commit_ref_keywords, :size => 30 %><br /> | |
|
20 | <em><%= l(:text_comma_separated) %></em></p> | |
|
34 | 21 | |
|
35 |
<p> |
|
|
36 | <%= text_field_tag 'settings[commit_fix_keywords]', Setting.commit_fix_keywords, :size => 30 %> | |
|
37 | <%= l(:label_applied_status) %>: <%= select_tag 'settings[commit_fix_status_id]', options_for_select( [["", 0]] + IssueStatus.find(:all).collect{|status| [status.name, status.id.to_s]}, Setting.commit_fix_status_id) %> | |
|
38 | <%= l(:field_done_ratio) %>: <%= select_tag 'settings[commit_fix_done_ratio]', options_for_select( [[l(:label_no_change_option), '']] + ((0..10).to_a.collect {|r| ["#{r*10} %", "#{r*10}"] }), Setting.commit_fix_done_ratio) %> | |
|
22 | <p><%= setting_text_field :commit_fix_keywords, :size => 30 %> | |
|
23 | <%= l(:label_applied_status) %>: <%= setting_select :commit_fix_status_id, [["", 0]] + IssueStatus.find(:all).collect{|status| [status.name, status.id.to_s]}, :label => false %> | |
|
24 | <%= l(:field_done_ratio) %>: <%= setting_select :commit_fix_done_ratio, (0..10).to_a.collect {|r| ["#{r*10} %", "#{r*10}"] }, :blank => :label_no_change_option, :label => false %> | |
|
39 | 25 | <br /><em><%= l(:text_comma_separated) %></em></p> |
|
40 | 26 | </fieldset> |
|
41 | 27 |
@@ -371,6 +371,8 input#time_entry_comments { width: 90%;} | |||
|
371 | 371 | .tabular.settings p{ padding-left: 300px; } |
|
372 | 372 | .tabular.settings label{ margin-left: -300px; width: 295px; } |
|
373 | 373 | |
|
374 | fieldset.settings label { display: block; } | |
|
375 | ||
|
374 | 376 | .required {color: #bb0000;} |
|
375 | 377 | .summary {font-style: italic;} |
|
376 | 378 |
General Comments 0
You need to be logged in to leave comments.
Login now