templates/evaluation/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.   
  5.     
  6.         <div class="row mt-2">
  7.             <div class="col-1 jumbotron mb-2" >
  8.               <a class="btn btn-info" href="{{ path('admin_evaluations_new') }}">
  9.                     <i class="fa fa-plus"></i>
  10.               </a>  
  11.             </div>  
  12.             <div class="col-11 jumbotron mb-2" >
  13.                 {{form_start(searchForm)}}
  14.                 <div class="form-row row">
  15.                     <div class="col-md-3">
  16.                         {{form_row(searchForm.room)}}
  17.                     </div>
  18.                     <div class="col-md-3">
  19.                         {{form_row(searchForm.sequence)}}
  20.                     </div>
  21.                     <div class="col-md-3">
  22.                         {{form_row(searchForm.course)}}
  23.                     </div>
  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.             <div class="col-12 jumbotron" >
  33.                 <div class="m-1 box-shadow">
  34.                         <div class=" d-inline-flex">
  35.                                 
  36.                                 <h4 class="my-0 card-header font-weight-normal text-center text-justify text-uppercase">  &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp;  &emsp; &emsp; &emsp; &emsp; &emsp;  &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; Liste des {{ pagination.getTotalItemCount }} évaluations   </h4>
  37.   
  38.                         </div>
  39.                         
  40.                     <table class="table table-striped">
  41.                     <thead>
  42.                         <tr>
  43.                         
  44.                             <th style="width:15%;" class="text-center">SEQ</th>
  45.                             <th style="width:15%;" {% if pagination.isSorted('e.classroom.name') %} class="sorted" {% endif %}>Classe
  46.                             </th>
  47.                             <th style="width:20%;" class="text-center">Matière</th>
  48.                             <th style="width:15%;" class="text-center">Compétence</th>
  49.                             <th style="width:15%;" class="text-center">Succ</th>
  50.                             <th style="width:5%;" class="text-center">Echec</th>
  51.                             <th style="width:5%;" class="text-center">Abs</th>
  52.                             <th style="width:5%;" class="text-center">Moy Gen.</th>
  53.                             <th style="width:15%;" class="text-center">Action</th>
  54.                         </tr>
  55.                     </thead>
  56.                     <tbody>
  57.                         {% for evaluation in pagination  %}
  58.                             <tr>
  59.                                 
  60.                                 <td>{{ evaluation.sequence.code }}</td>
  61.                                 <td>
  62.                                     <a href="{{ path('admin_classrooms_show', {id: evaluation.classroom.id}) }}">{{ evaluation.classroom.name }}</a>
  63.                                 </td>
  64.                                 <td>{{ evaluation.course }}</td>
  65.                                 <td>{{ evaluation.competence|striptags|raw |slice(0,15) }}</td>
  66.                                 {% set success = evaluation.successH + evaluation.successF %}
  67.                                 <td>{{ success }}</td>
  68.                                 {% set faillure = evaluation.failluresH +  evaluation.failluresF  %}
  69.                                 <td>{{faillure}}</td>
  70.                                 <td>{{ evaluation.abscent }}</td>
  71.                                 <td>{{ evaluation.moyenne |round(2,'floor') }}</td>
  72.                                 <td>
  73.                                     <div class="btn-group">
  74.                                         <a target="_blank" class="btn btn-outline-info" href="{{ path('admin_evaluations_pdf', {id: evaluation.id}) }}">
  75.                                             <i class="fa fa-cloud-download">
  76.                                                 </i>
  77.                                         </a>
  78.                                         {% if is_granted('ROLE_ADMIN') %}
  79.                                             <a target="_blank" class="btn btn-outline-warning" href="{{ path('admin_evaluations_edit', {id: evaluation.id|default('1')}) }}">
  80.                                                 <i class="fa fa-edit">
  81.                                                 </i>
  82.                                             </a>
  83.                                           
  84.                                             <a  class="btn btn-outline-danger" href="#"  onclick= "event.preventDefault() ; confirm('Are you sure ?') && document.getElementById('js-evaluation-delete-form-{{evaluation.id}}').submit();"> <i class="fa fa-trash"></i> </a>
  85.                                             <form id="js-evaluation-delete-form-{{evaluation.id}}" action="{{path('admin_evaluations_delete', {id: evaluation.id})}}" method="post" style="display: none;">
  86.                                                 <input type="hidden" name="csrf_token" value="{{ csrf_token('evaluations_deletion' ~ evaluation.id ) }}" id="">
  87.                                                 <input type="hidden" name="_method" value="DELETE">
  88.                                             </form>
  89.                                           {% endif %}
  90.                                                 
  91.                                     </div>
  92.                                 </td>
  93.                             </tr>
  94.                         {% endfor %}
  95.                     </tbody>
  96.                 </table>
  97.                 {# display navigation #}
  98.                 <div class="navigation  text-center">
  99.                     {{ knp_pagination_render(pagination) }}
  100.                 </div>
  101.             </div>
  102.         </div>
  103.     </div>
  104. {% endblock %}