diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 777c31d70..90ec59098 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -49,6 +49,10 @@ class AdminController < ApplicationController render :action => "projects", :layout => false if request.xhr? end + def plugins + @plugins = Redmine::Plugin.registered_plugins + end + # Loads the default configuration # (roles, trackers, statuses, workflow, enumerations) def default_configuration @@ -84,6 +88,5 @@ class AdminController < ApplicationController :file_repository_writable => File.writable?(Attachment.storage_path), :rmagick_available => Object.const_defined?(:Magick) } - @plugins = Redmine::Plugin.registered_plugins end end diff --git a/app/views/admin/index.rhtml b/app/views/admin/index.rhtml index e2d160730..323641744 100644 --- a/app/views/admin/index.rhtml +++ b/app/views/admin/index.rhtml @@ -40,6 +40,10 @@ :class => ["icon22", "icon22-#{item.name}"].join(' ') %> <% end -%> +
+<%= link_to l(:label_plugins), :controller => 'admin', :action => 'plugins' %> +
+<%= link_to l(:label_information_plural), :controller => 'admin', :action => 'info' %>
diff --git a/app/views/admin/info.rhtml b/app/views/admin/info.rhtml index 05c27f5ac..141746888 100644 --- a/app/views/admin/info.rhtml +++ b/app/views/admin/info.rhtml @@ -8,20 +8,4 @@<%=h @plugins[plugin].name %> | -<%=h @plugins[plugin].description %> | -<%=h @plugins[plugin].author %> | -<%=h @plugins[plugin].version %> | -<%= link_to(l(:button_configure), :controller => 'settings', :action => 'plugin', :id => plugin.to_s) if @plugins[plugin].configurable? %> | -
<%=h @plugins[plugin].name %> | +<%=h @plugins[plugin].description %> | +<%=h @plugins[plugin].author %> | +<%=h @plugins[plugin].version %> | +<%= link_to(l(:button_configure), :controller => 'settings', :action => 'plugin', :id => plugin.to_s) if @plugins[plugin].configurable? %> | +
<%= l(:label_no_data) %>
+<% end %> diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb index 7c2626082..9cb2d07f0 100644 --- a/test/functional/admin_controller_test.rb +++ b/test/functional/admin_controller_test.rb @@ -78,6 +78,12 @@ class AdminControllerTest < Test::Unit::TestCase user = User.find(1) assert_equal [user.mail], mail.bcc end + + def test_plugins + get :plugins + assert_response :success + assert_template 'plugins' + end def test_info get :info @@ -85,6 +91,8 @@ class AdminControllerTest < Test::Unit::TestCase assert_template 'info' end + private + def delete_configuration_data Role.delete_all('builtin = 0') Tracker.delete_all