{# Template pour les plannings #} {% set cols = event.getSpaces()|length +1 %} {# début du block de grille #}
{# Nombre de colonnes = nombre d'espaces + colonne d'intro #}
{# en-tête avec les noms des espaces #}
Espaces
{% for space in event.getSpaces() %}
{{ space.name }}
{% endfor %}
{# On ajoute les horaires période par période #} {% set i=0 %} {% set first_period=1 %} {% for period in event.getPeriods() %}
{% if i > 0 %} {% else %} {% set first_period=period.id %} {% endif %}
Période du {{ period.startOn|date('d/m/Y \\d\\e H:i', app_timezone) }} à {{ period.endOn|date('H:i', app_timezone) }}
{% if i+1 < event.getPeriods()|length %} {% endif %} {% set i=i+1 %}
{# On affiche tous les slots de la période, space par space #} {% for dateRef in this.getDateOrdered(period) %}
{{ dateRef|date('H:i', app_timezone) }}
{% for space in event.getSpaces() %} {# extraction du slot de cet espace, ce moment et cette période #} {% set thisSlot = this.getThisSlotInfo(dateRef, space, period) %} {# --CASE1-- si le slot est Indisponible #} {% if thisSlot.unavailable %} {% if displayLocked %}
{% else %}
{% endif %} {% endif %} {# --CASE2 -- si une partie est sur le slot #} {% if thisSlot.party %} {% if thisSlot.party.isValidated or displayUnvalidates %} {% if thisSlot == thisSlot.party.slots[0] %} {# Premier slot d'une partie ou partie non validée #}
{# Carte "jeu" DEBUT #}
{% if thisSlot.party.gamemaster.picture %} {% else %} {% endif %}
{{ thisSlot.party.gamemaster.preferedName }}
{{ thisSlot.party.game.name }}

Places : {{ thisSlot.party.getSeatsLeft }}/{{ thisSlot.party.getMaxParticipants }}

{% if thisSlot.party.gamemasterIsAuthor %}

partie animée par l'auteur

{% endif %}

{% for genre in thisSlot.party.game.genre %}{{ genre.genre }}{% endfor %}

{% if pathFullSlot %}{% endif %}
{# Carte "jeu" FIN #}
{% else %} {# Slot suivant d'une partie #}
{% endif %} {% else %} {# Partie non validée masquée #}
{% endif %} {% endif %} {# --CASE3-- si le slot est disponible et sans partie #} {% if not thisSlot.unavailable and not thisSlot.party %} {% if pathEmptySlot %}
{% elseif displayLocked %}
{% else %}
{% endif %} {% endif %} {% endfor %} {% endfor %}
{% endfor %} {# fin du block de grille #} {% if i > 1 %}

Afficher toutes les périodes à la suite

{% endif %}