Fixes broken admin menu extension (#4351).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3131 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-12-07 20:16:30 +00:00
parent 5266e328c0
commit 174f014564
2 changed files with 18 additions and 3 deletions

View File

@ -39,9 +39,9 @@
<%= link_to l(:label_settings), :controller => 'settings' %>
</p>
<% menu_items_for(:admin_menu) do |item, caption, url, selected| -%>
<%= content_tag 'p',
link_to(h(caption), item.url, item.html_options),
<% menu_items_for(:admin_menu) do |item| -%>
<%= content_tag 'p',
link_to(h(item.caption), item.url, item.html_options),
:class => ["icon22", "icon22-#{item.name}"].join(' ') %>
<% end -%>

View File

@ -120,6 +120,21 @@ class AdminControllerTest < ActionController::TestCase
assert_template 'info'
end
def test_admin_menu_plugin_extension
Redmine::MenuManager.map :admin_menu do |menu|
menu.push :test_admin_menu_plugin_extension, '/foo/bar', :caption => 'Test'
end
get :index
assert_response :success
assert_tag :a, :attributes => { :href => '/foo/bar' },
:content => 'Test'
Redmine::MenuManager.map :admin_menu do |menu|
menu.delete :test_admin_menu_plugin_extension
end
end
private
def delete_configuration_data