templates/reservation/dates_available.html.twig line 1

Open in your IDE?
  1. <strong>{% if isDateAvailable %}Veuillez choisir un créneau !{% else %}Aucune date disponible{% endif %}</strong><br/><br/>
  2. {% set trans_month_hash = {
  3.         "January": "Janvier",
  4.         "February": "Février",
  5.         "March": "Mars",
  6.         "April": "Avril",
  7.         "May": "Mai",
  8.         "June": "Juin",
  9.         "July": "Juillet",
  10.         "August": "Août",
  11.         "September": "Septembre",
  12.         "October": "Octobre",
  13.         "November": "Novembre",
  14.         "December": "Décembre"
  15.     }
  16. %}
  17. {% set trans_day_hash = {
  18.         "Monday": "Lundi",
  19.         "Tuesday": "Mardi",
  20.         "Wednesday": "Mercredi",
  21.         "Thursday": "Jeudi",
  22.         "Friday": "Vendredi",
  23.         "Saturday": "Samedi",
  24.         "Sunday": "Dimanche"
  25.     }
  26. %}
  27. {% if dates is not empty %}
  28.     <p>Date(s) disponible(s)</p>
  29.     {% for date, times in dates %}
  30.         <div class="mt-3">
  31.             {% set french_day = trans_day_hash[date|date('l', 'Europe/Paris')] %}
  32.             {% set french_month = trans_month_hash[date|date('F', 'Europe/Paris')] %}
  33.             <strong>{{ french_day ~ " " ~ date|date('j', 'Europe/Paris') ~ " " ~ french_month ~ " " ~ date|date('Y', 'Europe/Paris') }}</strong>
  34.             <div class="time-wrapper d-flex flex-wrap">
  35.                 {% for time in times %}
  36.                     <div class="time" data-date="{{ date }} {{ time }}">{{ time }}</div>
  37.                 {% endfor %}
  38.             </div>
  39.         </div>
  40.     {% endfor %}
  41. {% endif %}