##// END OF EJS Templates
Admin settings screen split to tabs....
Jean-Philippe Lang -
r1033:a80dbc49b167
parent child
Show More
@@ -0,0 +1,27
1 <% form_tag({:action => 'edit', :tab => 'authentication'}) do %>
2
3 <div class="box tabular settings">
4 <p><label><%= l(:setting_login_required) %></label>
5 <%= check_box_tag 'settings[login_required]', 1, Setting.login_required? %><%= hidden_field_tag 'settings[login_required]', 0 %></p>
6
7 <p><label><%= l(:setting_autologin) %></label>
8 <%= select_tag 'settings[autologin]', options_for_select( [[l(:label_disabled), "0"]] + [1, 7, 30, 365].collect{|days| [lwr(:actionview_datehelper_time_in_words_day, days), days.to_s]}, Setting.autologin) %></p>
9
10 <p><label><%= l(:setting_self_registration) %></label>
11 <%= select_tag 'settings[self_registration]',
12 options_for_select( [[l(:label_disabled), "0"],
13 [l(:label_registration_activation_by_email), "1"],
14 [l(:label_registration_manual_activation), "2"],
15 [l(:label_registration_automatic_activation), "3"]
16 ], Setting.self_registration ) %></p>
17
18 <p><label><%= l(:label_password_lost) %></label>
19 <%= check_box_tag 'settings[lost_password]', 1, Setting.lost_password? %><%= hidden_field_tag 'settings[lost_password]', 0 %></p>
20 </div>
21
22 <div style="float:right;">
23 <%= link_to 'Manage LDAP authentication...', :controller => 'auth_sources', :action => 'list' %>
24 </div>
25
26 <%= submit_tag l(:button_save) %>
27 <% end %>
@@ -0,0 +1,46
1 <% form_tag({:action => 'edit'}) do %>
2
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>
6
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]' %>
10
11 <p><label><%= l(:label_theme) %></label>
12 <%= select_tag 'settings[ui_theme]', options_for_select( ([[l(:label_default), '']] + Redmine::Themes.themes.collect {|t| [t.name, t.id]}), Setting.ui_theme) %></p>
13
14 <p><label><%= l(:setting_default_language) %></label>
15 <%= select_tag 'settings[default_language]', options_for_select( lang_options_for_select(false), Setting.default_language) %></p>
16
17 <p><label><%= l(:setting_date_format) %></label>
18 <%= 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>
19
20 <p><label><%= l(:setting_time_format) %></label>
21 <%= 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>
22
23 <p><label><%= l(:setting_attachment_max_size) %></label>
24 <%= text_field_tag 'settings[attachment_max_size]', Setting.attachment_max_size, :size => 6 %> KB</p>
25
26 <p><label><%= l(:setting_per_page_options) %></label>
27 <%= text_field_tag 'settings[per_page_options]', Setting.per_page_options_array.join(', '), :size => 20 %><br /><em><%= l(:text_comma_separated) %></em></p>
28
29 <p><label><%= l(:setting_host_name) %></label>
30 <%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %></p>
31
32 <p><label><%= l(:setting_protocol) %></label>
33 <%= select_tag 'settings[protocol]', options_for_select(['http', 'https'], Setting.protocol) %></p>
34
35 <p><label><%= l(:setting_text_formatting) %></label>
36 <%= select_tag 'settings[text_formatting]', options_for_select([[l(:label_none), "0"], ["textile", "textile"]], Setting.text_formatting) %></p>
37
38 <p><label><%= l(:setting_wiki_compression) %></label>
39 <%= select_tag 'settings[wiki_compression]', options_for_select( [[l(:label_none), 0], ["gzip", "gzip"]], Setting.wiki_compression) %></p>
40
41 <p><label><%= l(:setting_feeds_limit) %></label>
42 <%= text_field_tag 'settings[feeds_limit]', Setting.feeds_limit, :size => 6 %></p>
43 </div>
44
45 <%= submit_tag l(:button_save) %>
46 <% end %>
@@ -0,0 +1,20
1 <% form_tag({:action => 'edit', :tab => 'issues'}) do %>
2
3 <div class="box tabular settings">
4 <p><label><%= l(:setting_cross_project_issue_relations) %></label>
5 <%= check_box_tag 'settings[cross_project_issue_relations]', 1, Setting.cross_project_issue_relations? %><%= hidden_field_tag 'settings[cross_project_issue_relations]', 0 %></p>
6
7 <p><label><%= l(:setting_issues_export_limit) %></label>
8 <%= text_field_tag 'settings[issues_export_limit]', Setting.issues_export_limit, :size => 6 %></p>
9 </div>
10
11 <fieldset class="box"><legend><%= l(:setting_issue_list_default_columns) %></legend>
12 <%= hidden_field_tag 'settings[issue_list_default_columns][]', '' %>
13 <p><% Query.new.available_columns.each do |column| %>
14 <label><%= check_box_tag 'settings[issue_list_default_columns][]', column.name, Setting.issue_list_default_columns.include?(column.name.to_s) %>
15 <%= column.caption %></label>
16 <% end %></p>
17 </fieldset>
18
19 <%= submit_tag l(:button_save) %>
20 <% end %>
@@ -0,0 +1,26
1 <% form_tag({:action => 'edit', :tab => 'repositories'}) do %>
2
3 <div class="box tabular settings">
4 <p><label><%= l(:setting_autofetch_changesets) %></label>
5 <%= check_box_tag 'settings[autofetch_changesets]', 1, Setting.autofetch_changesets? %><%= hidden_field_tag 'settings[autofetch_changesets]', 0 %></p>
6
7 <p><label><%= l(:setting_sys_api_enabled) %></label>
8 <%= check_box_tag 'settings[sys_api_enabled]', 1, Setting.sys_api_enabled? %><%= hidden_field_tag 'settings[sys_api_enabled]', 0 %></p>
9
10 <p><label><%= l(:setting_repositories_encodings) %></label>
11 <%= text_field_tag 'settings[repositories_encodings]', Setting.repositories_encodings, :size => 60 %><br /><em><%= l(:text_comma_separated) %></em></p>
12 </div>
13
14 <fieldset class="box tabular settings"><legend><%= l(:text_issues_ref_in_commit_messages) %></legend>
15 <p><label><%= l(:setting_commit_ref_keywords) %></label>
16 <%= text_field_tag 'settings[commit_ref_keywords]', Setting.commit_ref_keywords, :size => 30 %><br /><em><%= l(:text_comma_separated) %></em></p>
17
18 <p><label><%= l(:setting_commit_fix_keywords) %></label>
19 <%= text_field_tag 'settings[commit_fix_keywords]', Setting.commit_fix_keywords, :size => 30 %>
20 &nbsp;<%= 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) %>
21 &nbsp;<%= 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 <br /><em><%= l(:text_comma_separated) %></em></p>
23 </fieldset>
24
25 <%= submit_tag l(:button_save) %>
26 <% end %>
@@ -0,0 +1,53
1 # redMine - project management software
2 # Copyright (C) 2006-2007 Jean-Philippe Lang
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
18 require File.dirname(__FILE__) + '/../test_helper'
19 require 'settings_controller'
20
21 # Re-raise errors caught by the controller.
22 class SettingsController; def rescue_action(e) raise e end; end
23
24 class SettingsControllerTest < Test::Unit::TestCase
25 fixtures :users
26
27 def setup
28 @controller = SettingsController.new
29 @request = ActionController::TestRequest.new
30 @response = ActionController::TestResponse.new
31 User.current = nil
32 @request.session[:user_id] = 1 # admin
33 end
34
35 def test_get_edit
36 get :edit
37 assert_response :success
38 assert_template 'edit'
39 end
40
41 def test_post_edit_notifications
42 post :edit, :settings => {:mail_from => 'functional@test.foo',
43 :bcc_recipients => '0',
44 :notified_events => %w(issue_added issue_updated news_added),
45 :emails_footer => 'Test footer'
46 }
47 assert_redirected_to 'settings/edit'
48 assert_equal 'functional@test.foo', Setting.mail_from
49 assert !Setting.bcc_recipients?
50 assert_equal %w(issue_added issue_updated news_added), Setting.notified_events
51 assert_equal 'Test footer', Setting.emails_footer
52 end
53 end
@@ -45,17 +45,6 class AdminController < ApplicationController
45
45
46 render :action => "projects", :layout => false if request.xhr?
46 render :action => "projects", :layout => false if request.xhr?
47 end
47 end
48
49 def mail_options
50 @notifiables = %w(issue_added issue_updated news_added document_added file_added message_posted)
51 if request.post?
52 settings = (params[:settings] || {}).dup.symbolize_keys
53 settings[:notified_events] ||= []
54 settings.each { |name, value| Setting[name] = value }
55 flash[:notice] = l(:notice_successful_update)
56 redirect_to :controller => 'admin', :action => 'mail_options'
57 end
58 end
59
48
60 # Loads the default configuration
49 # Loads the default configuration
61 # (roles, trackers, statuses, workflow, enumerations)
50 # (roles, trackers, statuses, workflow, enumerations)
@@ -82,7 +71,7 class AdminController < ApplicationController
82 flash[:error] = l(:notice_email_error, e.message)
71 flash[:error] = l(:notice_email_error, e.message)
83 end
72 end
84 ActionMailer::Base.raise_delivery_errors = raise_delivery_errors
73 ActionMailer::Base.raise_delivery_errors = raise_delivery_errors
85 redirect_to :action => 'mail_options'
74 redirect_to :controller => 'settings', :action => 'edit', :tab => 'notifications'
86 end
75 end
87
76
88 def info
77 def info
@@ -25,9 +25,16 class SettingsController < ApplicationController
25 end
25 end
26
26
27 def edit
27 def edit
28 if request.post? and params[:settings] and params[:settings].is_a? Hash
28 @notifiables = %w(issue_added issue_updated news_added document_added file_added message_posted)
29 params[:settings].each { |name, value| Setting[name] = value }
29 if request.post? && params[:settings] && params[:settings].is_a?(Hash)
30 redirect_to :action => 'edit' and return
30 settings = (params[:settings] || {}).dup.symbolize_keys
31 settings.each do |name, value|
32 # remove blank values in array settings
33 value.delete_if {|v| v.blank? } if value.is_a?(Array)
34 Setting[name] = value
35 end
36 flash[:notice] = l(:notice_successful_update)
37 redirect_to :action => 'edit', :tab => params[:tab]
31 end
38 end
32 end
39 end
33
40
@@ -16,4 +16,12
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 module SettingsHelper
18 module SettingsHelper
19 def administration_settings_tabs
20 tabs = [{:name => 'general', :partial => 'settings/general', :label => :label_general},
21 {:name => 'authentication', :partial => 'settings/authentication', :label => :label_authentication},
22 {:name => 'issues', :partial => 'settings/issues', :label => :label_issue_tracking},
23 {:name => 'notifications', :partial => 'settings/notifications', :label => l(:field_mail_notification)},
24 {:name => 'repositories', :partial => 'settings/repositories', :label => :label_repository_plural}
25 ]
26 end
19 end
27 end
@@ -30,14 +30,6
30 <%= link_to l(:label_enumerations), :controller => 'enumerations' %>
30 <%= link_to l(:label_enumerations), :controller => 'enumerations' %>
31 </p>
31 </p>
32
32
33 <p class="icon22 icon22-notifications">
34 <%= link_to l(:field_mail_notification), :controller => 'admin', :action => 'mail_options' %>
35 </p>
36
37 <p class="icon22 icon22-authent">
38 <%= link_to l(:label_authentication), :controller => 'auth_sources' %>
39 </p>
40
41 <p class="icon22 icon22-settings">
33 <p class="icon22 icon22-settings">
42 <%= link_to l(:label_settings), :controller => 'settings' %>
34 <%= link_to l(:label_settings), :controller => 'settings' %>
43 </p>
35 </p>
@@ -1,25 +1,20
1 <div class="contextual">
1 <% form_tag({:action => 'edit', :tab => 'notifications'}) do %>
2 <%= link_to l(:label_send_test_email), :action => 'test_email' %>
3 </div>
4
5 <h2><%=l(:field_mail_notification)%></h2>
6
2
7 <% form_tag({:action => 'mail_options'}, :id => 'mail-options-form') do %>
3 <div class="box tabular settings">
8
9 <fieldset class="box tabular settings"><legend><%=l(:label_settings)%></legend>
10 <p><label><%= l(:setting_mail_from) %></label>
4 <p><label><%= l(:setting_mail_from) %></label>
11 <%= text_field_tag 'settings[mail_from]', Setting.mail_from, :size => 60 %></p>
5 <%= text_field_tag 'settings[mail_from]', Setting.mail_from, :size => 60 %></p>
12
6
13 <p><label><%= l(:setting_bcc_recipients) %></label>
7 <p><label><%= l(:setting_bcc_recipients) %></label>
14 <%= check_box_tag 'settings[bcc_recipients]', 1, Setting.bcc_recipients? %>
8 <%= check_box_tag 'settings[bcc_recipients]', 1, Setting.bcc_recipients? %>
15 <%= hidden_field_tag 'settings[bcc_recipients]', 0 %></p>
9 <%= hidden_field_tag 'settings[bcc_recipients]', 0 %></p>
16 </fieldset>
10 </div>
17
11
18 <fieldset class="box"><legend><%=l(:text_select_mail_notifications)%></legend>
12 <fieldset class="box"><legend><%=l(:text_select_mail_notifications)%></legend>
19 <% @notifiables.each do |notifiable| %>
13 <% @notifiables.each do |notifiable| %>
20 <label><%= check_box_tag 'settings[notified_events][]', notifiable, Setting.notified_events.include?(notifiable) %>
14 <label><%= check_box_tag 'settings[notified_events][]', notifiable, Setting.notified_events.include?(notifiable) %>
21 <%= notifiable.humanize %></label><br />
15 <%= notifiable.humanize %></label><br />
22 <% end %>
16 <% end %>
17 <%= hidden_field_tag 'settings[notified_events][]', '' %>
23 <p><%= check_all_links('mail-options-form') %></p>
18 <p><%= check_all_links('mail-options-form') %></p>
24 </fieldset>
19 </fieldset>
25
20
@@ -27,7 +22,9
27 <%= text_area_tag 'settings[emails_footer]', Setting.emails_footer, :class => 'wiki-edit', :rows => 5 %>
22 <%= text_area_tag 'settings[emails_footer]', Setting.emails_footer, :class => 'wiki-edit', :rows => 5 %>
28 </fieldset>
23 </fieldset>
29
24
25 <div style="float:right;">
26 <%= link_to l(:label_send_test_email), :controller => 'admin', :action => 'test_email' %>
27 </div>
28
30 <%= submit_tag l(:button_save) %>
29 <%= submit_tag l(:button_save) %>
31 <% end %>
30 <% end %>
32
33 <% html_title(l(:field_mail_notification)) -%>
@@ -1,105 +1,18
1 <h2><%= l(:label_settings) %></h2>
1 <h2><%= l(:label_settings) %></h2>
2
2
3 <% form_tag({:action => 'edit'}) do %>
3 <div class="tabs">
4 <div class="box tabular settings">
4 <ul>
5 <p><label><%= l(:setting_app_title) %></label>
5 <% administration_settings_tabs.each do |tab| -%>
6 <%= text_field_tag 'settings[app_title]', Setting.app_title, :size => 30 %></p>
6 <li><%= link_to l(tab[:label]), {}, :id => "tab-#{tab[:name]}", :onclick => "showTab('#{tab[:name]}'); this.blur(); return false;" %></li>
7
7 <% end -%>
8 <p><label><%= l(:setting_app_subtitle) %></label>
8 </ul>
9 <%= text_field_tag 'settings[app_subtitle]', Setting.app_subtitle, :size => 60 %></p>
10
11 <p><label><%= l(:setting_welcome_text) %></label>
12 <%= text_area_tag 'settings[welcome_text]', Setting.welcome_text, :cols => 60, :rows => 5, :class => 'wiki-edit' %></p>
13 <%= wikitoolbar_for 'settings[welcome_text]' %>
14
15 <p><label><%= l(:label_theme) %></label>
16 <%= select_tag 'settings[ui_theme]', options_for_select( ([[l(:label_default), '']] + Redmine::Themes.themes.collect {|t| [t.name, t.id]}), Setting.ui_theme) %></p>
17
18 <p><label><%= l(:setting_default_language) %></label>
19 <%= select_tag 'settings[default_language]', options_for_select( lang_options_for_select(false), Setting.default_language) %></p>
20
21 <p><label><%= l(:setting_date_format) %></label>
22 <%= 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>
23
24 <p><label><%= l(:setting_time_format) %></label>
25 <%= 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>
26
27 <p><label><%= l(:setting_attachment_max_size) %></label>
28 <%= text_field_tag 'settings[attachment_max_size]', Setting.attachment_max_size, :size => 6 %> KB</p>
29
30 <p><label><%= l(:setting_per_page_options) %></label>
31 <%= text_field_tag 'settings[per_page_options]', Setting.per_page_options_array.join(', '), :size => 20 %><br /><em><%= l(:text_comma_separated) %></em></p>
32
33 <p><label><%= l(:setting_issues_export_limit) %></label>
34 <%= text_field_tag 'settings[issues_export_limit]', Setting.issues_export_limit, :size => 6 %></p>
35
36 <p><label><%= l(:setting_cross_project_issue_relations) %></label>
37 <%= check_box_tag 'settings[cross_project_issue_relations]', 1, Setting.cross_project_issue_relations? %><%= hidden_field_tag 'settings[cross_project_issue_relations]', 0 %></p>
38
39 <p><label><%= l(:setting_host_name) %></label>
40 <%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %></p>
41
42 <p><label><%= l(:setting_protocol) %></label>
43 <%= select_tag 'settings[protocol]', options_for_select(['http', 'https'], Setting.protocol) %></p>
44
45 <p><label><%= l(:setting_text_formatting) %></label>
46 <%= select_tag 'settings[text_formatting]', options_for_select([[l(:label_none), "0"], ["textile", "textile"]], Setting.text_formatting) %></p>
47
48 <p><label><%= l(:setting_wiki_compression) %></label>
49 <%= select_tag 'settings[wiki_compression]', options_for_select( [[l(:label_none), 0], ["gzip", "gzip"]], Setting.wiki_compression) %></p>
50
51 <p><label><%= l(:setting_feeds_limit) %></label>
52 <%= text_field_tag 'settings[feeds_limit]', Setting.feeds_limit, :size => 6 %></p>
53
54 <p><label><%= l(:setting_autofetch_changesets) %></label>
55 <%= check_box_tag 'settings[autofetch_changesets]', 1, Setting.autofetch_changesets? %><%= hidden_field_tag 'settings[autofetch_changesets]', 0 %></p>
56
57 <p><label><%= l(:setting_sys_api_enabled) %></label>
58 <%= check_box_tag 'settings[sys_api_enabled]', 1, Setting.sys_api_enabled? %><%= hidden_field_tag 'settings[sys_api_enabled]', 0 %></p>
59
60 <p><label><%= l(:setting_repositories_encodings) %></label>
61 <%= text_field_tag 'settings[repositories_encodings]', Setting.repositories_encodings, :size => 60 %><br /><em><%= l(:text_comma_separated) %></em></p>
62 </div>
9 </div>
63
10
64 <fieldset class="box"><legend><%= l(:setting_issue_list_default_columns) %></legend>
11 <% administration_settings_tabs.each do |tab| %>
65 <%= hidden_field_tag 'settings[issue_list_default_columns][]', '' %>
12 <%= content_tag('div', render(:partial => tab[:partial]), :id => "tab-content-#{tab[:name]}", :class => 'tab-content') %>
66 <p><% Query.new.available_columns.each do |column| %>
67 <label><%= check_box_tag 'settings[issue_list_default_columns][]', column.name, Setting.issue_list_default_columns.include?(column.name.to_s) %>
68 <%= column.caption %></label>
69 <% end %></p>
70 </fieldset>
71
72 <fieldset class="box tabular"><legend><%= l(:label_authentication) %></legend>
73 <p><label><%= l(:setting_login_required) %></label>
74 <%= check_box_tag 'settings[login_required]', 1, Setting.login_required? %><%= hidden_field_tag 'settings[login_required]', 0 %></p>
75
76 <p><label><%= l(:setting_autologin) %></label>
77 <%= select_tag 'settings[autologin]', options_for_select( [[l(:label_disabled), "0"]] + [1, 7, 30, 365].collect{|days| [lwr(:actionview_datehelper_time_in_words_day, days), days.to_s]}, Setting.autologin) %></p>
78
79 <p><label><%= l(:setting_self_registration) %></label>
80 <%= select_tag 'settings[self_registration]',
81 options_for_select( [[l(:label_disabled), "0"],
82 [l(:label_registration_activation_by_email), "1"],
83 [l(:label_registration_manual_activation), "2"],
84 [l(:label_registration_automatic_activation), "3"]
85 ], Setting.self_registration ) %></p>
86
87 <p><label><%= l(:label_password_lost) %></label>
88 <%= check_box_tag 'settings[lost_password]', 1, Setting.lost_password? %><%= hidden_field_tag 'settings[lost_password]', 0 %></p>
89 </fieldset>
90
91 <fieldset class="box tabular"><legend><%= l(:text_issues_ref_in_commit_messages) %></legend>
92 <p><label><%= l(:setting_commit_ref_keywords) %></label>
93 <%= text_field_tag 'settings[commit_ref_keywords]', Setting.commit_ref_keywords, :size => 30 %><br /><em><%= l(:text_comma_separated) %></em></p>
94
95 <p><label><%= l(:setting_commit_fix_keywords) %></label>
96 <%= text_field_tag 'settings[commit_fix_keywords]', Setting.commit_fix_keywords, :size => 30 %>
97 &nbsp;<%= 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) %>
98 &nbsp;<%= 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) %>
99 <br /><em><%= l(:text_comma_separated) %></em></p>
100 </fieldset>
101
102 <%= submit_tag l(:button_save) %>
103 <% end %>
13 <% end %>
104
14
105 <% html_title(l(:label_settings)) -%>
15 <%= tab = params[:tab] ? h(params[:tab]) : administration_settings_tabs.first[:name]
16 javascript_tag "showTab('#{tab}');" %>
17
18 <% html_title(l(:label_settings), l(:label_administration)) -%>
@@ -559,3 +559,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
560 button_update: Update
560 button_update: Update
561 label_change_properties: Change properties
561 label_change_properties: Change properties
562 label_general: General
563 label_repository_plural: Repositories
@@ -559,3 +559,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
560 button_update: Update
560 button_update: Update
561 label_change_properties: Change properties
561 label_change_properties: Change properties
562 label_general: General
563 label_repository_plural: Repositories
@@ -559,3 +559,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
560 button_update: Update
560 button_update: Update
561 label_change_properties: Change properties
561 label_change_properties: Change properties
562 label_general: General
563 label_repository_plural: Repositories
@@ -353,6 +353,7 label_contains: contains
353 label_not_contains: doesn't contain
353 label_not_contains: doesn't contain
354 label_day_plural: days
354 label_day_plural: days
355 label_repository: Repository
355 label_repository: Repository
356 label_repository_plural: Repositories
356 label_browse: Browse
357 label_browse: Browse
357 label_modification: %d change
358 label_modification: %d change
358 label_modification_plural: %d changes
359 label_modification_plural: %d changes
@@ -463,6 +464,7 label_registration_automatic_activation: automatic account activation
463 label_display_per_page: 'Per page: %s'
464 label_display_per_page: 'Per page: %s'
464 label_age: Age
465 label_age: Age
465 label_change_properties: Change properties
466 label_change_properties: Change properties
467 label_general: General
466
468
467 button_login: Login
469 button_login: Login
468 button_submit: Submit
470 button_submit: Submit
@@ -562,3 +562,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
562 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
562 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
563 button_update: Update
563 button_update: Update
564 label_change_properties: Change properties
564 label_change_properties: Change properties
565 label_general: General
566 label_repository_plural: Repositories
@@ -353,6 +353,7 label_contains: contient
353 label_not_contains: ne contient pas
353 label_not_contains: ne contient pas
354 label_day_plural: jours
354 label_day_plural: jours
355 label_repository: Dépôt
355 label_repository: Dépôt
356 label_repository_plural: Dépôts
356 label_browse: Parcourir
357 label_browse: Parcourir
357 label_modification: %d modification
358 label_modification: %d modification
358 label_modification_plural: %d modifications
359 label_modification_plural: %d modifications
@@ -463,6 +464,7 label_registration_automatic_activation: activation automatique du compte
463 label_display_per_page: 'Par page: %s'
464 label_display_per_page: 'Par page: %s'
464 label_age: Age
465 label_age: Age
465 label_change_properties: Changer les propriétés
466 label_change_properties: Changer les propriétés
467 label_general: Général
466
468
467 button_login: Connexion
469 button_login: Connexion
468 button_submit: Soumettre
470 button_submit: Soumettre
@@ -559,3 +559,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
560 button_update: Update
560 button_update: Update
561 label_change_properties: Change properties
561 label_change_properties: Change properties
562 label_general: General
563 label_repository_plural: Repositories
@@ -559,3 +559,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
560 button_update: Update
560 button_update: Update
561 label_change_properties: Change properties
561 label_change_properties: Change properties
562 label_general: General
563 label_repository_plural: Repositories
@@ -560,3 +560,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
560 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
560 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
561 button_update: Update
561 button_update: Update
562 label_change_properties: Change properties
562 label_change_properties: Change properties
563 label_general: General
564 label_repository_plural: Repositories
@@ -559,3 +559,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
560 button_update: Update
560 button_update: Update
561 label_change_properties: Change properties
561 label_change_properties: Change properties
562 label_general: General
563 label_repository_plural: Repositories
@@ -560,3 +560,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
560 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
560 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
561 button_update: Update
561 button_update: Update
562 label_change_properties: Change properties
562 label_change_properties: Change properties
563 label_general: General
564 label_repository_plural: Repositories
@@ -559,3 +559,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
560 button_update: Update
560 button_update: Update
561 label_change_properties: Change properties
561 label_change_properties: Change properties
562 label_general: General
563 label_repository_plural: Repositories
@@ -559,3 +559,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
560 button_update: Update
560 button_update: Update
561 label_change_properties: Change properties
561 label_change_properties: Change properties
562 label_general: General
563 label_repository_plural: Repositories
@@ -559,3 +559,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
560 button_update: Update
560 button_update: Update
561 label_change_properties: Change properties
561 label_change_properties: Change properties
562 label_general: General
563 label_repository_plural: Repositories
@@ -559,3 +559,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
560 button_update: Update
560 button_update: Update
561 label_change_properties: Change properties
561 label_change_properties: Change properties
562 label_general: General
563 label_repository_plural: Repositories
@@ -559,3 +559,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
560 button_update: Update
560 button_update: Update
561 label_change_properties: Change properties
561 label_change_properties: Change properties
562 label_general: General
563 label_repository_plural: Repositories
@@ -560,3 +560,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
560 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
560 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
561 button_update: Update
561 button_update: Update
562 label_change_properties: Change properties
562 label_change_properties: Change properties
563 label_general: General
564 label_repository_plural: Repositories
@@ -560,3 +560,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
560 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
560 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
561 button_update: Update
561 button_update: Update
562 label_change_properties: Change properties
562 label_change_properties: Change properties
563 label_general: General
564 label_repository_plural: Repositories
@@ -559,3 +559,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
559 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
560 button_update: Update
560 button_update: Update
561 label_change_properties: Change properties
561 label_change_properties: Change properties
562 label_general: General
563 label_repository_plural: Repositories
@@ -562,3 +562,5 text_no_configuration_data: "Roles, trackers, issue statuses and workflow have n
562 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
562 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
563 button_update: Update
563 button_update: Update
564 label_change_properties: Change properties
564 label_change_properties: Change properties
565 label_general: General
566 label_repository_plural: Repositories
@@ -51,21 +51,9 class AdminControllerTest < Test::Unit::TestCase
51 assert IssueStatus.find_by_name('Nouveau')
51 assert IssueStatus.find_by_name('Nouveau')
52 end
52 end
53
53
54 def test_get_mail_options
55 get :mail_options
56 assert_response :success
57 assert_template 'mail_options'
58 end
59
60 def test_post_mail_options
61 post :mail_options, :settings => {'mail_from' => 'functional@test.foo'}
62 assert_redirected_to 'admin/mail_options'
63 assert_equal 'functional@test.foo', Setting.mail_from
64 end
65
66 def test_test_email
54 def test_test_email
67 get :test_email
55 get :test_email
68 assert_redirected_to 'admin/mail_options'
56 assert_redirected_to 'settings/edit'
69 mail = ActionMailer::Base.deliveries.last
57 mail = ActionMailer::Base.deliveries.last
70 assert_kind_of TMail::Mail, mail
58 assert_kind_of TMail::Mail, mail
71 user = User.find(1)
59 user = User.find(1)
General Comments 0
You need to be logged in to leave comments. Login now