I am working on Rails 3, Redmine, Redmin Plugin. Following are the codes in init.rb.
Redmine::Plugin.register :my_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? }
menu :application_menu, :project_reports, { :controller => 'project_reports', :action => 'index' }, :caption => 'Projects', :if => Proc.new { User.current.logged? }
permission :my_utilization, { :utilization => [:index], :project_reports => [:index]}
end
Below is the picture displaying top menu and application menu items.
As shown in image, Home, My page, Projects, **Reports**, Help are the top menu items and **Utilization**, **Projects** are the application menu items. Present application menu Utilization and Projects are displaying when I clicked any of the top menu either Home, My page, Projects, Reports. But I want to display Utilization, Projects application menu only when Reports top menu is clicked.
Any solution would be appreciated. Thanks in advance.