nineskeletor/templates/User/list.html.twig

65 lines
2.2 KiB
Twig
Raw Normal View History

2022-07-21 16:15:47 +02:00
{% extends 'base.html.twig' %}
{% block body %}
{% if access=="admin" or access=="modo" %}
<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 %}
<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">
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%; font-size:11px;">
<thead>
<tr>
{% if access=="admin" or access=="modo"%}
<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>
<th class="no-sort">{{ appNiveau02label }}</th>
<th>Visite</th>
<th>Rôle</th>
<th class="no-sort">Groupes</th>
</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 } ],
responsive: true,
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') }}",
{% else %}
order: [[ 1, "asc" ]],
ajax: "{{ path('app_user_user_tablelist') }}",
{% endif %}
});
});
</script>
{% endblock %}