|
@@ -20,17 +20,26 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+ {# On détermine la première période sur laquelle on calle l'affichage #}
|
|
|
+ {# date() > period.getEndOn #}
|
|
|
+{% set now = date() %}
|
|
|
+{% set first_period = null %}
|
|
|
+
|
|
|
+{% for period in event.getPeriods|sort((a, b) => a.endOn <=> b.endOn) %}
|
|
|
+ {% if first_period is null and period.endOn > now %}
|
|
|
+ {% set first_period = period.id %}
|
|
|
+ {% endif %}
|
|
|
+{% endfor %}
|
|
|
+
|
|
|
+
|
|
|
{# On ajoute les horaires période par période #}
|
|
|
{% set i=0 %}
|
|
|
- {% set first_period=1 %}
|
|
|
{% for period in event.getPeriods() %}
|
|
|
- <div class="fixed-grid has-{{ cols }}-cols period-panel{% if i>0 %} is-hidden{% endif %}" id="#period-{{ period.id }}">
|
|
|
+ <div class="fixed-grid has-{{ cols }}-cols period-panel{% if period.id != first_period %} is-hidden{% endif %}" id="#period-{{ period.id }}">
|
|
|
<div class="grid is-gap-0">
|
|
|
<div class="cell planning-cell planning-cell-period is-col-span-{{ cols }} has-text-centered">
|
|
|
{% if i > 0 %}
|
|
|
<span class="icon period-controller" data-id="#period-{{ event.getPeriods()[i-1].id }}"><twig:ux:icon name='bi:arrow-left-circle'/></span>
|
|
|
- {% else %}
|
|
|
- {% set first_period=period.id %}
|
|
|
{% endif %}
|
|
|
<div class="planning-cell-force-large has-text-centered">Période du {{ period.startOn|date('d/m/Y \\d\\e H:i', app_timezone) }} à {{ period.endOn|date('H:i', app_timezone) }}</div>
|
|
|
{% if i+1 < event.getPeriods()|length %}
|