From 27bce22670307b87c8503a44c137cbcb14f35e8c Mon Sep 17 00:00:00 2001
From: Jean-Marie Favreau
Date: Fri, 29 Nov 2024 19:37:37 +0100
Subject: [PATCH] On ne montre pas la pin s'il n'y a pas de lieu
---
.../single-event/event-single-inc.html | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/agenda_culturel/templates/agenda_culturel/single-event/event-single-inc.html b/src/agenda_culturel/templates/agenda_culturel/single-event/event-single-inc.html
index 7482ee2..0b5c657 100644
--- a/src/agenda_culturel/templates/agenda_culturel/single-event/event-single-inc.html
+++ b/src/agenda_culturel/templates/agenda_culturel/single-event/event-single-inc.html
@@ -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 %}
-
- {% picto_from_name "map-pin" %}
+
{% if event.exact_location %}
- {{ event.exact_location.name }}, {{ event.exact_location.city }}
+
{% picto_from_name "map-pin" %}
+ {{ event.exact_location.name }}, {{ event.exact_location.city }}
{% else %}
{% if perms.agenda_culturel.change_event and perms.agenda_culturel.change_place %}
- {{ event.location }}
+ {% picto_from_name "map-pin" %}
+ {% if event.location %}{{ event.location }}{% else %}sans lieu{% endif %}
{% else %}
- {{ event.location }}
+ {% if event.location %}{% picto_from_name "map-pin" %} {{ event.location }}
{% endif %}
{% endif %}
{% endif %}