templates/front/hotel/hotel_detail.html.twig line 1

Open in your IDE?
  1. {% extends 'front/base_front.html.twig' %}
  2. {% block title %}
  3.     {{ hotel_data.name ?? 'Pages.HotelDetail.Label'|trans({}, 'messages_front') }}
  4. {% endblock %}
  5. {% block stylesheets %}
  6.     {{ parent() }}
  7.     {{ encore_entry_link_tags('app') }}
  8. {% endblock %}
  9. {% block javascripts %}
  10.     {{ parent() }}
  11.     {{ encore_entry_script_tags('app') }}
  12. {% endblock %}
  13. {% block SEO %}
  14.     {% if hotel_data.name is defined %}
  15.         <!-- title -->
  16.         {% if hotel_data.seo is defined and hotel_data.seo is not null and hotel_data.seo.title is not empty %}
  17.             <meta name="title" content="{{ hotel_data.seo.title }}">
  18.             <meta property="og:title" content="{{ hotel_data.seo.title }}">
  19.         {% else %}
  20.             <meta name="title" content="{{ hotel_data.name }}">
  21.             <meta property="og:title" content="{{ hotel_data.name }}">
  22.         {% endif %}
  23.         <!-- description -->
  24.         {% if hotel_data.seo is defined and hotel_data.seo is not null and hotel_data.seo.description is not empty %}
  25.             <meta name="description" content="{{ hotel_data.seo.description }}">
  26.             <meta property="og:description" content="{{ hotel_data.seo.description }}">
  27.         {% endif %}
  28.         <meta property="og:type" content="website"/>
  29.         <meta property="og:url" content="{{ app.request.getUri() }}">
  30.         <meta property="og:image" content="{{ hotel_data.thumbImage ?? '' }}">
  31.         <!-- social media specification -->
  32.         {% for social_media in social_networks %}
  33.             {% if social_media.name == "Facebook" %}
  34.                 <meta property="fb:{{ social_media.pageId }}" content="{{ social_media.pageId }}">
  35.             {% endif %}
  36.             {% if social_media.name == "X" %}
  37.                 <meta name="twitter:card" content="{{ hotel_data.seo.description ?? '' }}"/>
  38.                 <meta name="twitter:site" content="{{ social_media.pageId }}"/>
  39.             {% endif %}
  40.         {% endfor %}
  41.     {% endif %}
  42. {% endblock %}
  43. {% block container %}
  44.     {% if hotel_data.name is defined %}
  45.         {# Adresse affichée sous le nom et dans « Emplacement » : l'adresse n'existe que pour les hôtels HUB #}
  46.         {% set hotel_location = [hotel_data.city ?? null, hotel_data.country ?? null]|filter(v => v is not empty)|join(', ') %}
  47.         {% set hotel_address = hotel_data.address is defined and hotel_data.address is not empty
  48.             ? hotel_data.address ~ (hotel_location ? ', ' ~ hotel_location : '')
  49.             : hotel_location %}
  50.         <section id="hotel_details_main" class="hd-page" data-controller="hotel-detail">
  51.             <div class="container hd">
  52.                 {{ include('front/hotel/detail/_header.html.twig') }}
  53.                 <div class="hd-row">
  54.                     {{ include('front/hotel/detail/_gallery.html.twig') }}
  55.                     <aside class="hd-side">
  56.                         {{ include('front/hotel/detail/_booking_card.html.twig') }}
  57.                         {{ include('front/hotel/detail/_alerts.html.twig') }}
  58.                     </aside>
  59.                 </div>
  60.                 <div class="row">
  61.                     {{ include('front/hotel/detail/_amenities.html.twig') }}
  62.                     {{ include('front/hotel/detail/_description.html.twig') }}
  63.                     {{ include('front/hotel/detail/_location.html.twig') }}
  64.                 </div>
  65.                 {{ include('front/hotel/detail/_recommended.html.twig') }}
  66.             </div>
  67.             {# Barre mobile : apparaît quand la carte « Vérifier la disponibilité » sort de l'écran #}
  68.             <div class="hd-mobile-bar" data-hotel-detail-target="mobileBar" hidden>
  69.                 <div class="hd-mobile-bar-text">
  70.                     <b>{{ hotel_data.name }}</b>
  71.                     <small>{{ hotel_location }}</small>
  72.                 </div>
  73.                 <button type="button" class="hd-btn-primary" data-action="hotel-detail#scrollToBooking">
  74.                     {{ 'Pages.HotelDetail.SeePrices'|trans({}, 'messages_front') }}
  75.                 </button>
  76.             </div>
  77.         </section>
  78.         {% include 'front/_faq.html.twig' with { faqs: faqs } only %}
  79.     {% else %}
  80.         <section class="hd-page">
  81.             <div class="container hd">
  82.                 <div class="hd-empty-state">
  83.                     <i class="bi bi-building-x" aria-hidden="true"></i>
  84.                     <h1>{{ 'Pages.HotelDetail.NotFoundTitle'|trans({}, 'messages_front') }}</h1>
  85.                     <p>{{ 'Pages.HotelDetail.NotFoundText'|trans({}, 'messages_front') }}</p>
  86.                     <a class="hd-btn-primary" href="{{ path('app_main') }}">{{ 'Pages.HotelDetail.BackHome'|trans({}, 'messages_front') }}</a>
  87.                 </div>
  88.             </div>
  89.         </section>
  90.     {% endif %}
  91. {% endblock %}