From 37219e4ddd9a01d267df9a3481a2278a2c1055a2 Mon Sep 17 00:00:00 2001 From: Jan Schulz-Hofen Date: Wed, 5 Feb 2014 13:48:48 +0700 Subject: [PATCH 5/6] move "New issue" menu item to the new object menu and highlight the "Issues" tab on "new" and "create" --- lib/redmine.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/redmine.rb b/lib/redmine.rb index d75cfd3..56b578a 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -228,6 +228,11 @@ end Redmine::MenuManager.map :project_menu do |menu| menu.push :new_object, nil, :caption => ' + ', :html => { :id => 'new-object', :onclick => 'toggleNewObjectDropdown(); return false;' } + menu.push :new_issue_sub, { :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| Issue.allowed_target_trackers(p).any? }, + :permission => :add_issues, + :parent => :new_object menu.push :new_issue_category, {:controller => 'issue_categories', :action => 'new'}, :param => :project_id, :caption => :label_issue_category_new, :parent => :new_object menu.push :new_version, {:controller => 'versions', :action => 'new'}, :param => :project_id, :caption => :label_version_new, @@ -244,7 +249,6 @@ 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) }, :if => Proc.new { |p| Setting.new_project_issue_tab_enabled? && Issue.allowed_target_trackers(p).any? }, :permission => :add_issues menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt -- 2.7.2