35 lines
1.4 KiB
Twig
35 lines
1.4 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}User Profile{% endblock %}
|
|
|
|
{% block body %}
|
|
<div class="w-100 h-100 p-5 m-auto" data-controller="user">
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h1>Gestion Utilisateurs</h1>
|
|
{% if is_granted('ROLE_SUPER_ADMIN') %}
|
|
<a href="{{ path('user_new') }}" class="btn btn-primary">Ajouter un utilisateur</a>
|
|
{% endif %}
|
|
</div>
|
|
{#TODO: Remove/Adapt userList depending on design review #}
|
|
{% if is_granted('ROLE_SUPER_ADMIN') or is_granted('ROLE_ADMIN') %}
|
|
{% if usersByOrganization|length == 0 %}
|
|
<div class="alert alert-info">
|
|
<h4>Aucun utilisateur trouvé</h4>
|
|
</div>
|
|
{% else %}
|
|
{% for org in usersByOrganization %}
|
|
{% include 'user/userList.html.twig' with {
|
|
title: org.name,
|
|
organizationId: org.id|default(null),
|
|
users: org.users
|
|
} %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% else %}
|
|
<div class="alert alert-warning">
|
|
<h4>Accès limité</h4>
|
|
<p>Vous n'avez pas les permissions nécessaires pour voir la liste des utilisateurs.</p>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %} |