{%- set datedujour = "now"|date("Ymd") -%} {%- if famille|length == 1 %} {%- set seul = true %} {%- else %} {%- set seul = false -%} {% endif %} {# Case inscrits #} {# Mode admin : case action #} {% if est_admin == true %}{% endif %} {# Si connecté : case inscription #} {% if app.user and est_admin == false %}{% endif %} {# Date limite d'inscription #} {% set moisEnCours = "" %} {% for line in lines %} {% set affiche = true %} {# N'afficher que les concours avec des inscrits ? #} {% if queInscrits == 1 %} {% if inscriptions[line.id] is defined %} {% set affiche = true %} {% else %} {% set affiche = false %} {% endif %} {% endif %} {# N'afficher que les concours du user courant ? (pas en mode admin) #} {% if queMesConcours == 1 and app.user and est_admin == false %} {% set affiche = false %} {%- for membre in famille -%} {% if mesInscriptions[line.id ~ '-' ~ membre.licence] is defined %} {% set affiche = true %} {% endif %} {% endfor %} {% endif %} {# On affiche la ligne de concours #} {% if affiche %} {# Gestion de changements de mois #} {% set moisLigne = line.dateDebut|date('Y') ~ line.dateDebut|date('m') %} {% if moisLigne != moisEnCours %} {% set moisEnCours = moisLigne %} {% endif %} {# Afficher la cellule des inscriptions avec le bouton de détails #} {# Mode admin : afficher les boutons de gestion #} {% if est_admin == true %} {% endif %} {# Si connecté : gestion de ses inscriptions #} {% if app.user and est_admin == false %} {% endif %} {# Afficher la date limite d'inscription s'il y en a une, éditable si on est admin #} {# Ligne pour afficher le détail des inscrits#} {# endif de 'if affiche' #} {% endif %} {# endfor du parcours des lignes #} {% endfor %}
InscritsActionInscriptionDate limite inscription DateOrganisateur Mandat Dépt. Discipline
{{ mois[line.dateDebut | date('m')] }} {{ line.dateDebut|date('Y')}}
{# Des inscriptions ? #} {% if inscriptions[line.id] is defined %} Inscrits: {{ inscriptions[line.id] }}{% endif %} {# Le user courant est inscrit ?#} {% if mesInscriptions[line.id] is defined %}
Inscrit{% endif %}
{% if line.cloture == 'O'%} {% else %} {% endif %} {# Bouton s'inscrire / modifier, qui est invalidé si on dépasse la date limite. #} {%- if line.dateLimiteInscription is not null -%}{%- set dateLimiteInscription = line.dateLimiteInscription|date("Ymd") -%}{%- else -%}{%- set dateLimiteInscription = 99999999 -%}{% endif -%} {%- set datefin = line.dateFin|date("Ymd") -%} {%- if datedujour <= dateLimiteInscription and not (datedujour > datefin)-%} {%- for membre in famille -%} {%- set present = false -%} {%- if mesInscriptions[line.id ~ '-' ~ membre.licence] is defined -%}{%- set present = true -%}{% endif %} {# S'incrire ou modifier #} {# Si concours clôturé : one ne peut que modifier #} {% if line.cloture != 'O' or present %} {% endif %} {# Bouton suppression #} {%- if present -%} {%- endif -%} {# Bouton ICS #} {%- if present -%} {%- endif -%}
{% endfor %} {% endif %}
{% if line.cloture == 'O' %}Clôturé {% else %} {% if est_admin == true %}{% endif %} {% if line.dateLimiteInscription is null %}{% else %}{{ line.dateLimiteInscription|date('d/m/Y') }}{% endif %} {% if est_admin is defined %}{% endif %} {% endif %} {{ line.dateDebut|date('d/m/Y') }} {{ line.dateFin|date('d/m/Y') }} {% if est_admin == true or line.clubOrganisateur != ''%} {% endif %} {% if est_admin == true or line.nomConcours != ''%} {% endif %} {% if est_admin == true or line.formule != ''%} {% endif %} {% if est_admin == true or line.caracteristiques != ''%} {% endif %}
{% if est_admin == true %}Organisateur: {% endif %} {% if est_admin == true %}{% endif %} {{ line.clubOrganisateur }} {% if est_admin == true %}{% endif %}
{% if est_admin == true %}Nom: {% endif %} {% if est_admin == true %}{% endif %} {{ line.nomConcours }} {% if est_admin == true %}{% endif %}
{% if est_admin == true %}Formule: {% endif %} {% if est_admin == true %}{% endif %} {{line.formule}} {% if est_admin == true %}{% endif %}
{% if est_admin == true %}Caractéristiques: {% endif %} {% if est_admin == true %}{% endif %} {% if est_admin == false %}{% endif %} {{line.caracteristiques}} {% if est_admin == false %}{% endif %} {% if est_admin == true %}{% endif %}
{% if est_admin == true %} {{ line.urlMandat }} {% endif %} {% if line.urlMandat != '' %} {% endif %} {{ line.noStructure|slice(2,2) }} {% if est_admin == true %}{% endif %} {{ line.disciplineEnClair }}{% if est_admin == true %}{% endif %}