summaryrefslogtreecommitdiffstats
path: root/lib/redmine.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-02-02 11:08:04 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-02-02 11:08:04 +0000
commit12c0f5f66e21bbfdeed82f00eabe7b47ed99d85f (patch)
tree871cf456f32b703152eeb38ec21353ddfc981a84 /lib/redmine.rb
parent45b69c4a656491221eb12df85c282949955a50b8 (diff)
downloadredmine-12c0f5f66e21bbfdeed82f00eabe7b47ed99d85f.tar.gz
redmine-12c0f5f66e21bbfdeed82f00eabe7b47ed99d85f.zip
Do not show Roadmap menu item if the project doesn't define any versions.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1107 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine.rb')
-rw-r--r--lib/redmine.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/redmine.rb b/lib/redmine.rb
index 1aee1767c..92a1cef14 100644
--- a/lib/redmine.rb
+++ b/lib/redmine.rb
@@ -93,7 +93,8 @@ end
Redmine::MenuManager.map :project_menu do |menu|
menu.push :overview, { :controller => 'projects', :action => 'show' }, :caption => :label_overview
menu.push :activity, { :controller => 'projects', :action => 'activity' }, :caption => :label_activity
- menu.push :roadmap, { :controller => 'projects', :action => 'roadmap' }, :caption => :label_roadmap
+ menu.push :roadmap, { :controller => 'projects', :action => 'roadmap' },
+ :if => Proc.new { |p| p.versions.any? }, :caption => :label_roadmap
menu.push :issues, { :controller => 'issues', :action => 'index' }, :param => :project_id, :caption => :label_issue_plural
menu.push :new_issue, { :controller => 'issues', :action => 'new' }, :param => :project_id, :caption => :label_issue_new,
:html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }