153 lines
9.4 KiB
Twig
153 lines
9.4 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block body %}
|
|
|
|
<div class="w-100 h-100 p-5 m-auto">
|
|
<div class="card p-3 m-3 border-0 no-header-bg" data-controller="user" data-user-id-value="{{ user.id }}">
|
|
{% for type, messages in app.flashes %}
|
|
{% for message in messages %}
|
|
<div class="alert alert-{{ type }}">
|
|
{{ message }}
|
|
</div>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
<div class="card-header border-0 d-flex justify-content-between align-items-center ">
|
|
<div class="card-title"><h1>Gestion Utilisateur</h1></div>
|
|
<div class="d-flex gap-2">
|
|
{% if is_granted("ROLE_ADMIN") %}
|
|
<button
|
|
class="btn {{ user.active ? 'btn-secondary' : 'btn-success' }}"
|
|
data-user-target="statusButton"
|
|
data-action="click->user#toggleStatus"
|
|
data-active="{{ user.active ? 'true' : 'false' }}">
|
|
{{ user.active ? 'Désactiver' : 'Réactiver' }}
|
|
</button>
|
|
|
|
<a href="{{ path('user_delete', {'id': user.id}) }}" class="btn btn-warning">Supprimer</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
|
|
{% include 'user/userInformation.html.twig' %}
|
|
|
|
|
|
<div class="card border-0 no-header-bg ">
|
|
<div class="card-header">
|
|
<div class="card-title">
|
|
<h1>Information d'organisation</h1>
|
|
</div>
|
|
</div>
|
|
<div class="card-body ms-4">
|
|
{# TODO: dynamic number of project#}
|
|
<p><b>Projet : </b>69 projets vous sont attribués</p>
|
|
</div>
|
|
|
|
|
|
{# <div class="card-body">#}
|
|
{# <div class="row g-2">#}
|
|
{# {% for app in apps %}#}
|
|
{# <div class="col-12 col-md-6">#}
|
|
{# <div class="card h-100">#}
|
|
{# <div class="card-header d-flex gap-2">#}
|
|
{# {% if app.logoMiniUrl %}#}
|
|
{# <img src="{{ asset(appli.entity.logoMiniUrl) }}" alt="Logo {{ app.name }}"#}
|
|
{# class="rounded-circle" style="width:50px; height:50px;">#}
|
|
{# {% endif %}#}
|
|
{# <div class="card-title">#}
|
|
{# <h1>{{ app.name|title }}</h1>#}
|
|
{# </div>#}
|
|
{# </div>#}
|
|
|
|
{# <div class="card-body">#}
|
|
{# <div class="row">#}
|
|
{# <p>#}
|
|
{# <b>Description :</b>#}
|
|
{# {{ app.descriptionSmall|default('Aucune description disponible.')|raw }}#}
|
|
{# </p>#}
|
|
{# </div>#}
|
|
|
|
{# #}{# find appGroup once, used in both editable and read-only branches #}
|
|
{# {% set appGroup = data.uoas[app.id]|default(null) %}#}
|
|
|
|
{# {% if canEdit %}#}
|
|
{# <form method="POST"#}
|
|
{# action="{{ path('user_application_role', { id: data.singleUo.id }) }}">#}
|
|
{# <div class="form-group mb-3">#}
|
|
{# <label for="roles-{{ app.id }}"><b>Rôles :</b></label>#}
|
|
{# <div class="form-check">#}
|
|
{# {% if appGroup %}#}
|
|
{# {% for role in data.rolesArray %}#}
|
|
{# <input class="form-check-input" type="checkbox"#}
|
|
{# name="roles[]"#}
|
|
{# value="{{ role.id }}"#}
|
|
{# id="role-{{ role.id }}-app-{{ app.id }}"#}
|
|
{# {% if role.id in appGroup.selectedRoleIds %}checked{% endif %}>#}
|
|
{# <label class="form-check"#}
|
|
{# for="role-{{ role.id }}-app-{{ app.id }}">#}
|
|
{# {% if role.name == 'USER' %}#}
|
|
{# Accès#}
|
|
{# {% else %}#}
|
|
{# {{ role.name|capitalize }}#}
|
|
{# {% endif %}#}
|
|
{# </label>#}
|
|
{# {% endfor %}#}
|
|
{# {% else %}#}
|
|
{# <p class="text-muted">Aucun rôle défini pour cette application.</p>#}
|
|
{# {% endif %}#}
|
|
{# </div>#}
|
|
{# <button type="submit" name="appId" value="{{ app.id }}"#}
|
|
{# class="btn btn-primary mt-2">#}
|
|
{# Sauvegarder#}
|
|
{# </button>#}
|
|
{# </div>#}
|
|
{# </form>#}
|
|
{# {% else %}#}
|
|
{# <div class="form-group mb-3">#}
|
|
{# <label for="roles-{{ app.id }}"><b>Rôles :</b></label>#}
|
|
{# <div class="form-check">#}
|
|
{# {% if appGroup %}#}
|
|
{# {% for role in data.rolesArray %}#}
|
|
{# <input class="form-check-input" type="checkbox"#}
|
|
{# disabled#}
|
|
{# name="roles[]"#}
|
|
{# value="{{ role.id }}"#}
|
|
{# id="role-{{ role.id }}-app-{{ app.id }}"#}
|
|
{# {% if role.id in appGroup.selectedRoleIds %}checked{% endif %}>#}
|
|
{# <label class="form-check"#}
|
|
{# for="role-{{ role.id }}-app-{{ app.id }}">#}
|
|
{# {% if role.name == 'USER' %}#}
|
|
{# Accès#}
|
|
{# {% else %}#}
|
|
{# {{ role.name|capitalize }}#}
|
|
{# {% endif %}#}
|
|
{# </label>#}
|
|
{# {% endfor %}#}
|
|
{# {% else %}#}
|
|
{# <p class="text-muted">Aucun rôle défini pour cette application.</p>#}
|
|
{# {% endif %}#}
|
|
{# </div>#}
|
|
{# </div>#}
|
|
{# {% endif %}#}
|
|
{# </div>#}
|
|
{# </div>#}
|
|
{# </div>#}
|
|
{# {% endfor %}#}
|
|
{# </div>#}
|
|
{# </div>#}
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
{% block title %}
|
|
|
|
{% endblock %}
|
|
|