{% macro calendar(view) %} {% import "macros/widgets.html.twig" as widgets %} {% set actions = {} %} {% if is_granted('create_own_timesheet') %} {% set actions = actions|merge({'create': {'url': path('timesheet_create'), 'class': 'modal-ajax-form'}}) %} {% endif %} {% set event = trigger('actions.calendar', {'actions': actions, 'view': view}) %} {{ widgets.page_actions(event.payload.actions) }} {% endmacro %}