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