Index: trunk/app/controllers/admin_controller.rb
===================================================================
--- trunk/app/controllers/admin_controller.rb	(revision 1045)
+++ trunk/app/controllers/admin_controller.rb	(revision 1046)
@@ -45,17 +45,6 @@
 
     render :action => "projects", :layout => false if request.xhr?
   end
-
-  def mail_options
-    @notifiables = %w(issue_added issue_updated news_added document_added file_added message_posted)
-    if request.post?
-      settings = (params[:settings] || {}).dup.symbolize_keys
-      settings[:notified_events] ||= []
-      settings.each { |name, value| Setting[name] = value }
-      flash[:notice] = l(:notice_successful_update)
-      redirect_to :controller => 'admin', :action => 'mail_options'
-    end
-  end
   
   # Loads the default configuration
   # (roles, trackers, statuses, workflow, enumerations)
@@ -82,7 +71,7 @@
       flash[:error] = l(:notice_email_error, e.message)
     end
     ActionMailer::Base.raise_delivery_errors = raise_delivery_errors
-    redirect_to :action => 'mail_options'
+    redirect_to :controller => 'settings', :action => 'edit', :tab => 'notifications'
   end
   
   def info
Index: trunk/app/controllers/settings_controller.rb
===================================================================
--- trunk/app/controllers/settings_controller.rb	(revision 1045)
+++ trunk/app/controllers/settings_controller.rb	(revision 1046)
@@ -25,9 +25,16 @@
   end
 
   def edit
-    if request.post? and params[:settings] and params[:settings].is_a? Hash
-      params[:settings].each { |name, value| Setting[name] = value }
-      redirect_to :action => 'edit' and return
+    @notifiables = %w(issue_added issue_updated news_added document_added file_added message_posted)
+    if request.post? && params[:settings] && params[:settings].is_a?(Hash)
+      settings = (params[:settings] || {}).dup.symbolize_keys
+      settings.each do |name, value|
+        # remove blank values in array settings
+        value.delete_if {|v| v.blank? } if value.is_a?(Array)
+        Setting[name] = value
+      end
+      flash[:notice] = l(:notice_successful_update)
+      redirect_to :action => 'edit', :tab => params[:tab]
     end
   end
   
Index: trunk/app/helpers/settings_helper.rb
===================================================================
--- trunk/app/helpers/settings_helper.rb	(revision 1045)
+++ trunk/app/helpers/settings_helper.rb	(revision 1046)
@@ -16,4 +16,12 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 module SettingsHelper
+  def administration_settings_tabs
+    tabs = [{:name => 'general', :partial => 'settings/general', :label => :label_general},
+            {:name => 'authentication', :partial => 'settings/authentication', :label => :label_authentication},
+            {:name => 'issues', :partial => 'settings/issues', :label => :label_issue_tracking},
+            {:name => 'notifications', :partial => 'settings/notifications', :label => l(:field_mail_notification)},
+            {:name => 'repositories', :partial => 'settings/repositories', :label => :label_repository_plural}
+            ]
+  end
 end
Index: trunk/app/views/admin/mail_options.rhtml
===================================================================
--- trunk/app/views/admin/mail_options.rhtml	(revision 1045)
+++ trunk/app/views/admin/mail_options.rhtml	(nonexistent)
@@ -1,33 +0,0 @@
-<div class="contextual">
-<%= link_to l(:label_send_test_email), :action => 'test_email' %>
-</div>
-
-<h2><%=l(:field_mail_notification)%></h2>
-
-<% form_tag({:action => 'mail_options'}, :id => 'mail-options-form') do %>
-
-<fieldset class="box tabular settings"><legend><%=l(:label_settings)%></legend>
-<p><label><%= l(:setting_mail_from) %></label>
-<%= text_field_tag 'settings[mail_from]', Setting.mail_from, :size => 60 %></p>
-
-<p><label><%= l(:setting_bcc_recipients) %></label>
-<%= check_box_tag 'settings[bcc_recipients]', 1, Setting.bcc_recipients? %>
-<%= hidden_field_tag 'settings[bcc_recipients]', 0 %></p>
-</fieldset>
-
-<fieldset class="box"><legend><%=l(:text_select_mail_notifications)%></legend>
-<% @notifiables.each do |notifiable| %>
-  <label><%= check_box_tag 'settings[notified_events][]', notifiable, Setting.notified_events.include?(notifiable) %>
-  <%= notifiable.humanize %></label><br />
-<% end %>
-<p><%= check_all_links('mail-options-form') %></p>
-</fieldset>
-
-<fieldset class="box"><legend><%= l(:setting_emails_footer) %></legend>
-<%= text_area_tag 'settings[emails_footer]', Setting.emails_footer, :class => 'wiki-edit', :rows => 5 %>
-</fieldset>
-
-<%= submit_tag l(:button_save) %>
-<% end %>
-
-<% html_title(l(:field_mail_notification)) -%>

