diff options
| author | cedricnjanga | 2018-01-23 22:46:16 -0800 |
|---|---|---|
| committer | cedricnjanga | 2018-01-31 07:18:19 -0800 |
| commit | 6632217117a66bd09b2e8261e4351add9971d47c (patch) | |
| tree | 2d30ea8b65c6a526daa0014c0fb5d32128ee1119 /app/decorators | |
| parent | 2dd90cb38b4da66cdcc008beed6b15d073d1f4be (diff) | |
| download | chouette-core-6632217117a66bd09b2e8261e4351add9971d47c.tar.bz2 | |
First draft for including calendars into workgroup for having appropriate scoping
Diffstat (limited to 'app/decorators')
| -rw-r--r-- | app/decorators/calendar_decorator.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/decorators/calendar_decorator.rb b/app/decorators/calendar_decorator.rb index 0a7cbc312..1b2a085b7 100644 --- a/app/decorators/calendar_decorator.rb +++ b/app/decorators/calendar_decorator.rb @@ -5,11 +5,21 @@ class CalendarDecorator < AF83::Decorator create_action_link +<<<<<<< HEAD with_instance_decorator do |instance_decorator| instance_decorator.show_action_link instance_decorator.edit_action_link instance_decorator.destroy_action_link do |l| l.data {{ confirm: h.t('calendars.actions.destroy_confirm') }} +======= + if h.policy(object).destroy? + links << Link.new( + content: h.destroy_link_content, + href: h.workgroup_calendar_path(context[:workgroup], object), + method: :delete, + data: { confirm: h.t('calendars.actions.destroy_confirm') } + ) +>>>>>>> First draft for including calendars into workgroup for having appropriate scoping end end end |
