templates/avocats/index.html.twig line 1

Open in your IDE?
  1. {% extends "base_admin.html.twig" %}
  2. {% block body %}
  3. <!-- ============================================================== -->
  4.             <!-- Start Page Content here -->
  5.             <!-- ============================================================== -->
  6.             <div class="content-page">
  7.                 <div class="content">
  8.                     
  9.                     <!-- Start Content-->
  10.                     <div class="container-fluid">
  11.                         
  12.                         <!-- start page title -->
  13.                         <div class="row">
  14.                             <div class="col-12">
  15.                                 <div class="page-title-box">
  16.     
  17.                                     <h4 class="page-title">Configuration</h4>
  18.                                     <div class="col-lg-12">
  19.                                         <div class="card">
  20.                                             <div class="card-body">
  21.                                                 <div class="dropdown float-right">{% if role == 'admin' %}
  22.                                                     <a href="{{ path('app_avocats_new') }}" >
  23.                                                         <i class="mdi mdi-plus" style="font-size: 25px"></i> Ajouter un avocat
  24.                                                     </a>
  25.                                                     {% endif %}
  26.                                                 </div>
  27.                                                 <div class="table-responsive">
  28.                                                     <table class="table table-striped mb-0">
  29.         <thead>
  30.             <tr>
  31.                 <th>Id</th>
  32.                 <th>Nom</th>
  33.                 <th>Prenom</th>
  34.                 
  35.                 <th>Calendrier</th>
  36.                 <th>actions</th>
  37.             </tr>
  38.         </thead>
  39.         <tbody>
  40.         {% for avocat in avocats %}
  41.             <tr>
  42.                 <td>{{ avocat.id }}</td>
  43.                 <td>{{ avocat.Nom }}</td>
  44.                 <td>{{ avocat.Prenom }}</td>
  45.                  <td>
  46.                 <a href="{{ path('calendrier', {'id': avocat.id}) }}" target="_blank"><button type="button" class="btn btn-danger">Voir l'agenda</button></a>
  47.                 </td>
  48.                 <td>
  49.                    
  50.                     <a href="{{ path('app_avocats_edit', {'id': avocat.id}) }}"><button type="button" class="btn btn-warning">Modifier</button></a>
  51. <br><br>
  52. {% if role == 'admin' %}
  53.                     <form method="post" action="{{ path('app_avocats_delete', {'id': avocat.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
  54.     <input type="hidden" name="_token" value="{{ csrf_token('delete' ~ avocat.id) }}">
  55.     <button class="btn btn-danger" style="background:red; border:none">Supprimer</button>
  56. </form>
  57. {% endif %}
  58.                 </td>
  59.                
  60.             </tr>
  61.         {% else %}
  62.             <tr>
  63.                 <td colspan="4">no records found</td>
  64.             </tr>
  65.         {% endfor %}
  66.         </tbody>
  67.     </table>
  68.   </div>
  69.                                             </div>
  70.                                         </div>
  71.                                     </div>
  72.                                 </div>
  73.                             </div>
  74.                         </div>     
  75.                         <!-- end page title --> 
  76.                         <div class="row">
  77.         
  78.         
  79.                         </div>
  80.                         <!-- end row -->
  81.         
  82.         
  83.                         
  84.                     </div> <!-- end container-fluid -->
  85.                 </div> <!-- end content -->
  86.                 
  87. {% endblock %}