Easy_solution/templates/user/userList.html.twig

77 lines
3.7 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>
{% if organizationId %}
{# <span class="badge bg-primary">ID: {{ organizationId }}</span>#}
{% endif %}
</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é dans cette organisation.</td>
</tr>
{% else %}
{% for userData in org.users %}
<tr>
<td>
{% if userData.users.pictureUrl %}
<img src="{{ asset(userData.users.pictureUrl) }}" alt="User profile pic"
class="rounded-circle"
style="width:40px; height:40px;">
{% else %}
<div class="rounded-circle bg-secondary d-flex align-items-center justify-content-center"
style="width:40px; height:40px;">
<span class="text-white">{{ userData.users.name|first|upper }}{{ userData.users.surname|first|upper }}</span>
</div>
{% endif %}
</td>
<td>{{ userData.users.surname }}</td>
<td>{{ userData.users.name }}</td>
<td>{{ userData.users.email }}</td>
<td>
{% if userData.is_connected %}
<span class="badge bg-success">Actif</span>
{% else %}
<span class="badge bg-secondary">Inactif</span>
{% endif %}
</td>
<td>
{# {% if organizationId is defined and organizationId %}#}
{# <a href="{{ path('user_show', {'id': userData.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': userData.users.id}) }}"#}
{# class="p-3 align-middle color-primary">#}
{# {{ ux_icon('fa6-regular:eye', {height: '30px', width: '30px'}) }}#}
{# </a>#}
{# {% endif %}#}
</td>
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>
</div>
</div>
{% endblock %}