Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
trash
/
vhost_www.bachtale.com_1719306535
/
htdocs
/
templates
/
security
/
/srv/data/trash/vhost_www.bachtale.com_1719306535/htdocs/templates/security/search.html.twig
{% extends 'Back/layout.html.twig' %} {% block title 'Gestion des utilisateurs' %} {% block content %} {# ///////////////// MODAL DELETE ////////////////////#} <div class="modal fade" id="delete" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Suppression d'un utilisateur</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button> <form method="post" action=""> <input id="token" type="hidden" name="_token" value=""> <input type="hidden" name="_method" value="DELETE"> <button type="submit" class="btn btn-danger">Supprimer</button> </form> </div> </div> </div> </div> {# ///////////////// END MODAL DELETE ////////////////////#} <section class="section-padding"> <div class="container-fluid"> <h1>Gestion des utilisateurs</h1> <div class="shape"></div> <div class="card mt-4 mb-4"> <div class="card-header text-center"> <h4>Liste des utilisateurs</h4> </div> <div class="card-body"> <div class="table-responsive"> <table class="table table-striped table-bordered" id="dataTable" width="100%" cellspacing="0" data-page-length='50'> <thead> <tr> <th>Nom / Prénom</th> <th>Email</th> <th>Type de compte</th> <th>Dernière connexion</th> <th>Membre depuis le ...</th> <th>Actions</th> </tr> </thead> <tbody> {% if users %} {% for user in users %} <tr> <td>{{ user.firstname }} {{ user.lastname }}</td> <td>{{ user.email}}</td> <td> {% if user.granted("ROLE_ADMIN")%} Administrateur {% else %} Compte utilisateur {% endif %} </td> <td>{{ user.lastLogin|date('d/m/Y') }}</td> <td>{{ user.createdAt|date('d/m/Y') }}</td> <td> <a href="#" class="btn btn-danger btn-delete" data-toggle="modal" data-target="#delete" id="{{user.id}}" data-title="{{ user.username }}" data-path="{{ path('admin_security_delete', {id: user.id}) }}"> <i class="fa fa-times" aria-hidden="true"></i> </a> <form action="{{ path('admin_security_isactive', {id: user.id}) }}" method="post"> <input type="hidden" name="_csrf_token" value="{{ csrf_token('isactive') }}"/> <input type="hidden" name="_method" value="ISACTIVE"> {% if user.isActive %} <button type="submit" class="btn btn-warning"> <i class="fas fa-pause"></i> Désactiver </button> {% else %} <button type="submit" class="btn btn-success"> <i class="fas fa-play"></i> Activer </button> {% endif %} </form> </td> </tr> {% endfor %} {% else %} <tr> <td>Aucun enregistrement</td> </tr> {% endif %} </tbody> </table> </div> </div> </div> </div> </section> {% endblock %} {% block javascripts %} {{ parent() }} <script src="{{ asset('datatables/jquery.dataTables.js')}}"></script> <script src="{{ asset('datatables/dataTables.bootstrap4.js')}}"></script> <script> $(document).ready(function(){ $(document).on ("click", ".btn-delete", function () { var id = $(this).attr('id'); var title = $(this).attr('data-title'); var path = $(this).attr('data-path'); $('#delete .modal-footer form').attr('action', path); $('#delete #token').val("{{ csrf_token('delete' ~"+id+") }}"); $('#delete .modal-body').html("<p>Confirmez-vous la suppression de l'utilisateur: <strong>"+title+"</strong></p>"); }); }); </script> <script> $(document).ready(function(){$("#dataTable").DataTable()}); </script> <script type="text/javascript"> $('#dataTable').DataTable( { language: { processing: "Traitement en cours...", search: "Rechercher :", lengthMenu: "Afficher _MENU_ éléments", info: "Affichage de l'élement _START_ à _END_ sur _TOTAL_ éléments", infoEmpty: "Affichage de l'élement 0 à 0 sur 0 éléments", infoFiltered: "(filtré de _MAX_ éléments au total)", infoPostFix: "", loadingRecords: "Chargement en cours...", zeroRecords: "Aucun élément à afficher", emptyTable: "Aucune donnée disponible dans le tableau", paginate: { first: "Premier", previous: "Précédent", next: "Suivant", last: "Dernier" }, aria: { sortAscending: ": activer pour trier la colonne par ordre croissant", sortDescending: ": activer pour trier la colonne par ordre décroissant" } }, aaSorting: [] } ); </script> {% endblock %}