diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-11 07:26:23 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-11 07:26:23 +0000 |
commit | 79fcbc82dc9c8d9d7023823e6e44e56e4970ff9d (patch) | |
tree | 2ac1da6d0331cc3f75276ec2489cbc2948696461 /lib | |
parent | 893c96a9909d0365a28c8cf4ac5fa7d4a3ec75e3 (diff) | |
download | redmine-79fcbc82dc9c8d9d7023823e6e44e56e4970ff9d.tar.gz redmine-79fcbc82dc9c8d9d7023823e6e44e56e4970ff9d.zip |
Adds a setting for choosing the new object menu item style (#15880).
Set to use the new "+" drop-down by default, but let users revert to the "New issue" tab, or no menu item at all.
git-svn-id: http://svn.redmine.org/redmine/trunk@15508 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/redmine.rb b/lib/redmine.rb index fc166b650..71722cc8e 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -227,6 +227,7 @@ end Redmine::MenuManager.map :project_menu do |menu| menu.push :new_object, nil, :caption => ' + ', + :if => Proc.new { |p| Setting.new_item_menu_tab == '2' }, :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) }, @@ -251,7 +252,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, - :if => Proc.new { |p| Setting.new_project_issue_tab_enabled? && Issue.allowed_target_trackers(p).any? }, + :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }, + :if => Proc.new { |p| Setting.new_item_menu_tab == '1' && Issue.allowed_target_trackers(p).any? }, :permission => :add_issues 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 |