liste.html.twig 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. {% extends "base.html.twig" %}
  2. {% block title %}{{ parent() }} - Liste des utilisateurs{% endblock %}
  3. {% block titre %}Liste des utilisateurs{% endblock %}
  4. {% block body %}
  5. <p><a class="btn btn-primary" href="{{ path("admin_createuser") }}" role="button">Créer un utiliisateur</a></p>
  6. <table class="table table-bordered table-hover table-sm">
  7. <thead class="thead-dark">
  8. <tr>
  9. <th>En ligne</th>
  10. <th>Username</th>
  11. <th>Prénom</th>
  12. <th>Nom</th>
  13. <th>Mail</th>
  14. <th>Dernière connexion</th>
  15. {#<th>Test Mail</th>#}
  16. <th>Roles</th>
  17. <th>Activé</th>
  18. <th>Actions</th>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. {% for user in users %}
  23. <tr>
  24. <td >
  25. {% if user.activeNow %}
  26. <i class="fa fa-user text-success"></i>
  27. {% else %}
  28. <i class="fa fa-user-o text-secondary"></i>
  29. {% endif %}
  30. </td>
  31. <td>{{ user.username }}</td>
  32. <td>{{ user.prenom }}</td>
  33. <td>{{ user.nom }}</td>
  34. <td>{{ user.mail }}</td>
  35. <td>{{ user.lastActivity | date("d/m/Y H:i")}}</td>
  36. {#<td><a href="{{ path('admin_sendmailtest', {"id": user.id}) }}">Envoyer un mail test</a></td>#}
  37. <td>{% for role in user.roles %}<p>{{ role }}</p>{% endfor %}</td>
  38. <td>{{ user.enabled }}</td>
  39. <td>
  40. {% if user != app.user %}
  41. <a href="{{ path('admin_deluser', {'id': user.id}) }}"><i class="fa fa-trash fa-lg text-danger"></i></a>
  42. {% endif %}
  43. <a href="{{ path('admin_edituser', {'id': user.id}) }}"><i class="fa fa-edit fa-lg text-primary"></i></a>
  44. <a href="{{ path('admin_edituseroptions', {'id': user.profile.id}) }}"><i class="fa fa-cog fa-lg"></i></a>
  45. </td>
  46. </tr>
  47. {% endfor %}
  48. </tbody>
  49. </table>
  50. {% endblock %}