{% extends "base_admin.html.twig" %}{% block body %}<!-- ============================================================== --> <!-- Start Page Content here --> <!-- ============================================================== --> <div class="content-page"> <div class="content"> <!-- Start Content--> <div class="container-fluid"> <!-- start page title --> <div class="row"> <div class="col-12"> <div class="page-title-box"> <h4 class="page-title">Configuration</h4> <div class="col-lg-12"> <div class="card"> <div class="card-body"> <div class="dropdown float-right">{% if role == 'admin' %} <a href="{{ path('app_avocats_new') }}" > <i class="mdi mdi-plus" style="font-size: 25px"></i> Ajouter un avocat </a> {% endif %} </div> <div class="table-responsive"> <table class="table table-striped mb-0"> <thead> <tr> <th>Id</th> <th>Nom</th> <th>Prenom</th> <th>Calendrier</th> <th>actions</th> </tr> </thead> <tbody> {% for avocat in avocats %} <tr> <td>{{ avocat.id }}</td> <td>{{ avocat.Nom }}</td> <td>{{ avocat.Prenom }}</td> <td> <a href="{{ path('calendrier', {'id': avocat.id}) }}" target="_blank"><button type="button" class="btn btn-danger">Voir l'agenda</button></a> </td> <td> <a href="{{ path('app_avocats_edit', {'id': avocat.id}) }}"><button type="button" class="btn btn-warning">Modifier</button></a><br><br>{% if role == 'admin' %} <form method="post" action="{{ path('app_avocats_delete', {'id': avocat.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');"> <input type="hidden" name="_token" value="{{ csrf_token('delete' ~ avocat.id) }}"> <button class="btn btn-danger" style="background:red; border:none">Supprimer</button></form>{% endif %} </td> </tr> {% else %} <tr> <td colspan="4">no records found</td> </tr> {% endfor %} </tbody> </table> </div> </div> </div> </div> </div> </div> </div> <!-- end page title --> <div class="row"> </div> <!-- end row --> </div> <!-- end container-fluid --> </div> <!-- end content --> {% endblock %}