mirror of
https://github.com/redmine/redmine.git
synced 2026-05-07 19:57:03 +02:00
Adds .find and .all Plugin class methods.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2039 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -50,7 +50,7 @@ class AdminController < ApplicationController
|
||||
end
|
||||
|
||||
def plugins
|
||||
@plugins = Redmine::Plugin.registered_plugins.values.sort
|
||||
@plugins = Redmine::Plugin.all
|
||||
end
|
||||
|
||||
# Loads the default configuration
|
||||
|
||||
@@ -45,14 +45,15 @@ class SettingsController < ApplicationController
|
||||
end
|
||||
|
||||
def plugin
|
||||
plugin_id = params[:id].to_sym
|
||||
@plugin = Redmine::Plugin.registered_plugins[plugin_id]
|
||||
@plugin = Redmine::Plugin.find(params[:id])
|
||||
if request.post?
|
||||
Setting["plugin_#{plugin_id}"] = params[:settings]
|
||||
Setting["plugin_#{@plugin.id}"] = params[:settings]
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to :action => 'plugin', :id => params[:id]
|
||||
redirect_to :action => 'plugin', :id => @plugin.id
|
||||
end
|
||||
@partial = @plugin.settings[:partial]
|
||||
@settings = Setting["plugin_#{plugin_id}"]
|
||||
@settings = Setting["plugin_#{@plugin.id}"]
|
||||
rescue Redmine::PluginNotFound
|
||||
render_404
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user