mardi 19 mai 2015

How to display application menus only when selected top menu item is clicked in redmine?

I am working on Rails 3, Redmine, Redmin Plugin. Following are the codes in init.rb.

Redmine::Plugin.register :wakefly_utilization do
  name 'Name'
  author 'Author'
  description 'Plugin Description'
  version '0.0.1'
  url ''
  author_url 'site.com'
  menu :top_menu, :utilization, { :controller => 'utilization', :action => 'index' }, :caption => 'Reports' }
  menu :application_menu, :utilization, { :controller => 'utilization',   :action => 'index' }, :caption => 'Utilization', :if => Proc.new { User.current.logged? }
  permission :wakefly_utilization, { :utilization => [:index]}
end

Here **Reports** is the top menu and **Utilization** is the application menu. Present application menu Utilization is displaying when I clicked any of the top menu. But I want to display Utilization application menu only when Reports top menu is clicked.

Any solution would be appreciated. Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire