From 64b53f2fc4ea31a5b614a2196597e59db274d38d Mon Sep 17 00:00:00 2001 From: isUnknown Date: Fri, 6 Sep 2024 14:20:46 +0200 Subject: [PATCH] add bookingUrl field for local events --- assets/css/src/generic.css | 5 +++-- site/blueprints/pages/event.yml | 7 +++++++ site/templates/event.php | 12 +++++++++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/assets/css/src/generic.css b/assets/css/src/generic.css index d4fc7f3..0a29d5c 100644 --- a/assets/css/src/generic.css +++ b/assets/css/src/generic.css @@ -130,9 +130,10 @@ background-color: var(--color-yellow); } -.session:first-child > a { +/* .session:first-child > a { border-top: var(--border) !important; -} +} */ + .session:not(:last-child) { border-bottom: var(--border); } diff --git a/site/blueprints/pages/event.yml b/site/blueprints/pages/event.yml index a49716a..c8b04a6 100644 --- a/site/blueprints/pages/event.yml +++ b/site/blueprints/pages/event.yml @@ -39,6 +39,13 @@ tabs: isMapadoEvent: true mapadoSlug: type: hidden + bookingUrl: + label: Lien de réservation + type: url + width: 1/2 + when: + isMapadoEvent: false + help: Laisser vide pour afficher la mention "Entrée libre" duration: label: Durée type: text diff --git a/site/templates/event.php b/site/templates/event.php index 927fc99..7dbe586 100644 --- a/site/templates/event.php +++ b/site/templates/event.php @@ -31,6 +31,7 @@
'Prenez vos places !', 'padding' => false], slots: true) ?> + isMapadoEvent() != 'true'): ?> @@ -45,16 +46,21 @@ $formatter = new IntlDateFormatter('fr_FR', IntlDateFormatter::FULL, IntlDateFormatter::NONE); $formattedDate = $formatter->format($date); ?> -
+

time() ?>

-

place() ?>

- Entrée libre +

place() ?>

+ bookingUrl()->isEmpty()): ?> + Entrée libre + + Réserver +
+