{# templates/admin/adminCalendar.html.twig #} {% extends 'base.html.twig' %} {% block title %}LALD / LCDL{% endblock %} {% block body %}

Calendrier des congés

Imprimer le calendrier
{% for month, monthData in months %} {% endfor %} {% for fonction, users in usersGroupByFunction %} {% for user in users %} {% for dayLoop in 1..31 %} {% set currentDate = year ~ '-' ~ month ~ '-' ~ dayLoop %} {% set isWeekend = (currentDate|date('N') in [6, 7]) %} {% set isVacation = false %} {% if vacationsGroupByUser[user.id] is defined %} {% for vacation in vacationsGroupByUser[user.id] %} {% if currentDate|date('Y-m-d') >= vacation.startDate|date('Y-m-d') and currentDate|date('Y-m-d') <= vacation.endDate|date('Y-m-d') %} {% set isVacation = true %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% endfor %} {% endfor %} {% endfor %}
Calendrier des congés {{year}}
{{ FRmois[monthData.name] }}
{% for day in 1..31 %} {{ day in monthData.days ? day : '' }}
{{ fonction }}
{{ user.username }} {{ dayLoop in monthData.days ? dayLoop : '' }}
{% endblock %}