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
This commit is contained in:
parent
9c09fd20fb
commit
94b5bbcb5d
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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)) -%>
|
||||
|
|
|
@ -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 %>
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue