<div class="table-responsive">
<table id="defaultDataTable" class="display table table-striped table-bordered">
<thead>
<tr>
{# {% if not school_teacher_call_sheet.isValidated %} #}
<th class="text-center" width="5%">
<input type="checkbox" id="check-all" onclick="javascript:checkAllElt()">
</th>
{# {% endif %} #}
<th width="5%" class="text-center">#</th>
<th>Matricule</th>
<th>Nom & Prénoms</th>
<th class="text-center">Abs(e)/Pré(e)</th>
{% if not school_teacher_call_sheet.isValidated %}
<th class="text-center" width="20%">Actions</th>
{% endif %}
</tr>
</thead>
<tbody>
{% set presents = 0 %}
{% set absents = 0 %}
{% for school_teacher_call_sheet_line in school_teacher_call_sheet_lines %}
<tr
id="tr-{{ school_teacher_call_sheet_line.id }}"
{% 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 %}
{% 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 %}
>
{# {% if not school_teacher_call_sheet.isValidated %} #}
<td class="text-center">
<input type="checkbox" class="check-elt" value="{{ school_teacher_call_sheet_line.id }}" onclick="javascript:checkElt()">
</td>
{# {% endif %} #}
<td class="text-center">{{ loop.index }}</td>
<td>{{ school_teacher_call_sheet_line.registrationStudentRegistration.student.registrationNumber }}</td>
<td>{{ school_teacher_call_sheet_line.registrationStudentRegistration.student.name }}</td>
<td class="text-center" id="td-{{ school_teacher_call_sheet_line.id }}">
{{ school_teacher_call_sheet_line.isPresente ? 'Présent(e)' : '' }}
{{ school_teacher_call_sheet_line.isAbsent ? 'Absent(e)' : '' }}
</td>
{% if not school_teacher_call_sheet.isValidated %}
<td class="text-center">
{% if not school_teacher_call_sheet_line.isPresente %}
<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>
{% endif %}
{% if not school_teacher_call_sheet_line.isAbsent %}
<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>
{% endif %}
</td>
{% endif %}
</tr>
{% if school_teacher_call_sheet_line.isPresente %}
{% set presents = presents + 1 %}
{% endif %}
{% if school_teacher_call_sheet_line.isAbsent %}
{% set absents = absents + 1 %}
{% endif %}
{% endfor %}
{% if school_teacher_call_sheet.isValidated %}
<tr>
{# {% if not school_teacher_call_sheet.isValidated %} #}
<td class="text-right">999</td>
{# {% endif %} #}
<td class="text-right">999</td>
<td class="text-right"></td>
<td class="text-right"></td>
<td class="text-center">Présent(es) <b>{{ presents }}</b></td>
{% if not school_teacher_call_sheet.isValidated %}
<td></td>
{% endif %}
</tr>
<tr>
{# {% if not school_teacher_call_sheet.isValidated %} #}
<td class="text-right">999</td>
{# {% endif %} #}
<td class="text-right">999</td>
<td class="text-right"></td>
<td class="text-right"></td>
<td class="text-center">Absent(es): <b>{{ absents }}</b></td>
{% if not school_teacher_call_sheet.isValidated %}
<td></td>
{% endif %}
</tr>
{% endif %}
</tbody>
</table>
</div>