diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-01-06 20:24:26 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-01-06 20:24:26 +0000 |
commit | a80dbc49b1670877aca09b11101d4a5b40ea58c2 (patch) | |
tree | ad81a0601a377471558b561c08be9956cd1b008a /app/controllers/settings_controller.rb | |
parent | 78d9ae9754578cda4b72d7b28a4f707534c15c49 (diff) | |
download | redmine-a80dbc49b1670877aca09b11101d4a5b40ea58c2.tar.gz redmine-a80dbc49b1670877aca09b11101d4a5b40ea58c2.zip |
Admin settings screen split to tabs.
Email notification options moved to this view as a tab and LDAP list is accessible from the 'Authentication' tab.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1046 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/settings_controller.rb')
-rw-r--r-- | app/controllers/settings_controller.rb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rb index 09af63176..c5fae2a16 100644 --- a/app/controllers/settings_controller.rb +++ b/app/controllers/settings_controller.rb @@ -25,9 +25,16 @@ class SettingsController < ApplicationController 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 |