64 lines
3.0 KiB
Twig
64 lines
3.0 KiB
Twig
|
{% extends 'base-admin.html.twig' %}
|
||
|
|
||
|
{% block body %}
|
||
|
<div class="container mx-auto px-16 mt-4">
|
||
|
<div class="p-6 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700">
|
||
|
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">Liste des utilisateurs</h5>
|
||
|
<div class="flex justify-end">
|
||
|
<a href="{{ path('app_admin_user_create') }}" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 dark:bg-blue-600 dark:hover:bg-blue-700 focus:outline-none dark:focus:ring-blue-800">Créer un utilisateur</a>
|
||
|
</div>
|
||
|
<div class="mt-4">
|
||
|
{{ include('partials/alerts.html.twig') }}
|
||
|
</div>
|
||
|
<div class="relative overflow-x-auto shadow-md sm:rounded-lg mt-4">
|
||
|
<table class="w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
||
|
<thead class="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
||
|
<tr>
|
||
|
<th scope="col" class="px-6 py-3">
|
||
|
Id
|
||
|
</th>
|
||
|
<th scope="col" class="px-6 py-3">
|
||
|
Email
|
||
|
</th>
|
||
|
<th scope="col" class="px-6 py-3">
|
||
|
Rôle
|
||
|
</th>
|
||
|
<th scope="col" class="px-6 py-3">
|
||
|
Action
|
||
|
</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
{% for user in users %}
|
||
|
<tr class="odd:bg-white odd:dark:bg-gray-900 even:bg-gray-50 even:dark:bg-gray-800 border-b dark:border-gray-700">
|
||
|
<th scope="row" class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
|
||
|
{{ user.id }}
|
||
|
</th>
|
||
|
<td class="px-6 py-4">
|
||
|
{{ user.email }}
|
||
|
</td>
|
||
|
<td class="px-6 py-4">
|
||
|
{{ user.roles[0] == 'ROLE_ADMIN' ? 'Administrateur' : 'Utilisateur' }}
|
||
|
</td>
|
||
|
<td class="px-6 py-4 flex gap-2 light:text-black">
|
||
|
<a href="{{ path('app_admin_user_edit', {
|
||
|
user: user.id
|
||
|
}) }}" class="hover:text-blue-700 duration-300"><twig:ux:icon class="w-6 h-6" name="fa6-solid:pencil" /></a>
|
||
|
<a href="{{ path('app_admin_user_delete', {
|
||
|
user: user.id
|
||
|
}) }}" class="hover:text-red-700 duration-300"><twig:ux:icon class="w-6 h-6" name="fa6-solid:trash-can" /></a>
|
||
|
</td>
|
||
|
</tr>
|
||
|
{% endfor %}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
{% endblock %}
|
||
|
|
||
|
{% block title %}
|
||
|
Liste des utilisateurs
|
||
|
{% endblock %}
|
||
|
|