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