Property changes on: trunk/app/views/admin/mail_options.rhtml
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Index: trunk/app/views/admin/index.rhtml
===================================================================
--- trunk/app/views/admin/index.rhtml	(revision 1045)
+++ trunk/app/views/admin/index.rhtml	(revision 1046)
@@ -30,14 +30,6 @@
 <%= link_to l(:label_enumerations), :controller => 'enumerations' %>
 </p>
 
-<p class="icon22 icon22-notifications">
-<%= link_to l(:field_mail_notification), :controller => 'admin', :action => 'mail_options' %>
-</p>
-
-<p class="icon22 icon22-authent">
-<%= link_to l(:label_authentication), :controller => 'auth_sources' %>
-</p>
-
 <p class="icon22 icon22-settings">
 <%= link_to l(:label_settings), :controller => 'settings' %>
 </p>
Index: trunk/app/views/settings/_authentication.rhtml
===================================================================
--- trunk/app/views/settings/_authentication.rhtml	(nonexistent)
+++ trunk/app/views/settings/_authentication.rhtml	(revision 1046)
@@ -0,0 +1,27 @@
+<% form_tag({:action => 'edit', :tab => 'authentication'}) do %>
+
+<div class="box tabular settings">
+<p><label><%= l(:setting_login_required) %></label>
+<%= check_box_tag 'settings[login_required]', 1, Setting.login_required? %><%= hidden_field_tag 'settings[login_required]', 0 %></p>
+
+<p><label><%= l(:setting_autologin) %></label>
+<%= 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>
+
+<p><label><%= l(:setting_self_registration) %></label>
+<%= select_tag 'settings[self_registration]',
+      options_for_select( [[l(:label_disabled), "0"],
+                           [l(:label_registration_activation_by_email), "1"],
+                           [l(:label_registration_manual_activation), "2"],
+                           [l(:label_registration_automatic_activation), "3"]
+                          ], Setting.self_registration ) %></p>
+
+<p><label><%= l(:label_password_lost) %></label>
+<%= check_box_tag 'settings[lost_password]', 1, Setting.lost_password? %><%= hidden_field_tag 'settings[lost_password]', 0 %></p>
+</div>
+
+<div style="float:right;">
+    <%= link_to 'Manage LDAP authentication...', :controller => 'auth_sources', :action => 'list' %>
+</div>
+
+<%= submit_tag l(:button_save) %>
+<% end %>

Property changes on: trunk/app/views/settings/_authentication.rhtml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: trunk/app/views/settings/_general.rhtml
===================================================================
--- trunk/app/views/settings/_general.rhtml	(nonexistent)
+++ trunk/app/views/settings/_general.rhtml	(revision 1046)
@@ -0,0 +1,46 @@
+<% form_tag({:action => 'edit'}) do %>
+
+<div class="box tabular settings">
+<p><label><%= l(:setting_app_title) %></label>
+<%= text_field_tag 'settings[app_title]', Setting.app_title, :size => 30 %></p>
+
+<p><label><%= l(:setting_welcome_text) %></label>
+<%= text_area_tag 'settings[welcome_text]', Setting.welcome_text, :cols => 60, :rows => 5, :class => 'wiki-edit' %></p>
+<%= wikitoolbar_for 'settings[welcome_text]' %>
+
+<p><label><%= l(:label_theme) %></label>
+<%= select_tag 'settings[ui_theme]', options_for_select( ([[l(:label_default), '']] + Redmine::Themes.themes.collect {|t| [t.name, t.id]}), Setting.ui_theme) %></p>
+
+<p><label><%= l(:setting_default_language) %></label>
+<%= select_tag 'settings[default_language]', options_for_select( lang_options_for_select(false), Setting.default_language) %></p>
+
+<p><label><%= l(:setting_date_format) %></label>
+<%= 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>
+
+<p><label><%= l(:setting_time_format) %></label>
+<%= 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>
+
+<p><label><%= l(:setting_attachment_max_size) %></label>
+<%= text_field_tag 'settings[attachment_max_size]', Setting.attachment_max_size, :size => 6 %> KB</p>
+
+<p><label><%= l(:setting_per_page_options) %></label>
+<%= text_field_tag 'settings[per_page_options]', Setting.per_page_options_array.join(', '), :size => 20 %><br /><em><%= l(:text_comma_separated) %></em></p>
+
+<p><label><%= l(:setting_host_name) %></label>
+<%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %></p>
+
+<p><label><%= l(:setting_protocol) %></label>
+<%= select_tag 'settings[protocol]', options_for_select(['http', 'https'], Setting.protocol) %></p>
+
+<p><label><%= l(:setting_text_formatting) %></label>
+<%= select_tag 'settings[text_formatting]', options_for_select([[l(:label_none), "0"], ["textile", "textile"]], Setting.text_formatting) %></p>
+
+<p><label><%= l(:setting_wiki_compression) %></label>
+<%= select_tag 'settings[wiki_compression]', options_for_select( [[l(:label_none), 0], ["gzip", "gzip"]], Setting.wiki_compression) %></p>
+
+<p><label><%= l(:setting_feeds_limit) %></label>
+<%= text_field_tag 'settings[feeds_limit]', Setting.feeds_limit, :size => 6 %></p>
+</div>
+
+<%= submit_tag l(:button_save) %>
+<% end %>

Property changes on: trunk/app/views/settings/_general.rhtml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: trunk/app/views/settings/_issues.rhtml
===================================================================
--- trunk/app/views/settings/_issues.rhtml	(nonexistent)
+++ trunk/app/views/settings/_issues.rhtml	(revision 1046)
@@ -0,0 +1,20 @@
+<% form_tag({:action => 'edit', :tab => 'issues'}) do %>
+
+<div class="box tabular settings">
+<p><label><%= l(:setting_cross_project_issue_relations) %></label>
+<%= check_box_tag 'settings[cross_project_issue_relations]', 1, Setting.cross_project_issue_relations? %><%= hidden_field_tag 'settings[cross_project_issue_relations]', 0 %></p>
+
+<p><label><%= l(:setting_issues_export_limit) %></label>
+<%= text_field_tag 'settings[issues_export_limit]', Setting.issues_export_limit, :size => 6 %></p>
+</div>
+
+<fieldset class="box"><legend><%= l(:setting_issue_list_default_columns) %></legend>
+<%= hidden_field_tag 'settings[issue_list_default_columns][]', '' %>
+<p><% Query.new.available_columns.each do |column| %>
+  <label><%= check_box_tag 'settings[issue_list_default_columns][]', column.name, Setting.issue_list_default_columns.include?(column.name.to_s) %>
+  <%= column.caption %></label>
+<% end %></p>
+</fieldset>
+
+<%= submit_tag l(:button_save) %>
+<% end %>

Property changes on: trunk/app/views/settings/_issues.rhtml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: trunk/app/views/settings/_notifications.rhtml
===================================================================
--- trunk/app/views/settings/_notifications.rhtml	(nonexistent)
+++ trunk/app/views/settings/_notifications.rhtml	(revision 1046)
@@ -0,0 +1,30 @@
+<% form_tag({:action => 'edit', :tab => 'notifications'}) do %>
+
+<div class="box tabular settings">
+<p><label><%= l(:setting_mail_from) %></label>
+<%= text_field_tag 'settings[mail_from]', Setting.mail_from, :size => 60 %></p>
+
+<p><label><%= l(:setting_bcc_recipients) %></label>
+<%= check_box_tag 'settings[bcc_recipients]', 1, Setting.bcc_recipients? %>
+<%= hidden_field_tag 'settings[bcc_recipients]', 0 %></p>
+</div>
+
+<fieldset class="box"><legend><%=l(:text_select_mail_notifications)%></legend>
+<% @notifiables.each do |notifiable| %>
+  <label><%= check_box_tag 'settings[notified_events][]', notifiable, Setting.notified_events.include?(notifiable) %>
+  <%= notifiable.humanize %></label><br />
+<% end %>
+<%= hidden_field_tag 'settings[notified_events][]', '' %>
+<p><%= check_all_links('mail-options-form') %></p>
+</fieldset>
+
+<fieldset class="box"><legend><%= l(:setting_emails_footer) %></legend>
+<%= text_area_tag 'settings[emails_footer]', Setting.emails_footer, :class => 'wiki-edit', :rows => 5 %>
+</fieldset>
+
+<div style="float:right;">
+<%= link_to l(:label_send_test_email), :controller => 'admin', :action => 'test_email' %>
+</div>
+
+<%= submit_tag l(:button_save) %>
+<% end %>

