From 2fa3da732440ad8d3ccbb2a0536a554e404c9829 Mon Sep 17 00:00:00 2001 From: Philipp Tessenow Date: Mon, 22 Apr 2013 14:46:07 +0200 Subject: [PATCH] top menu renders correclty in namespace'd controllers --- lib/redmine.rb | 2 +- lib/redmine/menu_manager/top_menu_helper.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/redmine.rb b/lib/redmine.rb index 72cef9a3ac..255e82807b 100644 --- a/lib/redmine.rb +++ b/lib/redmine.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 diff --git a/lib/redmine/menu_manager/top_menu_helper.rb b/lib/redmine/menu_manager/top_menu_helper.rb index d738f7d2ca..e5258450ca 100644 --- a/lib/redmine/menu_manager/top_menu_helper.rb +++ b/lib/redmine/menu_manager/top_menu_helper.rb @@ -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)),