Feature #7956 ยป 7956.patch
| lib/redmine.rb | ||
|---|---|---|
|
menu.push :overview, { :controller => 'projects', :action => 'show' }
|
||
|
menu.push :activity, { :controller => 'activities', :action => 'index' }
|
||
|
menu.push :roadmap, { :controller => 'versions', :action => 'index' }, :param => :project_id,
|
||
|
:if => Proc.new { |p| p.shared_versions.any? }
|
||
|
:if => Proc.new { |p| Setting.display_subprojects_issues? ? p.rolled_up_versions.any? : p.shared_versions.any? }
|
||
|
menu.push :issues, { :controller => 'issues', :action => 'index' }, :param => :project_id, :caption => :label_issue_plural
|
||
|
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) },
|
||
| test/integration/lib/redmine/menu_manager_test.rb | ||
|---|---|---|
|
assert_select 'a.project', :count => 4
|
||
|
end
|
||
|
end
|
||
|
def test_project_menu_should_show_roadmap_if_subprojects_have_versions
|
||
|
Version.delete_all
|
||
|
subproj = Project.find_by(identifier: 'subproject1')
|
||
|
version = Version.generate!(project_id: subproj.id)
|
||
|
with_settings :display_subprojects_issues => '1' do
|
||
|
get '/projects/ecookbook'
|
||
|
assert_select '#main-menu a.roadmap'
|
||
|
end
|
||
|
with_settings :display_subprojects_issues => '0' do
|
||
|
get '/projects/ecookbook'
|
||
|
assert_select '#main-menu a.roadmap', 0
|
||
|
end
|
||
|
end
|
||
|
end
|
||