ynh_extension_meeo/templates/eleve_absences.twig

32 lines
966 B
Twig
Raw Normal View History

<div class="panel-body">
{% for entry in entries|sort((a,b) => a['bf_date_debut'] <=> b['bf_date_debut'])|reverse %}
{% set justifie = entry['bf_commentaire']|default %}
<div>
<div>
<h5>
{% if justifie == false %}
<i class="fa fa-exclamation" style="color:red" ></i>
{% else %}
<i class="fa fa-check" style="color:green" ></i>
{% endif %}
{% if entry['bf_date_debut'] == entry['bf_date_fin'] %}
{{ entry['bf_date_debut']|date("m/d/Y") }}
{% else %}
{{ entry['bf_date_debut']|date("m/d/Y H:i") }} - {{ entry['bf_date_fin']|date("m/d/Y H:i") }}
{% endif %}
<a class="btn btn-default btn-xs" href="{{ url({ tag: entry['id_fiche'], handler: 'edit' }) }}">
<i class="fa fa-pencil-alt"></i>
</a>
</h5>
</div>
<div>
{% if justifie %}
Motif : {{ entry['bf_commentaire'] }}
2024-07-09 15:31:48 +00:00
{% else %}
<span>Absence non justifié</span>
{% endif %}
</div>
</div>
{% endfor %}
</div>