{% extends 'admin/base.html.twig' %}
{% block title %}User index{% endblock %}
{% block body %}
<section class="mb-3 mb-lg-5">
<div class="card card-table mb-4">
<div class="card-header">
<div class="card-heading">
<span>Gestion des membres </span>
<a href="{{ path('app_user_new') }}">
<span class="badge rounded-pill me-2 p-2 bg-primary" style="float:right"> Ajouter un membre</span>
</a>
</div>
</div>
<table class="table table-hover mb-0" id="datatable2">
<thead>
<tr>
<th>Id</th>
<th>Email</th>
<th>Roles</th>
<th>Valider</th>
<th>Active</th>
<th>Bilan</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td>{{ user.id }}</td>
<td>{{ user.email }}</td>
<td>{{ user.roles ? user.roles|json_encode : '' }}</td>
<td>{{ user.isVerified ? 'Yes' : 'No' }}</td>
<td>{{ user.active ? 'Yes' : 'No' }}</td>
<td>
<a class="me-3 text-lg text-success" href="{{ path('app_user_edit', {'id': user.id}) }}">
<i class="far fa-edit"></i>
</a>
<a class="text-lg text-danger" href="#">
<i class="far fa-trash-alt"></i>
</a>
</td>
<td>
<a class="me-3 text-lg text-success" href="{{ path('app_user_edit', {'id': user.id}) }}">
<i class="far fa-edit"></i>
</a>
<a class="text-lg text-danger" href="#">
<i class="far fa-trash-alt"></i>
</a>
</td>
{#<td>
<a href="{{ path('app_user_show', {'id': user.id}) }}">Détails</a>
</td>#}
</tr>
{% else %}
<tr>
<td colspan="6">Aucun membre</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>
{% endblock %}