Property changes on: trunk/app/views/settings/_notifications.rhtml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: trunk/app/views/settings/_repositories.rhtml
===================================================================
--- trunk/app/views/settings/_repositories.rhtml	(nonexistent)
+++ trunk/app/views/settings/_repositories.rhtml	(revision 1046)
@@ -0,0 +1,26 @@
+<% form_tag({:action => 'edit', :tab => 'repositories'}) do %>
+
+<div class="box tabular settings">
+<p><label><%= l(:setting_autofetch_changesets) %></label>
+<%= check_box_tag 'settings[autofetch_changesets]', 1, Setting.autofetch_changesets? %><%= hidden_field_tag 'settings[autofetch_changesets]', 0 %></p>
+
+<p><label><%= l(:setting_sys_api_enabled) %></label>
+<%= check_box_tag 'settings[sys_api_enabled]', 1, Setting.sys_api_enabled? %><%= hidden_field_tag 'settings[sys_api_enabled]', 0 %></p>
+
+<p><label><%= l(:setting_repositories_encodings) %></label>
+<%= text_field_tag 'settings[repositories_encodings]', Setting.repositories_encodings, :size => 60 %><br /><em><%= l(:text_comma_separated) %></em></p>
+</div>
+
+<fieldset class="box tabular settings"><legend><%= l(:text_issues_ref_in_commit_messages) %></legend>
+<p><label><%= l(:setting_commit_ref_keywords) %></label>
+<%= text_field_tag 'settings[commit_ref_keywords]', Setting.commit_ref_keywords, :size => 30 %><br /><em><%= l(:text_comma_separated) %></em></p>
+
+<p><label><%= l(:setting_commit_fix_keywords) %></label>
+<%= text_field_tag 'settings[commit_fix_keywords]', Setting.commit_fix_keywords, :size => 30 %>
+&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) %>
+&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) %>
+<br /><em><%= l(:text_comma_separated) %></em></p>
+</fieldset>
+
+<%= submit_tag l(:button_save) %>
+<% end %>

Property changes on: trunk/app/views/settings/_repositories.rhtml
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: trunk/app/views/settings/edit.rhtml
===================================================================
--- trunk/app/views/settings/edit.rhtml	(revision 1045)
+++ trunk/app/views/settings/edit.rhtml	(revision 1046)
@@ -1,105 +1,18 @@
 <h2><%= l(:label_settings) %></h2>
 
-<% form_tag({:action => 'edit'}) do %>
-<div class="box tabular settings">
-<p><label><%= l(:setting_app_title) %></label>
-<%= text_field_tag 'settings[app_title]', Setting.app_title, :size => 30 %></p>
-
-<p><label><%= l(:setting_app_subtitle) %></label>
-<%= text_field_tag 'settings[app_subtitle]', Setting.app_subtitle, :size => 60 %></p>
-
-<p><label><%= l(:setting_welcome_text) %></label>
-<%= text_area_tag 'settings[welcome_text]', Setting.welcome_text, :cols => 60, :rows => 5, :class => 'wiki-edit' %></p>
-<%= wikitoolbar_for 'settings[welcome_text]' %>
-
-<p><label><%= l(:label_theme) %></label>
-<%= select_tag 'settings[ui_theme]', options_for_select( ([[l(:label_default), '']] + Redmine::Themes.themes.collect {|t| [t.name, t.id]}), Setting.ui_theme) %></p>
-
-<p><label><%= l(:setting_default_language) %></label>
-<%= select_tag 'settings[default_language]', options_for_select( lang_options_for_select(false), Setting.default_language) %></p>
-
-<p><label><%= l(:setting_date_format) %></label>
-<%= 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>
-
-<p><label><%= l(:setting_time_format) %></label>
-<%= 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>
-
-<p><label><%= l(:setting_attachment_max_size) %></label>
-<%= text_field_tag 'settings[attachment_max_size]', Setting.attachment_max_size, :size => 6 %> KB</p>
-
-<p><label><%= l(:setting_per_page_options) %></label>
-<%= text_field_tag 'settings[per_page_options]', Setting.per_page_options_array.join(', '), :size => 20 %><br /><em><%= l(:text_comma_separated) %></em></p>
-
-<p><label><%= l(:setting_issues_export_limit) %></label>
-<%= text_field_tag 'settings[issues_export_limit]', Setting.issues_export_limit, :size => 6 %></p>
-
-<p><label><%= l(:setting_cross_project_issue_relations) %></label>
-<%= check_box_tag 'settings[cross_project_issue_relations]', 1, Setting.cross_project_issue_relations? %><%= hidden_field_tag 'settings[cross_project_issue_relations]', 0 %></p>
-
-<p><label><%= l(:setting_host_name) %></label>
-<%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %></p>
-
-<p><label><%= l(:setting_protocol) %></label>
-<%= select_tag 'settings[protocol]', options_for_select(['http', 'https'], Setting.protocol) %></p>
-
-<p><label><%= l(:setting_text_formatting) %></label>
-<%= select_tag 'settings[text_formatting]', options_for_select([[l(:label_none), "0"], ["textile", "textile"]], Setting.text_formatting) %></p>
-
-<p><label><%= l(:setting_wiki_compression) %></label>
-<%= select_tag 'settings[wiki_compression]', options_for_select( [[l(:label_none), 0], ["gzip", "gzip"]], Setting.wiki_compression) %></p>
-
-<p><label><%= l(:setting_feeds_limit) %></label>
-<%= text_field_tag 'settings[feeds_limit]', Setting.feeds_limit, :size => 6 %></p>
-
-<p><label><%= l(:setting_autofetch_changesets) %></label>
-<%= check_box_tag 'settings[autofetch_changesets]', 1, Setting.autofetch_changesets? %><%= hidden_field_tag 'settings[autofetch_changesets]', 0 %></p>
-
-<p><label><%= l(:setting_sys_api_enabled) %></label>
-<%= check_box_tag 'settings[sys_api_enabled]', 1, Setting.sys_api_enabled? %><%= hidden_field_tag 'settings[sys_api_enabled]', 0 %></p>
-
-<p><label><%= l(:setting_repositories_encodings) %></label>
-<%= text_field_tag 'settings[repositories_encodings]', Setting.repositories_encodings, :size => 60 %><br /><em><%= l(:text_comma_separated) %></em></p>
+<div class="tabs">
+    <ul>
+    <% administration_settings_tabs.each do |tab| -%>
+        <li><%= link_to l(tab[:label]), {}, :id => "tab-#{tab[:name]}", :onclick => "showTab('#{tab[:name]}'); this.blur(); return false;" %></li>
+    <% end -%>
+    </ul>
 </div>
 
-<fieldset class="box"><legend><%= l(:setting_issue_list_default_columns) %></legend>
-<%= hidden_field_tag 'settings[issue_list_default_columns][]', '' %>
-<p><% Query.new.available_columns.each do |column| %>
-  <label><%= check_box_tag 'settings[issue_list_default_columns][]', column.name, Setting.issue_list_default_columns.include?(column.name.to_s) %>
-  <%= column.caption %></label>
-<% end %></p>
-</fieldset>
+<% administration_settings_tabs.each do |tab| %>
+    <%= content_tag('div', render(:partial => tab[:partial]), :id => "tab-content-#{tab[:name]}", :class => 'tab-content') %>
+<% end %>
 
-<fieldset class="box tabular"><legend><%= l(:label_authentication) %></legend>
-<p><label><%= l(:setting_login_required) %></label>
-<%= check_box_tag 'settings[login_required]', 1, Setting.login_required? %><%= hidden_field_tag 'settings[login_required]', 0 %></p>
+<%= tab = params[:tab] ? h(params[:tab]) : administration_settings_tabs.first[:name]
+javascript_tag "showTab('#{tab}');" %>
 
-<p><label><%= l(:setting_autologin) %></label>
-<%= 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>
-
-<p><label><%= l(:setting_self_registration) %></label>
-<%= select_tag 'settings[self_registration]',
-      options_for_select( [[l(:label_disabled), "0"],
-                           [l(:label_registration_activation_by_email), "1"],
-                           [l(:label_registration_manual_activation), "2"],
-                           [l(:label_registration_automatic_activation), "3"]
-                          ], Setting.self_registration ) %></p>
-
-<p><label><%= l(:label_password_lost) %></label>
-<%= check_box_tag 'settings[lost_password]', 1, Setting.lost_password? %><%= hidden_field_tag 'settings[lost_password]', 0 %></p>
-</fieldset>
-
-<fieldset class="box tabular"><legend><%= l(:text_issues_ref_in_commit_messages) %></legend>
-<p><label><%= l(:setting_commit_ref_keywords) %></label>
-<%= text_field_tag 'settings[commit_ref_keywords]', Setting.commit_ref_keywords, :size => 30 %><br /><em><%= l(:text_comma_separated) %></em></p>
-
-<p><label><%= l(:setting_commit_fix_keywords) %></label>
-<%= text_field_tag 'settings[commit_fix_keywords]', Setting.commit_fix_keywords, :size => 30 %>
-&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) %>
-&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) %>
-<br /><em><%= l(:text_comma_separated) %></em></p>
-</fieldset>
-
-<%= submit_tag l(:button_save) %>
-<% end %>
-
-<% html_title(l(:label_settings)) -%>
+<% html_title(l(:label_settings), l(:label_administration)) -%>
Index: trunk/lang/bg.yml
===================================================================
--- trunk/lang/bg.yml	(revision 1045)
+++ trunk/lang/bg.yml	(revision 1046)
@@ -559,3 +559,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/cs.yml
===================================================================
--- trunk/lang/cs.yml	(revision 1045)
+++ trunk/lang/cs.yml	(revision 1046)
@@ -559,3 +559,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/de.yml
===================================================================
--- trunk/lang/de.yml	(revision 1045)
+++ trunk/lang/de.yml	(revision 1046)
@@ -559,3 +559,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/en.yml
===================================================================
--- trunk/lang/en.yml	(revision 1045)
+++ trunk/lang/en.yml	(revision 1046)
@@ -353,6 +353,7 @@
 label_not_contains: doesn't contain
 label_day_plural: days
 label_repository: Repository
+label_repository_plural: Repositories
 label_browse: Browse
 label_modification: %d change
 label_modification_plural: %d changes
@@ -463,6 +464,7 @@
 label_display_per_page: 'Per page: %s'
 label_age: Age
 label_change_properties: Change properties
+label_general: General
 
 button_login: Login
 button_submit: Submit
Index: trunk/lang/es.yml
===================================================================
--- trunk/lang/es.yml	(revision 1045)
+++ trunk/lang/es.yml	(revision 1046)
@@ -562,3 +562,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/fr.yml
===================================================================
--- trunk/lang/fr.yml	(revision 1045)
+++ trunk/lang/fr.yml	(revision 1046)
@@ -353,6 +353,7 @@
 label_not_contains: ne contient pas
 label_day_plural: jours
 label_repository: Dépôt
+label_repository_plural: Dépôts
 label_browse: Parcourir
 label_modification: %d modification
 label_modification_plural: %d modifications
@@ -463,6 +464,7 @@
 label_display_per_page: 'Par page: %s'
 label_age: Age
 label_change_properties: Changer les propriétés
+label_general: Général
 
 button_login: Connexion
 button_submit: Soumettre
Index: trunk/lang/he.yml
===================================================================
--- trunk/lang/he.yml	(revision 1045)
+++ trunk/lang/he.yml	(revision 1046)
@@ -559,3 +559,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/it.yml
===================================================================
--- trunk/lang/it.yml	(revision 1045)
+++ trunk/lang/it.yml	(revision 1046)
@@ -559,3 +559,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/ja.yml
===================================================================
--- trunk/lang/ja.yml	(revision 1045)
+++ trunk/lang/ja.yml	(revision 1046)
@@ -560,3 +560,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/ko.yml
===================================================================
--- trunk/lang/ko.yml	(revision 1045)
+++ trunk/lang/ko.yml	(revision 1046)
@@ -559,3 +559,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/nl.yml
===================================================================
--- trunk/lang/nl.yml	(revision 1045)
+++ trunk/lang/nl.yml	(revision 1046)
@@ -560,3 +560,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/pl.yml
===================================================================
--- trunk/lang/pl.yml	(revision 1045)
+++ trunk/lang/pl.yml	(revision 1046)
@@ -559,3 +559,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/pt-br.yml
===================================================================
--- trunk/lang/pt-br.yml	(revision 1045)
+++ trunk/lang/pt-br.yml	(revision 1046)
@@ -559,3 +559,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/pt.yml
===================================================================
--- trunk/lang/pt.yml	(revision 1045)
+++ trunk/lang/pt.yml	(revision 1046)
@@ -559,3 +559,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/ro.yml
===================================================================
--- trunk/lang/ro.yml	(revision 1045)
+++ trunk/lang/ro.yml	(revision 1046)
@@ -559,3 +559,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/ru.yml
===================================================================
--- trunk/lang/ru.yml	(revision 1045)
+++ trunk/lang/ru.yml	(revision 1046)
@@ -559,3 +559,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/sr.yml
===================================================================
--- trunk/lang/sr.yml	(revision 1045)
+++ trunk/lang/sr.yml	(revision 1046)
@@ -560,3 +560,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/sv.yml
===================================================================
--- trunk/lang/sv.yml	(revision 1045)
+++ trunk/lang/sv.yml	(revision 1046)
@@ -560,3 +560,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/zh-tw.yml
===================================================================
--- trunk/lang/zh-tw.yml	(revision 1045)
+++ trunk/lang/zh-tw.yml	(revision 1046)
@@ -559,3 +559,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/lang/zh.yml
===================================================================
--- trunk/lang/zh.yml	(revision 1045)
+++ trunk/lang/zh.yml	(revision 1046)
@@ -562,3 +562,5 @@
 error_can_t_load_default_data: "Default configuration could not be loaded: %s"
 button_update: Update
 label_change_properties: Change properties
+label_general: General
+label_repository_plural: Repositories
Index: trunk/test/functional/admin_controller_test.rb
===================================================================
--- trunk/test/functional/admin_controller_test.rb	(revision 1045)
+++ trunk/test/functional/admin_controller_test.rb	(revision 1046)
@@ -51,21 +51,9 @@
     assert IssueStatus.find_by_name('Nouveau')
   end
   
-  def test_get_mail_options
-    get :mail_options
-    assert_response :success
-    assert_template 'mail_options'
-  end
-  
-  def test_post_mail_options
-    post :mail_options, :settings => {'mail_from' => 'functional@test.foo'}
-    assert_redirected_to 'admin/mail_options'
-    assert_equal 'functional@test.foo', Setting.mail_from
-  end
-  
   def test_test_email
     get :test_email
-    assert_redirected_to 'admin/mail_options'
+    assert_redirected_to 'settings/edit'
     mail = ActionMailer::Base.deliveries.last
     assert_kind_of TMail::Mail, mail
     user = User.find(1)
Index: trunk/test/functional/settings_controller_test.rb
===================================================================
--- trunk/test/functional/settings_controller_test.rb	(nonexistent)
+++ trunk/test/functional/settings_controller_test.rb	(revision 1046)
@@ -0,0 +1,53 @@
+# redMine - project management software
+# Copyright (C) 2006-2007  Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+
+require File.dirname(__FILE__) + '/../test_helper'
+require 'settings_controller'
+
+# Re-raise errors caught by the controller.
+class SettingsController; def rescue_action(e) raise e end; end
+
+class SettingsControllerTest < Test::Unit::TestCase
+  fixtures :users
+  
+  def setup
+    @controller = SettingsController.new
+    @request    = ActionController::TestRequest.new
+    @response   = ActionController::TestResponse.new
+    User.current = nil
+    @request.session[:user_id] = 1 # admin
+  end
+  
+  def test_get_edit
+    get :edit
+    assert_response :success
+    assert_template 'edit'
+  end
+  
+  def test_post_edit_notifications
+    post :edit, :settings => {:mail_from => 'functional@test.foo',
+                              :bcc_recipients  => '0',
+                              :notified_events => %w(issue_added issue_updated news_added),
+                              :emails_footer => 'Test footer'
+                              }
+    assert_redirected_to 'settings/edit'
+    assert_equal 'functional@test.foo', Setting.mail_from
+    assert !Setting.bcc_recipients?
+    assert_equal %w(issue_added issue_updated news_added), Setting.notified_events
+    assert_equal 'Test footer', Setting.emails_footer
+  end
+end

Property changes on: trunk/test/functional/settings_controller_test.rb
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
