##// END OF EJS Templates
Removed unused helper....
Removed unused helper. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10932 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r10333:ef988ba17cde
r10705:e9018553e509
Show More
settings_controller.rb
66 lines | 2.4 KiB | text/x-ruby | RubyLexer
/ app / controllers / settings_controller.rb
Toshi MARUYAMA
remove trailing white-spaces from settings controller source....
r5707 # Redmine - project management software
Jean-Philippe Lang
Copyright update....
r9453 # Copyright (C) 2006-2012 Jean-Philippe Lang
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 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
Jean-Philippe Lang
Adds an admin layout that displays the admin menu in the sidebar....
r3062 layout 'admin'
Jean-Philippe Lang
Fixes admin menu display....
r8559 menu_item :plugins, :only => :plugin
Toshi MARUYAMA
remove trailing white-spaces from settings controller source....
r5707
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 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
Eric Davis
Refactor the hardcoded event actions (notifiables) to use a class...
r4106 @notifiables = Redmine::Notifiable.all
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]
Toshi MARUYAMA
Fix potential Execution After Redirect bugs....
r5491 else
@options = {}
Toshi MARUYAMA
pin user format order at setting panel (#10937)...
r10331 user_format = User::USER_FORMATS.collect{|key, value| [key, value[:setting_order]]}.sort{|a, b| a[1] <=> b[1]}
Toshi MARUYAMA
code cleanup r10542 changes (#10937)...
r10333 @options[:user_format] = user_format.collect{|f| [User.current.name(f[0]), f[0].to_s]}
Toshi MARUYAMA
Fix potential Execution After Redirect bugs....
r5491 @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
Toshi MARUYAMA
Fix potential Execution After Redirect bugs....
r5491 @guessed_host_and_path = request.host_with_port.dup
@guessed_host_and_path << ('/'+ Redmine::Utils.relative_url_root.gsub(%r{^\/}, '')) unless Redmine::Utils.relative_url_root.blank?
Toshi MARUYAMA
remove trailing white-spaces from settings controller source....
r5707
Toshi MARUYAMA
Fix potential Execution After Redirect bugs....
r5491 Redmine::Themes.rescan
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
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 tests for plugin settings editing....
r7919 Setting.send "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
Toshi MARUYAMA
Fix potential Execution After Redirect bugs....
r5491 else
@partial = @plugin.settings[:partial]
Jean-Philippe Lang
Adds tests for plugin settings editing....
r7919 @settings = Setting.send "plugin_#{@plugin.id}"
Jean-Philippe Lang
Basic plugin support....
r741 end
Jean-Philippe Lang
Adds .find and .all Plugin class methods....
r2037 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