{% extends '@DWGinger/crud/list.html.twig' %} {% block list_actions %} {% if is_granted('ROLE_GINGER_USER_CREATE') %} {{ 'title.user_new'|trans }} {% endif %} {% endblock %} {% block table_header %} {{ 'label.user'|trans }} {{ 'label.email'|trans }} {{ 'label.roles'|trans }} {{ 'label.last_login'|trans }} {% if is_granted('ROLE_ALLOWED_TO_SWITCH') %} Switch {% endif %} {% endblock %} {% block table_body %} {% for user in pagination %} {% if is_granted('ROLE_GINGER_USER_CREATE') %} {{ user }} {% else %} {{ user }} {% endif %} {{ user.email }} {% for role in user.roles -%} {% if role != 'ROLE_USER' -%} {%- if not loop.first %}, {% endif -%} {{ ('label.role.' ~ role) | trans -}} {%- endif -%} {%- endfor %} {{ (user.lastLogin) ? user.lastLogin|date('d.m.Y H:i:s') : 'never'|trans }} {% if is_granted('ROLE_ALLOWED_TO_SWITCH') %} {% endif %} {% endfor %} {% endblock %}