On ne montre pas la pin s'il n'y a pas de lieu

This commit is contained in:
Jean-Marie Favreau 2024-11-29 19:37:37 +01:00
parent 1fc1fc13e1
commit 27bce22670

View File

@ -22,16 +22,17 @@
{% endif %}
{% if event.end_time %} {% if not event.end_day|date|frdate or event.end_day == event.start_day %}jusqu'à{% endif %} {{ event.end_time }}{% endif %}
</p>
<p>
{% picto_from_name "map-pin" %}
{% if event.exact_location %}
<a href="{{ event.exact_location.get_absolute_url }}">{{ event.exact_location.name }}, {{ event.exact_location.city }}</a>
<p>{% picto_from_name "map-pin" %}
<a href="{{ event.exact_location.get_absolute_url }}">{{ event.exact_location.name }}, {{ event.exact_location.city }}</a></p>
{% else %}
{% if perms.agenda_culturel.change_event and perms.agenda_culturel.change_place %}
<a href="{% url 'add_place_to_event' event.pk %}" class="missing-data">{{ event.location }}</a>
<p>{% picto_from_name "map-pin" %}
<a href="{% url 'add_place_to_event' event.pk %}" class="missing-data">{% if event.location %}{{ event.location }}{% else %}sans lieu{% endif %}</a></p>
{% else %}
{{ event.location }}
{% if event.location %}<p>{% picto_from_name "map-pin" %} {{ event.location }}</p>{% endif %}
{% endif %}
{% endif %}
</p>