diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-16 11:58:41 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-16 11:58:41 +0000 |
commit | 94b5bbcb5d225ec1bfe29e6aa4e8b8eb7d137abf (patch) | |
tree | 842236ce27c25d86a28ae2abef080eaee2ad835c /app | |
parent | 9c09fd20fbd361aecab26be7d5187afd35a4f657 (diff) | |
download | redmine-94b5bbcb5d225ec1bfe29e6aa4e8b8eb7d137abf.tar.gz redmine-94b5bbcb5d225ec1bfe29e6aa4e8b8eb7d137abf.zip |
Moves plugin list to its own administration menu item.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2037 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/admin_controller.rb | 5 | ||||
-rw-r--r-- | app/views/admin/index.rhtml | 4 | ||||
-rw-r--r-- | app/views/admin/info.rhtml | 16 | ||||
-rw-r--r-- | app/views/admin/plugins.rhtml | 17 |
4 files changed, 25 insertions, 17 deletions
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 -%> +<p class="icon22 icon22-plugin"> +<%= link_to l(:label_plugins), :controller => 'admin', :action => 'plugins' %> +</p> + <p class="icon22 icon22-info"> <%= link_to l(:label_information_plural), :controller => 'admin', :action => 'info' %> </p> 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 @@ <tr class="odd"><td><%= l(:text_rmagick_available) %></td><td><%= image_tag (@flags[:rmagick_available] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr> </table> -<% if @plugins.any? %> - -<h3 class="icon22 icon22-plugin"><%= l(:label_plugins) %></h3> -<table class="list"> - <% @plugins.keys.sort {|x,y| x.to_s <=> y.to_s}.each do |plugin| %> - <tr class="<%= cycle('odd', 'even') %>"> - <td><%=h @plugins[plugin].name %></td> - <td><%=h @plugins[plugin].description %></td> - <td><%=h @plugins[plugin].author %></td> - <td><%=h @plugins[plugin].version %></td> - <td><%= link_to(l(:button_configure), :controller => 'settings', :action => 'plugin', :id => plugin.to_s) if @plugins[plugin].configurable? %></td> - </tr> - <% end %> -</table> -<% end %> - <% html_title(l(:label_information_plural)) -%> diff --git a/app/views/admin/plugins.rhtml b/app/views/admin/plugins.rhtml new file mode 100644 index 000000000..5a208fe02 --- /dev/null +++ b/app/views/admin/plugins.rhtml @@ -0,0 +1,17 @@ +<h2><%= l(:label_plugins) %></h2> + +<% if @plugins.any? %> +<table class="list"> + <% @plugins.keys.sort {|x,y| x.to_s <=> y.to_s}.each do |plugin| %> + <tr class="<%= cycle('odd', 'even') %>"> + <td><%=h @plugins[plugin].name %></td> + <td><%=h @plugins[plugin].description %></td> + <td><%=h @plugins[plugin].author %></td> + <td><%=h @plugins[plugin].version %></td> + <td><%= link_to(l(:button_configure), :controller => 'settings', :action => 'plugin', :id => plugin.to_s) if @plugins[plugin].configurable? %></td> + </tr> + <% end %> +</table> +<% else %> +<p class="nodata"><%= l(:label_no_data) %></p> +<% end %> |