Feature #13643 » 13643_child_menu.patch
| app/controllers/reports_controller.rb | ||
|---|---|---|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
class ReportsController < ApplicationController
|
||
|
menu_item :issues
|
||
|
menu_item :reports
|
||
|
before_action :find_project, :authorize, :find_issue_statuses
|
||
|
def issue_report
|
||
| lib/redmine.rb | ||
|---|---|---|
|
menu.push :roadmap, { :controller => 'versions', :action => 'index' }, :param => :project_id,
|
||
|
:if => Proc.new { |p| p.shared_versions.any? }
|
||
|
menu.push :issues, { :controller => 'issues', :action => 'index' }, :param => :project_id, :caption => :label_issue_plural
|
||
|
menu.push :reports, { :controller => 'reports', :action => 'issue_report' }, :param => :id, :caption => :label_report_plural, :parent => :issues
|
||
|
menu.push :new_issue, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new,
|
||
|
:html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) },
|
||
|
:if => Proc.new { |p| Setting.new_item_menu_tab == '1' && Issue.allowed_target_trackers(p).any? },
|
||
| lib/redmine/menu_manager.rb | ||
|---|---|---|
|
item.url
|
||
|
end
|
||
|
caption = item.caption(project)
|
||
|
return [caption, url, (current_menu_item == item.name)]
|
||
|
child_item_names = item.children.collect{|c|c.name}
|
||
|
return [caption, url, (current_menu_item == item.name || child_item_names.include?(current_menu_item))]
|
||
|
end
|
||
|
# See MenuItem#allowed?
|
||
- « Previous
- 1
- 2
- 3
- 4
- Next »