templates/school/school_teacher_call_sheet/re/_call_table.html.twig line 1

Open in your IDE?
  1. <div class="table-responsive">
  2.     <table id="defaultDataTable"  class="display table table-striped table-bordered">
  3.         <thead>
  4.             <tr>
  5.                 {# {% if not school_teacher_call_sheet.isValidated %} #}
  6.                     <th class="text-center" width="5%">
  7.                         <input type="checkbox" id="check-all" onclick="javascript:checkAllElt()">
  8.                     </th>
  9.                 {# {% endif %} #}
  10.                 <th width="5%" class="text-center">#</th>
  11.                 <th>Matricule</th>
  12.                 <th>Nom & Prénoms</th>
  13.                 <th class="text-center">Abs(e)/Pré(e)</th>
  14.                 {% if not school_teacher_call_sheet.isValidated %}
  15.                     <th class="text-center" width="20%">Actions</th>
  16.                 {% endif %}
  17.             </tr>
  18.         </thead>
  19.         <tbody>
  20.             {% set presents = 0 %}
  21.             {% set absents = 0 %}
  22.             {% for school_teacher_call_sheet_line in school_teacher_call_sheet_lines %}
  23.                 <tr 
  24.                     id="tr-{{ school_teacher_call_sheet_line.id }}" 
  25.                     {% if school_teacher_call_sheet_line.registrationStudentRegistration.amountDueAt(duDate) > 0 and school_teacher_call_sheet_line.registrationStudentRegistration.amountDueAt(duDate) <= recovery_put_out_amount %} style="color: orange; font-weight: bold;"{% endif %}
  26.                     {% if school_teacher_call_sheet_line.registrationStudentRegistration.amountDueAt(duDate) > 0 and school_teacher_call_sheet_line.registrationStudentRegistration.amountDueAt(duDate) > recovery_put_out_amount %} style="color: red; font-weight: bold;"{% endif %}
  27.                     >
  28.                     {# {% if not school_teacher_call_sheet.isValidated %} #}
  29.                         <td class="text-center">
  30.                             <input type="checkbox" class="check-elt" value="{{ school_teacher_call_sheet_line.id }}" onclick="javascript:checkElt()">
  31.                         </td>
  32.                     {# {% endif %} #}
  33.                     <td class="text-center">{{ loop.index }}</td>
  34.                     <td>{{ school_teacher_call_sheet_line.registrationStudentRegistration.student.registrationNumber }}</td>
  35.                     <td>{{ school_teacher_call_sheet_line.registrationStudentRegistration.student.name }}</td>
  36.                     <td class="text-center" id="td-{{ school_teacher_call_sheet_line.id }}">
  37.                         {{ school_teacher_call_sheet_line.isPresente ? 'Présent(e)' : '' }}
  38.                         {{ school_teacher_call_sheet_line.isAbsent ? 'Absent(e)' : '' }}
  39.                     </td>
  40.                     {% if not school_teacher_call_sheet.isValidated %}
  41.                         <td class="text-center">
  42.                             {% if not school_teacher_call_sheet_line.isPresente %}
  43.                                 <a href="#isPresente{{ school_teacher_call_sheet_line.id }}" class="btn btn-success" id="btn-present-{{ school_teacher_call_sheet_line.id }}" onclick="javascript:setToPresent('{{path('school_teacher_call_sheet_line_set_to_present', {'id': school_teacher_call_sheet_line.id})}}', {{school_teacher_call_sheet_line.id}})"> Présente(e)</a>
  44.                             {% endif %}
  45.                             {% if not school_teacher_call_sheet_line.isAbsent %}
  46.                                 <a href="#isAbsent{{ school_teacher_call_sheet_line.id }}" class="btn btn-danger" id="btn-absent-{{ school_teacher_call_sheet_line.id }}" onclick="javascript:setToAbsent('{{path('school_teacher_call_sheet_line_set_to_absent', {'id': school_teacher_call_sheet_line.id})}}', {{school_teacher_call_sheet_line.id}})"> Absent(e)</a>
  47.                             {% endif %}
  48.                         </td>
  49.                     {% endif %}
  50.                 </tr>
  51.                 {% if school_teacher_call_sheet_line.isPresente %}
  52.                     {% set presents = presents + 1 %}
  53.                 {% endif %}
  54.                 {% if school_teacher_call_sheet_line.isAbsent %}
  55.                     {% set absents = absents + 1 %}
  56.                 {% endif %}
  57.             {% endfor %}
  58.             {% if school_teacher_call_sheet.isValidated %}
  59.                 <tr>
  60.                     {# {% if not school_teacher_call_sheet.isValidated %} #}
  61.                         <td class="text-right">999</td>
  62.                     {# {% endif %} #}
  63.                     <td class="text-right">999</td>
  64.                     <td class="text-right"></td>
  65.                     <td class="text-right"></td>
  66.                     <td class="text-center">Présent(es) <b>{{ presents }}</b></td>
  67.                     {% if not school_teacher_call_sheet.isValidated %}
  68.                         <td></td>
  69.                     {% endif %}
  70.                 </tr>
  71.                 <tr>
  72.                     {# {% if not school_teacher_call_sheet.isValidated %} #}
  73.                         <td class="text-right">999</td>
  74.                     {# {% endif %} #}
  75.                     <td class="text-right">999</td>
  76.                     <td class="text-right"></td>
  77.                     <td class="text-right"></td>
  78.                     <td class="text-center">Absent(es): <b>{{ absents }}</b></td>
  79.                     {% if not school_teacher_call_sheet.isValidated %}
  80.                         <td></td>
  81.                     {% endif %}
  82.                 </tr>
  83.             {% endif %}
  84.         </tbody>
  85.     </table>
  86. </div>