Feature #631

Add Plugin Support for extending the top menu

Added by Eric Davis almost 13 years ago. Updated almost 13 years ago.

Status:ClosedStart date:2008-02-12
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:UI
Target version:-
Resolution:

Description

Right now plugins can only extend the Project menu ("main-menu"). This is kinda awkward for plugins that work across projects (see my Timesheet plugin for an example).

What needs to be done to be able to extend the "top-menu"? Can we just build the "top-menu" using Redmine::MenuManager and hook into it with the Redmine::Plugin.menu method?

History

#1 Updated by Jean-Philippe Lang almost 13 years ago

Done in r1137. You can now use this in your plugins:

Redmine::MenuManager.map :top_menu do |menu|
  menu.push ...
end
Two other menus can be extended as well:
  • account_menu: the one in the upper-right corner (with login/logout links)
  • application_menu: same place as the project menu but rendered when outside of a project (this menu is empty by default)

You can also have a look at lib/redmine.rb

#2 Updated by Jean-Philippe Lang almost 13 years ago

  • Status changed from New to Closed

Also available in: Atom PDF