Easy_solution/templates/user/userList.html.twig

69 lines
2.8 KiB
Twig

{% block body %}
<div class="card border-0 p-3 mb-4">
{% if title is defined %}
<div class="card-title d-flex justify-content-between align-items-center ">
<h3>{{ title }}</h3>
</div>
{% endif %}
<div class="card-body">
<table class="table align-middle ">
<thead class="table-light">
<tr>
<th>Picture</th>
<th>Surname</th>
<th>Name</th>
<th>Email</th>
<th>Statut</th>
<th>Visualiser</th>
</tr>
</thead>
<tbody>
{% if org.users|length == 0 %}
<tr>
<td colspan="6" class="text-center">Aucun utilisateur trouvé.</td>
</tr>
{% endif %}
{% for user in org.users %}
<tr>
<td>
{% if user.users.pictureUrl %}
<img src="{{ asset(user.users.pictureUrl) }}" alt="User profile pic"
class="rounded-circle"
style="width:40px; height:40px;">
{% endif %}
</td>
<td>{{ user.users.surname }}</td>
<td>{{ user.users.name }}</td>
<td>{{ user.users.email }}</td>
<td>
{% if user.is_connected %}
<span class="badge bg-success">Actif</span>
{% else %}
<span class="badge bg-secondary">Inactif</span>
{% endif %}
</td>
<td>
{% if organizationId is defined %}
<a href="{{ path('user_show', {'id': user.users.id, 'organizationId': organizationId}) }}"
class="p-3 align-middle color-primary">
{{ ux_icon('fa6-regular:eye', {height: '30px', width: '30px'}) }}
</a>
{% else %}
<a href="{{ path('user_show', {'id': user.users.id}) }}"
class="p-3 align-middle color-primary">
{{ ux_icon('fa6-regular:eye', {height: '30px', width: '30px'}) }}
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}