##// END OF EJS Templates
Upgraded to Rails 2.3.4 (#3597)...
Upgraded to Rails 2.3.4 (#3597) * Ran the Rails upgrade * Upgraded to Rails Engines 2.3.2 * Added a plugin to let Engines override application views. * Converted tests to use the new classes: ** ActionController::TestCase for functional ** ActiveSupport::TestCase for units * Converted ActiveRecord::Error message to a string. * ActiveRecord grouping returns an ordered hash which doesn't have #sort! * Updated the I18n storage_units format. * Added some default initializers from a fresh rails app * Changed the order of check_box_tags and hidden_field_tags. The hidden tag needs to appear first in Rails 2.3, otherwise it will override any value in the check_box_tag. * Removed the custom handler for when the cookie store is tampered with. Rails 2.3 removed the TamperedWithCookie exception and instead Rails will not load the data from it when it's been tampered with (e.g. no user login). * Fixed mail layouts, 2.3 has problems with implicit multipart emails that use layouts. Also removed some custom Redmine mailer code. * Fixed a bug that occurred in tests where the "required" span tag would be added to the :field_status translation. This resulted in an email string of: <li>Status<span class="required"> *</span><span class="required"> *</span> Instead of: <li>Status: New</li> git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2887 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r2650:9c9dc6e8147a
r2773:7b0cb6aba871
Show More
settings_controller.rb
59 lines | 2.3 KiB | text/x-ruby | RubyLexer
/ app / controllers / settings_controller.rb
Jean-Philippe Lang
settings are now stored in the database (config_custom.rb no more used) and editable through the application in: Admin -> Settings...
r164 # 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.
Jean-Philippe Lang
Host setting should contain the path prefix (Redmine base URL) to properly generate links in emails that are sent offline (#2122)....
r1987 #
Jean-Philippe Lang
settings are now stored in the database (config_custom.rb no more used) and editable through the application in: Admin -> Settings...
r164 # 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.
Jean-Philippe Lang
Host setting should contain the path prefix (Redmine base URL) to properly generate links in emails that are sent offline (#2122)....
r1987 #
Jean-Philippe Lang
settings are now stored in the database (config_custom.rb no more used) and editable through the application in: Admin -> Settings...
r164 # 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.
class SettingsController < ApplicationController
before_filter :require_admin
Jean-Philippe Lang
Host setting should contain the path prefix (Redmine base URL) to properly generate links in emails that are sent offline (#2122)....
r1987
Jean-Philippe Lang
settings are now stored in the database (config_custom.rb no more used) and editable through the application in: Admin -> Settings...
r164 def index
edit
render :action => 'edit'
end
def edit
Jean-Philippe Lang
Adds email notification on wiki changes (#413). It's disabled by default and can be enabled in application settings....
r2650 @notifiables = %w(issue_added issue_updated news_added document_added file_added message_posted wiki_content_added wiki_content_updated)
Jean-Philippe Lang
Admin settings screen split to tabs....
r1033 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]
Jean-Philippe Lang
User display format is now configurable in administration settings....
r1089 return
Jean-Philippe Lang
settings are now stored in the database (config_custom.rb no more used) and editable through the application in: Admin -> Settings...
r164 end
Jean-Philippe Lang
User display format is now configurable in administration settings....
r1089 @options = {}
@options[:user_format] = User::USER_FORMATS.keys.collect {|f| [User.current.name(f), f.to_s] }
Jean-Philippe Lang
Email delivery configuration moved to an unversioned YAML file (config/email.yml, see the sample file) (#1412)....
r1611 @deliveries = ActionMailer::Base.perform_deliveries
Jean-Philippe Lang
Host setting should contain the path prefix (Redmine base URL) to properly generate links in emails that are sent offline (#2122)....
r1987
Jean-Philippe Lang
Fixed: TypeError (can't modify frozen string) on settings view (#2700)....
r2362 @guessed_host_and_path = request.host_with_port.dup
Jean-Philippe Lang
Slight changes to ease Rails 2.2 support....
r2232 @guessed_host_and_path << ('/'+ Redmine::Utils.relative_url_root.gsub(%r{^\/}, '')) unless Redmine::Utils.relative_url_root.blank?
Jean-Philippe Lang
settings are now stored in the database (config_custom.rb no more used) and editable through the application in: Admin -> Settings...
r164 end
Jean-Philippe Lang
Host setting should contain the path prefix (Redmine base URL) to properly generate links in emails that are sent offline (#2122)....
r1987
Jean-Philippe Lang
Basic plugin support....
r741 def plugin
Jean-Philippe Lang
Adds .find and .all Plugin class methods....
r2037 @plugin = Redmine::Plugin.find(params[:id])
Jean-Philippe Lang
Basic plugin support....
r741 if request.post?
Jean-Philippe Lang
Adds .find and .all Plugin class methods....
r2037 Setting["plugin_#{@plugin.id}"] = params[:settings]
Jean-Philippe Lang
Basic plugin support....
r741 flash[:notice] = l(:notice_successful_update)
Jean-Philippe Lang
Adds .find and .all Plugin class methods....
r2037 redirect_to :action => 'plugin', :id => @plugin.id
Jean-Philippe Lang
Basic plugin support....
r741 end
Jean-Philippe Lang
Fixed: Plugin's setting page is broken after upgrading to rails 2.1.0 (#1620)....
r1642 @partial = @plugin.settings[:partial]
Jean-Philippe Lang
Adds .find and .all Plugin class methods....
r2037 @settings = Setting["plugin_#{@plugin.id}"]
rescue Redmine::PluginNotFound
render_404
Jean-Philippe Lang
Basic plugin support....
r741 end
Jean-Philippe Lang
settings are now stored in the database (config_custom.rb no more used) and editable through the application in: Admin -> Settings...
r164 end