top menu renders correclty in namespace'd controllers

pull/77/head
Philipp Tessenow 12 years ago
parent ddc7cf70b4
commit 2fa3da7324
  1. 2
      lib/redmine.rb
  2. 6
      lib/redmine/menu_manager/top_menu_helper.rb

@ -164,7 +164,7 @@ end
Redmine::MenuManager.map :top_menu do |menu|
menu.push :home, :home_path
menu.push :my_page, { :controller => '/my', :action => 'page' }, :if => Proc.new { User.current.logged? }
menu.push :projects, { :controller => '/projects', :action => 'index' }, :caption => :label_project_plural # menu-item projects will be overwritten by base.rhtml
# projects menu will be added by Redmine::MenuManager::TopMenuHelper#render_projects_top_menu_node
menu.push :administration, { :controller => '/admin', :action => 'projects' }, :if => Proc.new { User.current.admin? }, :last => true
menu.push :help, Redmine::Info.help_url, :last => true, :caption => "?", :html => { :accesskey => Redmine::AccessKeys.key_for(:help) }
end

@ -17,7 +17,7 @@ module Redmine::MenuManager::TopMenuHelper
return "" if User.current.number_of_known_projects.zero?
heading = link_to l(:label_project_plural), { :controller => 'projects',
heading = link_to l(:label_project_plural), { :controller => '/projects',
:action => 'index' },
:title => l(:label_project_plural)
@ -29,7 +29,7 @@ module Redmine::MenuManager::TopMenuHelper
render_drop_down_menu_node heading do
content_tag :ul, :style => "display:none" do
ret = content_tag :li do
link_to l(:label_project_view_all), :controller => 'projects',
link_to l(:label_project_view_all), :controller => '/projects',
:action => 'index'
end
@ -46,7 +46,7 @@ module Redmine::MenuManager::TopMenuHelper
def render_user_top_menu_node(items = menu_items_for(:account_menu))
unless User.current.logged?
render_drop_down_menu_node(link_to(l(:label_login),
{ :controller => 'account',
{ :controller => '/account',
:action => 'login' },
:class => 'login',
:title => l(:label_login)),

Loading…
Cancel
Save