|
|
|
@ -39,14 +39,23 @@ Redmine::MenuManager.map :top_menu do |menu| |
|
|
|
|
menu.push :work_packages, |
|
|
|
|
{ controller: '/work_packages', project_id: nil, action: 'index' }, |
|
|
|
|
caption: I18n.t('label_work_package_plural'), |
|
|
|
|
if: Proc.new { User.current.allowed_to?(:view_work_packages, nil, global: true) } |
|
|
|
|
if: Proc.new { |
|
|
|
|
(User.current.logged? || !Setting.login_required?) && |
|
|
|
|
User.current.allowed_to?(:view_work_packages, nil, global: true) |
|
|
|
|
} |
|
|
|
|
menu.push :news, |
|
|
|
|
{ controller: '/news', project_id: nil, action: 'index' }, |
|
|
|
|
if: Proc.new { User.current.allowed_to?(:view_news, nil, global: true) } |
|
|
|
|
if: Proc.new { |
|
|
|
|
(User.current.logged? || !Setting.login_required?) && |
|
|
|
|
User.current.allowed_to?(:view_news, nil, global: true) |
|
|
|
|
} |
|
|
|
|
menu.push :time_sheet, |
|
|
|
|
{ controller: '/time_entries', project_id: nil, action: 'index' }, |
|
|
|
|
caption: I18n.t('label_time_sheet_menu'), |
|
|
|
|
if: Proc.new { User.current.allowed_to?(:view_time_entries, nil, global: true) } |
|
|
|
|
if: Proc.new { |
|
|
|
|
(User.current.logged? || !Setting.login_required?) && |
|
|
|
|
User.current.allowed_to?(:view_time_entries, nil, global: true) |
|
|
|
|
} |
|
|
|
|
menu.push :help, OpenProject::Info.help_url, |
|
|
|
|
last: true, |
|
|
|
|
caption: '', |
|
|
|
|