Files
2025-10-27 13:12:25 +01:00

55 lines
1.8 KiB
Twig

{% extends 'backend/basic/base_admin.html.twig' %}
{% block title %} Utilisateurs {% endblock %}
{% block body %}
<h1 class="h3 mb-3">
<strong>Utilisateurs</strong>
</h1>
<div class="row">
<div class="col-12 d-flex">
<div class="card flex-fill">
<div class="card-header">
<h5 class="card-title mb-0">Liste utilisateurs</h5>
</div>
<table class="table-user">
<thead>
<tr>
<th>Id</th>
<th>Email</th>
<th>Nom</th>
<th>Prénom</th>
<th>Naissance</th>
<th>Gender</th>
<th>Date</th>
<th>Option</th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td>{{ user.getId() }}</td>
<td>{{ user.getEmail() }}</td>
<td>{{ user.getFirstname() }}</td>
<td>{{ user.getLastname() }}</td>
<td>{{ user.getBirthdateText('d/m/Y') }}</td>
<td> {% if (user.getGender() == 1) %} H {% elseif (user.getGender() == 0) %} F {% endif %}</td>
<td>{{ user.getDateAddText('d/m/Y H:i:s') }}</td>
<td>
<a href="{{ path('admin_utilisateur_change_role', {id:user.getId()}) }}"><button class="btn btn-primary btn-sm">Partner</button></a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
<script>
$('.table-user').DataTable( {
"order": [[0, 'desc']]
} );
</script>
{% endblock %}