templates/user/index.html.twig line 1

Open in your IDE?
  1. {% extends 'admin/base.html.twig' %}
  2. {% block title %}User index{% endblock %}
  3. {% block body %}
  4. <section class="mb-3 mb-lg-5">
  5.  <div class="card card-table mb-4">
  6.     <div class="card-header">
  7.         <div class="card-heading">
  8.          <span>Gestion des membres </span>
  9.          <a href="{{ path('app_user_new') }}">
  10.          <span class="badge rounded-pill me-2 p-2 bg-primary" style="float:right"> Ajouter un membre</span>
  11.          </a>
  12.         
  13.         </div>
  14.         
  15.     </div>
  16.     <table class="table table-hover mb-0" id="datatable2">
  17.         <thead>
  18.             <tr>
  19.                 <th>Id</th>
  20.                 <th>Email</th>
  21.                 <th>Roles</th>
  22.                 <th>Valider</th>
  23.                 <th>Active</th>
  24.                 <th>Bilan</th>
  25.                 <th>Action</th>
  26.             </tr>
  27.         </thead>
  28.         <tbody>
  29.         {% for user in users %}
  30.             <tr>
  31.                 <td>{{ user.id }}</td>
  32.                 <td>{{ user.email }}</td>
  33.                 <td>{{ user.roles ? user.roles|json_encode : '' }}</td>
  34.                 <td>{{ user.isVerified ? 'Yes' : 'No' }}</td>
  35.                 <td>{{ user.active ? 'Yes' : 'No' }}</td>
  36.                 
  37.                 <td>
  38.                     <a class="me-3 text-lg text-success" href="{{ path('app_user_edit', {'id': user.id}) }}">
  39.                     <i class="far fa-edit"></i>
  40.                     </a>
  41.                     <a class="text-lg text-danger" href="#">
  42.                     <i class="far fa-trash-alt"></i>
  43.                     </a>
  44.                 </td>
  45.                 <td>
  46.                     <a class="me-3 text-lg text-success" href="{{ path('app_user_edit', {'id': user.id}) }}">
  47.                     <i class="far fa-edit"></i>
  48.                     </a>
  49.                     <a class="text-lg text-danger" href="#">
  50.                     <i class="far fa-trash-alt"></i>
  51.                     </a>
  52.                 </td>
  53.                 {#<td>
  54.                     <a href="{{ path('app_user_show', {'id': user.id}) }}">Détails</a>
  55.                 </td>#}
  56.             </tr>
  57.         {% else %}
  58.             <tr>
  59.                 <td colspan="6">Aucun membre</td>
  60.             </tr>
  61.         {% endfor %}
  62.         </tbody>
  63.     </table>
  64.     
  65. </section>
  66. {% endblock %}