From 8448c06b1024717e35b4dc4fb518ff45a91f4588 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Sun, 6 Sep 2026 21:21:45 -0400 Subject: [PATCH] Refactor menu registration to add top menu item for calendar and remove project menu entry for customer calendar --- init.rb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/init.rb b/init.rb index 8b14406..9f02955 100644 --- a/init.rb +++ b/init.rb @@ -46,20 +46,15 @@ Redmine::Plugin.register :redmine_qbo_calendar do } end - menu :project_menu, - :customer_calendar, - { controller: 'events', - action: 'index' }, - caption: 'Customer Calendar', - after: :calendar, - param: :project_id - # Global Permissions permission :view_customer_appointments, { customer_appointments: [:index, :show] }, global: true permission :add_customer_appointments, { customer_appointments: [:new, :create] }, global: true permission :edit_customer_appointments, { customer_appointments: [:edit, :update] }, global: true permission :delete_customer_appointments, { customer_appointments: [:destroy] }, global: true + # Register top menu items + menu :top_menu, :calendar, { controller: :calendars, action: :show }, caption: :label_calendar, if: Proc.new {User.current.logged?} + end Rails.configuration.to_prepare do