{% for action in actions %} {% set resend_action = false %} {% if (action.name == "resend" and (item.firstLogin is null or is_granted('ROLE_ADMIN'))) %} {% set resend_action = true %} {% endif %} {% set show_action = true %} {% if action.item_permission is defined %} {% set show_action = false %} {% for item_permission in action.item_permission %} {% if is_granted(item_permission) %} {% set show_action = true %} {% endif %} {% endfor %} {% endif %} {% if (show_action and action.name != "resend") or (action.name == "resend" and resend_action) %} {% if 'list' == action.name %} {% set action_href = request_parameters.referer|default('') ? request_parameters.referer|easyadmin_urldecode : path('easyadmin', request_parameters|merge({ action: 'list' })) %} {% elseif 'method' == action.type %} {% set action_href = path('easyadmin', request_parameters|merge({ action: action.name, id: item_id })) %} {% elseif 'route' == action.type %} {% set action_href = path(action.name, request_parameters|merge({ action: action.name, id: item_id })) %} {% endif %} {{ include(action.template, { action: action, action_href: action_href, is_dropdown: is_dropdown|default(false), item: item, item_id: item_id, request_parameters: request_parameters, translation_domain: translation_domain, trans_parameters: trans_parameters, }, with_context = false) }} {% endif %} {% endfor %}