{% extends 'base.html.twig' %} {% block title %}{{ outing.title }} | {{ parent() }}{% endblock %} {% block body %}
{% if weather is not null %}

{{ outing.place.city.name }}

{% if weather.weather == 0 %} Météo {% elseif weather.weather > 0 and weather.weather < 10 %} Météo {% elseif weather.weather >= 10 and weather.weather < 60 %} Météo {% elseif weather.weather >= 60 and weather.weather < 79 %} Météo {% elseif weather.weather >= 78 and weather.weather < 138 %} Météo {% else %} Météo {% endif %}
{{ weather.tmin }}°C / {{ weather.tmax }}°C
{% endif %}

Publié par :

{% if outing.organizer.profilePicture %} Photo de profil de {{ outing.organizer.pseudo }} {% else %} Photo de profil de {{ outing.organizer.pseudo }} {% endif %}

{% if outing.organizer == app.user %} Vous {% else %} {{ outing.organizer.firstname|capitalize }} {{ outing.organizer.lastname|upper }} {% endif %}

@{{ outing.organizer.pseudo }}

{{ outing.organizer.site.name }}

{% if outing.status.label == "Annulée" %} {% else %} {% if outing.isUserRegistered(app.user) and outing.organizer != app.user %} Se désister {% elseif outing.canUserRegister(app.user) %} S'inscrire {% elseif outing.organizer != app.user %} {% endif %} {% if outing.organizer == app.user %} Modifier {% endif %} {% endif %}

{{ outing.title }}

{# On regarde le label du statut de l'outing, si c'est créée ou ouverte on met le texte en success, si c'est activité en cours on met text-warning, sinon on met text-danger #} {% set labelColor = outing.status.label == 'Créée' or outing.status.label == 'Ouverte' ? 'text-dark-success text-light-success' : outing.status.label == 'Activité en cours' ? 'text-dark-warning text-light-warning' : 'text-dark-danger text-light-danger' %}

{{ outing.status.label }}

{% if outing.poster %} poster {% endif %} {% if app.user %}

Lieu : {{ outing.place.name }}

Adresse : {{ outing.place.address }}, {{ outing.place.city.name }} ({{ outing.place.city.postcode }} )

Date : {{ outing.startDate|format_datetime('long', 'short', locale='fr') }}

{% if outing.closingDate > date('now') %}

Clôture des inscriptions : {{ outing.closingDate|format_datetime('long', 'short', locale='fr') }}

{% endif %} {% endif %}

Nombre de participants inscrits : {{ outing.registrations|length }} / {{ outing.registrationsMax }}

{{ outing.description }}

{% if outing.registrations|length > 0 %}

Liste des participants

{% for registration in outing.registrations %} {% endfor %}
{% endif %}
{% endblock %}