summaryrefslogtreecommitdiffstats
path: root/lib/redmine.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-12-05 12:17:20 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-12-05 12:17:20 +0000
commit7c1445f19a6030bc6c23f6463411fe0e6c607f41 (patch)
tree5177d4ffa5fc60c00c4f3adceecbe93cbea4118c /lib/redmine.rb
parent934e3c7de15177e3846880edfb5e8f98b0ce4b10 (diff)
downloadredmine-7c1445f19a6030bc6c23f6463411fe0e6c607f41.tar.gz
redmine-7c1445f19a6030bc6c23f6463411fe0e6c607f41.zip
Tab "New Issue" should not be displayed if a project has no trackers (#18571).
git-svn-id: http://svn.redmine.org/redmine/trunk@13713 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 bf7732352..f8f70d3d4 100644
--- a/lib/redmine.rb
+++ b/lib/redmine.rb
@@ -230,7 +230,8 @@ Redmine::MenuManager.map :project_menu do |menu|
:if => Proc.new { |p| 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) }
+ :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) },
+ :if => Proc.new { |p| p.trackers.any? }
menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt
menu.push :calendar, { :controller => 'calendars', :action => 'show' }, :param => :project_id, :caption => :label_calendar
menu.push :news, { :controller => 'news', :action => 'index' }, :param => :project_id, :caption => :label_news_plural