templates/abscence_sheet/index.html.twig line 1

Open in your IDE?
  1. {% extends 'layout/backEndLayout.html.twig' %}
  2. {% form_theme searchForm 'bootstrap_4_layout.html.twig' %}
  3. {% block content %}
  4.     <div class="row mt-4">
  5.         <div class="col-1">
  6.             <a class="btn btn-info" href="{{ path('admin_abscence_sheet_new') }}">
  7.                 <i class="fa fa-plus"></i>
  8.               
  9.             </a>
  10.         </div>
  11.          <div class="col-11 jumbotron" >
  12.                 {{form_start(searchForm)}}
  13.                 <div class="form-row row">
  14.                     <div class="col-md-3">
  15.                         {{form_row(searchForm.room)}}
  16.                     </div>
  17.                     <div class="col-md-3">
  18.                         {{form_row(searchForm.sequence)}}
  19.                     </div>
  20.                     <div class="col-md-3">
  21.                         {{form_row(searchForm.quater)}}
  22.                     </div>
  23.                     
  24.                     <div class="col-md-3">
  25.                         <button class="btn btn-primary" type="submit">
  26.                                     <b>Rechercher</b>
  27.                         </button>
  28.                     </div>
  29.                 </div>
  30.                 {{form_end(searchForm)}}
  31.              </div>
  32.     <table class="table">
  33.         <thead>
  34.             <tr>
  35.                 <th>Id</th>
  36.                 <th>Session</th>
  37.                 <th>StartDate</th>
  38.                 <th>EndDate</th>
  39.                 <th>Classe</th>
  40.                 <th>actions</th>
  41.             </tr>
  42.         </thead>
  43.         <tbody>
  44.         {% for abscence_sheet in pagination %}
  45.             <tr>
  46.                 <td>{{ abscence_sheet.id }}</td>
  47.                 <td>{{ abscence_sheet.sequence.code }}</td>
  48.                 <td>{{ abscence_sheet.startDate ? abscence_sheet.startDate|date('Y-m-d') : '' }}</td>
  49.                 <td>{{ abscence_sheet.endDate ? abscence_sheet.endDate|date('Y-m-d') : '' }}</td>
  50.                 <td>{{ abscence_sheet.classRoom.name }}</td>
  51.                 <td>
  52.                     <a class="btn btn-outline-info " href="{{ path('admin_abscence_sheet_pdf', {id: abscence_sheet.id}) }}">
  53.                                             <i class="fa fa-cloud-download">
  54.                                                 </i>
  55.                                         </a>
  56.                     <a class="btn btn-outline-warning " href="{{ path('admin_abscence_sheet_edit', {'id': abscence_sheet.id}) }}"><i class="fa fa-edit">
  57.                                             </i>
  58.                                             </a>
  59.                     <a class="btn btn-outline-danger" href="#"  onclick= "event.preventDefault() ; confirm('Are you sure ?') && document.getElementById('js-abscence-sheet-form-{{abscence_sheet.id}}').submit();"> <i class="fa fa-trash"></i> </a>
  60.                                         <form id="js-abscence-sheet-form-{{abscence_sheet.id}}" action="{{path('admin_abscences_sheet_delete', {id: abscence_sheet.id})}}" method="post" style="display: none;">
  61.                                             <input type="hidden" name="csrf_token" value="{{ csrf_token('abscence_sheet_deletion' ~ abscence_sheet.id ) }}" id="">
  62.                                             <input type="hidden" name="_method" value="DELETE">
  63.                                         </form>
  64.                 </td>
  65.             </tr>
  66.         {% else %}
  67.             <tr>
  68.                 <td colspan="4">no records found</td>
  69.             </tr>
  70.         {% endfor %}
  71.         </tbody>
  72.     </table>
  73.     <div class="navigation  text-center">
  74.                     {{ knp_pagination_render(pagination) }}
  75.     </div>
  76. </div>
  77. {% endblock %}