diff options
Diffstat (limited to 'app/controllers/settings_controller.rb')
-rw-r--r-- | app/controllers/settings_controller.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rb index 229a4ab3c..09af63176 100644 --- a/app/controllers/settings_controller.rb +++ b/app/controllers/settings_controller.rb @@ -30,4 +30,16 @@ class SettingsController < ApplicationController redirect_to :action => 'edit' and return end end + + def plugin + plugin_id = params[:id].to_sym + @plugin = Redmine::Plugin.registered_plugins[plugin_id] + if request.post? + Setting["plugin_#{plugin_id}"] = params[:settings] + flash[:notice] = l(:notice_successful_update) + redirect_to :action => 'plugin', :id => params[:id] + end + @partial = "../../vendor/plugins/#{plugin_id}/app/views/" + @plugin.settings[:partial] + @settings = Setting["plugin_#{plugin_id}"] + end end |