Skip to content
Snippets Groups Projects
Commit 576a4a6f authored by GOEPP CLARA's avatar GOEPP CLARA
Browse files

liste des utilisateurs

parent 992fbe97
No related merge requests found
......@@ -3,41 +3,21 @@
{% block title %}User index{% endblock %}
{% block body %}
<h1>User index</h1>
<main class="my-12">
<h1 class="text-center">User index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Email</th>
<th>Roles</th>
<th>Password</th>
<th>Username</th>
<th>IsVerified</th>
<th>actions</th>
</tr>
</thead>
<tbody>
<div class="flex flex-wrap justify-center mt-8 gap-4 md:gap-12 max-w-sreen">
{% for user in users %}
<tr>
<td>{{ user.id }}</td>
<td>{{ user.email }}</td>
<td>{{ user.roles ? user.roles|json_encode : '' }}</td>
<td>{{ user.password }}</td>
<td>{{ user.username }}</td>
<td>{{ user.isVerified ? 'Yes' : 'No' }}</td>
<td>
<a href="{{ path('app_user_show', {'id': user.id}) }}">show</a>
<a href="{{ path('app_user_edit', {'id': user.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="7">no records found</td>
</tr>
<div class="bg-[#EEEEEE] w-fit md:w-fit p-5 case">
<p>{{ user.username }}</p>
<p>{{ user.email }}</p>
<p>{{ user.roles ? user.roles|json_encode : '' }}</p>
<form method="post" action="{{ path('app_user_delete', {'id': user.id}) }}" onsubmit="return confirm('Êtes-vous sûr de vouloir supprimer ce user ?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ user.id) }}">
<button class="btn w-fit text-[#AA0000] "><i class="bi bi-trash-fill text-sm text-right"></i></button>
</form>
</div>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_user_new') }}">Create new</a>
</div>
</main>
{% endblock %}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment