{% macro teams(view) %} {% import "macros/widgets.html.twig" as widgets %} {% set event = actions(app.user, 'teams', view) %} {{ widgets.page_actions(event.actions) }} {% endmacro %} {% macro team(team, view) %} {% import "macros/widgets.html.twig" as widgets %} {% set event = actions(app.user, 'team', view, {'team': team}) %} {% if view == 'index' %} {{ widgets.table_actions(event.actions) }} {% else %} {{ widgets.page_actions(event.actions) }} {% endif %} {% endmacro %}