diff --git a/site/blueprints/pages/event.yml b/site/blueprints/pages/event.yml index 978c3a4..ef9a0e7 100644 --- a/site/blueprints/pages/event.yml +++ b/site/blueprints/pages/event.yml @@ -106,8 +106,9 @@ tabs: Format : 20h00 ou 20h (pas 20:00) width: 1/2 ticketingUrl: - label: Lien de réservation - type: url + label: Lien de réservation / texte + type: text + help: Entrer une URL affichera un bouton ticket cliquable, entrer du texte l'affichera simplement à la place du ticket. isFull: label: Complet type: toggle diff --git a/site/templates/event.php b/site/templates/event.php index b0a4a03..e263096 100644 --- a/site/templates/event.php +++ b/site/templates/event.php @@ -58,19 +58,36 @@

place() ?>

- bookingUrl()->isEmpty()): ?> - isFull(), 'Complet', 'Entrée libre') ?> - - isFull()->isTrue(), ' disabled') ?> - > - isFull()->isTrue(), 'Complet', 'Réserver') ?> - - + bookingUrl()->isNotEmpty(); + $hasTicketingUrl = $session->ticketingUrl()->isNotEmpty(); + $isTicketingUrlValid = $hasTicketingUrl && filter_var($session->ticketingUrl(), FILTER_VALIDATE_URL); + $isFull = $session->isFull()->isTrue(); + ?> + + + + + + + +

ticketingUrl() ?>

+ + ticketingUrl()->url() + : $page->bookingUrl()->url(); + ?> + + > + + +