templates/shop/users.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Edit Shop{% endblock %}
  3. {% block body %}
  4.     <div class="d-flex justify-content-between">
  5.         <h3>{{ shop.name }}</h3>
  6.         <a href="{{ path('app_shop_index') }}">{{ "back to list"|trans }}</a>
  7.     </div>
  8.     {# { include('shop/_delete_form.html.twig') }#}
  9. <h1>{{ "Users"|trans }}</h1>
  10.     <table class="table table-bordered table-striped">
  11.         <thead>
  12.         <tr>
  13.             <th>{{ knp_pagination_sortable(users, 'Email'|trans, 'u.email') }}</th>
  14.             <th>{{ knp_pagination_sortable(users, 'Firstname'|trans, 'u.firstname') }}</th>
  15.             <th>{{ knp_pagination_sortable(users, 'Lastname'|trans, 'u.lastname') }}</th>
  16.             <th>{{ knp_pagination_sortable(users, 'Company'|trans, 'c.name') }}</th>
  17.             <th>{{ "Phone"|trans }}</th>
  18.             {% if is_granted('ROLE_SUPER_ADMIN') %}
  19.                 <th>{{ knp_pagination_sortable(users, 'Shop'|trans, 's.name') }}</th>
  20.                 <th>Sup Admin</th>
  21.                 <th>Admin</th>
  22.                 <th>User</th>
  23.             {%  endif %}
  24.             <th></th>
  25.         </tr>
  26.         </thead>
  27.         <tbody>
  28.         {% for user in users %}
  29.             <tr>
  30.                 <td>{{ user.email }}</td>
  31.                 <td>{{ user.firstname }}</td>
  32.                 <td>{{ user.lastname }}</td>
  33.                 <td>{{ user.company?user.company:'' }}</td>
  34.                 <td>{{ user.phone }}</td>
  35.                 {% if is_granted('ROLE_SUPER_ADMIN') %}
  36.                     <td>{{ user.shop }}</td>
  37.                     <td>{% if user.isGranted('ROLE_SUPER_ADMIN') %}<i class="bi bi-check-square"></i>{% endif %}</td>
  38.                     <td>{% if user.isGranted('ROLE_ADMIN') %}<i class="bi bi-check-square"></i>{% endif %}</td>
  39.                     <td>{% if user.isGranted('ROLE_USER') %}<i class="bi bi-check-square"></i>{% endif %}</td>
  40.                 {%  endif %}
  41.                 <td>
  42.                     <a href="{{ path('app_user_edit', {'id': user.id}) }}">detail</a>
  43.                 </td>
  44.             </tr>
  45.         {% else %}
  46.             <tr>
  47.                 <td colspan="6">{{ "no records found"|trans }}</td>
  48.             </tr>
  49.         {% endfor %}
  50.         </tbody>
  51.     </table>
  52.     <div class="d-flex justify-content-between">
  53.         <div class="navigation">
  54.             {{ knp_pagination_render(users) }}
  55.         </div>
  56.     </div>
  57. {% endblock %}