2022-07-21 16:15:47 +02:00
|
|
|
{% extends 'base.html.twig' %}
|
|
|
|
|
|
|
|
{% block body %}
|
2022-10-02 14:50:48 +02:00
|
|
|
{% if access!="all" %}
|
2022-07-21 16:15:47 +02:00
|
|
|
<h1 class="page-header">Gestion des Utilisateurs</h1>
|
|
|
|
{% if appMasteridentity=="SQL" or not appSynchroPurgeUser %}
|
|
|
|
<a class="btn btn-success" href={{ path('app_'~access~'_user_submit') }}>Ajouter</a>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
|
2022-07-26 16:03:53 +02:00
|
|
|
{% if auditUse and (access=="admin" or access=="audit") %}
|
2022-10-02 14:50:48 +02:00
|
|
|
<a class="btn btn-secondary float-end ms-3" href="{{ path("app_"~access~"_audit_render",{entityname:"User"}) }}"><i class="fas fa-eye fa-fw"></i> Audit</a>
|
2022-07-26 16:03:53 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2022-10-02 14:50:48 +02:00
|
|
|
|
|
|
|
{% if access!="all" %}
|
|
|
|
<div class="form-check form-switch float-end mt-2">
|
|
|
|
<input class="form-check-input" type="checkbox" role="switch" id="checkisactivate" {% if isactive %}checked{%endif%}>
|
|
|
|
<label class="form-check-label" for="checkisactivate">{% if isactive %}Utilisateurs Actif{%else%}Utilisateurs Inactif{%endif%}</label>
|
|
|
|
</div>
|
|
|
|
{%endif%}
|
|
|
|
|
2022-07-21 16:15:47 +02:00
|
|
|
<div class="card mt-4">
|
|
|
|
<div class="card-header">
|
|
|
|
<i class="fa fa-table fa-fw"></i> Liste des Utilisateurs
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-body">
|
2022-07-25 17:16:08 +02:00
|
|
|
<table class="table table-striped table-bordered table-hover wrap" id="dataTables" style="width:100%; font-size:11px;">
|
2022-07-21 16:15:47 +02:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2022-10-04 11:32:05 +02:00
|
|
|
{% if access=="admin" or access=="modo" or access=="manager"%}
|
2022-07-21 16:15:47 +02:00
|
|
|
<th class="no-sort">Action</th>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<th class="no-sort">Avatar</th>
|
|
|
|
<th>Login</th>
|
|
|
|
<th>Nom</th>
|
|
|
|
<th>Prénom</th>
|
|
|
|
<th>Email</th>
|
|
|
|
<th>Téléphone</th>
|
|
|
|
<th>{{ appNiveau01label }}</th>
|
2022-09-27 11:52:49 +02:00
|
|
|
<th class="no-sort {% if not appNiveau02use%}no-visible{%endif%}">{{ appNiveau02label }}</th>
|
|
|
|
<th class="no-sort {% if not appNiveau03use%}no-visible{%endif%}">{{ appNiveau03label }}</th>
|
|
|
|
<th class="no-sort {% if not appNiveau04use%}no-visible{%endif%}">{{ appNiveau04label }}</th>
|
2022-07-21 16:15:47 +02:00
|
|
|
<th>Visite</th>
|
|
|
|
<th>Rôle</th>
|
2022-09-27 11:52:49 +02:00
|
|
|
<th class="no-sort {% if not appGroupuse%}no-visible{%endif%}">Groupes</th>
|
2022-07-21 16:15:47 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block localscript %}
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#dataTables').DataTable({
|
|
|
|
columnDefs: [ { "targets": 'no-sort', "orderable": false },{ "targets": 'no-visible', "visible": false } ],
|
|
|
|
iDisplayLength: 100,
|
|
|
|
processing: true,
|
|
|
|
serverSide: true,
|
|
|
|
{% if access=="admin" %}
|
|
|
|
order: [[ 2, "asc" ]],
|
|
|
|
ajax: "{{ path('app_admin_user_tablelist') }}",
|
|
|
|
{% elseif access=="modo" %}
|
|
|
|
order: [[ 2, "asc" ]],
|
|
|
|
ajax: "{{ path('app_modo_user_tablelist') }}",
|
2022-10-04 11:32:05 +02:00
|
|
|
{% elseif access=="manager" %}
|
|
|
|
order: [[ 2, "asc" ]],
|
|
|
|
ajax: "{{ path('app_manager_user_tablelist') }}",
|
2022-07-21 16:15:47 +02:00
|
|
|
{% else %}
|
|
|
|
order: [[ 1, "asc" ]],
|
2022-10-02 14:50:48 +02:00
|
|
|
ajax: "{{ path('app_all_user_tablelist') }}",
|
2022-07-21 16:15:47 +02:00
|
|
|
{% endif %}
|
|
|
|
});
|
2022-10-02 14:50:48 +02:00
|
|
|
|
|
|
|
{% if access!="all" %}
|
|
|
|
$('#checkisactivate').change(function() {
|
|
|
|
$.ajax({
|
|
|
|
method: "POST",
|
|
|
|
url: "{{ path('app_all_preference') }}",
|
|
|
|
data: {
|
|
|
|
id:0,
|
|
|
|
key:'userisactive',
|
|
|
|
value: ($("#checkisactivate").is(":checked"))
|
|
|
|
},
|
|
|
|
success: function() {
|
|
|
|
location.reload();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
{% endif %}
|
2022-07-21 16:15:47 +02:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|