From ede8f80704939b4fe27de70654215f5c98461267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Mon, 22 Jun 2015 10:47:24 +0200 Subject: [PATCH] Remove core time entries top menu item When this plugin is loaded, Cost Reports should replace the default menu item 'Modules' > 'Time Entries'. This commit removes the time entries menu item. Relevant work package: https://community.openproject.org/work_packages/20269 --- lib/open_project/reporting/engine.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/open_project/reporting/engine.rb b/lib/open_project/reporting/engine.rb index a0b7af7871..03333e803e 100644 --- a/lib/open_project/reporting/engine.rb +++ b/lib/open_project/reporting/engine.rb @@ -63,9 +63,13 @@ module OpenProject::Reporting if: Proc.new { |project| project.module_enabled?(:reporting_module) }, html: { class: 'icon2 icon-stats' } + # Cost reports should remove the default time entries menu item hide_menu_item :project_menu, :time_entries, hide_if: -> (project) { project.module_enabled?(:reporting_module) } + + hide_menu_item :top_menu, + :time_sheet end initializer "reporting.register_hooks" do