|
|
@@ -318,16 +318,21 @@ Redmine::MenuManager.map :admin_menu do |menu| |
|
|
|
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) }, |
|
|
|
:if => Proc.new { |p| Issue.allowed_target_trackers(p).any? }, |
|
|
|
:permission => :add_issues, |
|
|
|
:parent => :new_object |
|
|
|
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)}, |
|
|
|
: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, |
|
|
@@ -353,16 +358,33 @@ Redmine::MenuManager.map :project_menu do |menu| |
|
|
|
|
|
|
|
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| Setting.display_subprojects_issues? ? p.rolled_up_versions.any? : p.shared_versions.any?} |
|
|
|
menu.push( |
|
|
|
:roadmap, |
|
|
|
{:controller => 'versions', :action => 'index'}, |
|
|
|
:param => :project_id, |
|
|
|
:if => |
|
|
|
Proc.new do |p| |
|
|
|
if Setting.display_subprojects_issues? |
|
|
|
p.rolled_up_versions.any? |
|
|
|
else |
|
|
|
p.shared_versions.any? |
|
|
|
end |
|
|
|
end |
|
|
|
) |
|
|
|
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_item_menu_tab == '1' && Issue.allowed_target_trackers(p).any?}, |
|
|
|
:permission => :add_issues |
|
|
|
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 do |p| |
|
|
|
Setting.new_item_menu_tab == '1' && |
|
|
|
Issue.allowed_target_trackers(p).any? |
|
|
|
end, |
|
|
|
:permission => :add_issues |
|
|
|
) |
|
|
|
menu.push :time_entries, {:controller => 'timelog', :action => 'index'}, |
|
|
|
:param => :project_id, :caption => :label_spent_time |
|
|
|
menu.push :gantt, {:controller => 'gantts', :action => 'show'}, |