mirror of
https://github.com/rickbarrette/redmine_qbo_calendar.git
synced 2026-10-03 20:40:43 -04:00
Refactor menu registration to add top menu item for calendar and remove project menu entry for customer calendar
This commit is contained in:
1 parent
97ed852068
commit
8448c06b10
1 file changed
+3
-8
@@ -46,20 +46,15 @@ Redmine::Plugin.register :redmine_qbo_calendar do
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
menu :project_menu,
|
|
||||||
:customer_calendar,
|
|
||||||
{ controller: 'events',
|
|
||||||
action: 'index' },
|
|
||||||
caption: 'Customer Calendar',
|
|
||||||
after: :calendar,
|
|
||||||
param: :project_id
|
|
||||||
|
|
||||||
# Global Permissions
|
# Global Permissions
|
||||||
permission :view_customer_appointments, { customer_appointments: [:index, :show] }, global: true
|
permission :view_customer_appointments, { customer_appointments: [:index, :show] }, global: true
|
||||||
permission :add_customer_appointments, { customer_appointments: [:new, :create] }, global: true
|
permission :add_customer_appointments, { customer_appointments: [:new, :create] }, global: true
|
||||||
permission :edit_customer_appointments, { customer_appointments: [:edit, :update] }, global: true
|
permission :edit_customer_appointments, { customer_appointments: [:edit, :update] }, global: true
|
||||||
permission :delete_customer_appointments, { customer_appointments: [:destroy] }, 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
|
end
|
||||||
|
|
||||||
Rails.configuration.to_prepare do
|
Rails.configuration.to_prepare do
|
||||||
|
|||||||
Reference in new issue
Block a user