templates/Pages/destination.html.twig line 1

  1. {% extends 'base.html.twig' %}
  2. {% set title = destination.name %}
  3. {% if(destination.metaTitle is not empty) %}
  4.     {% set title = destination.metaTitle %}
  5. {% endif %}
  6. {% set description = destination.metaDescription %}
  7. {% block title %}{{ title }} | {{ parent() }}{% endblock %}
  8. {% block metaDescription %}{% if(description is not empty) %}{{ description }}{% else %}{{ parent() }}{% endif %}{% endblock %}
  9.         {% block top_destinations %}
  10.         {% endblock %}
  11. {% block body %}
  12.     {% set activeTab = app.request.get('tab','info') %}
  13.     {% include 'Components/Destination/Detail/basic-info.html.twig' %}
  14.     <div class="row product-complete-info">
  15.         <div class="container clear-padding">
  16.             <div class="col-md-12 main-content">
  17.                 <div class="room-complete-detail custom-tabs cruise-tabs col-md-12">
  18.                     <ul class="nav nav-tabs">
  19.                         <li class="{% if(activeTab=='info') %}active {% endif %}col-xs-12  col-sm-2 text-center"><a data-toggle="tab" href="#info">Informace</a></li>
  20.                         {% if(destination.showAccommodation) %}
  21.                             <li class="{% if(activeTab=='accommodation') %}active {% endif %}col-xs-12 col-sm-2 text-center"><a data-toggle="tab" href="#accommodation">Ubytování</a></li>
  22.                         {% endif %}
  23.                         {% if(destination.trips|length > 0 or destination.trip is not empty) %}
  24.                             <li class="{% if(activeTab=='trips') %}active {% endif %}col-xs-12 col-sm-2 text-center"><a data-toggle="tab" href="#trips">Výlety</a></li>
  25.                         {% endif %}
  26.                         {% if(destination.priceTable is not empty) %}
  27.                             <li class="{% if(activeTab=='prices') %}active {% endif %}col-xs-12 col-sm-4 text-center"><a data-toggle="tab" href="#prices">Ceník & Obsazenost</a></li>
  28.                         {% endif %}
  29.                         {% if(destination.gallerySecond is not empty and destination.gallerySecond.galleryItems|length > 0) %}
  30.                             <li class="{% if(activeTab=='gallery') %}active {% endif %}col-xs-12 col-sm-2 text-center"><a data-toggle="tab" href="#gallery">Galerie</a></li>
  31.                         {% endif %}
  32.                     </ul>
  33.                     <div class="tab-content">
  34.                         {% include 'Components/Destination/Detail/Tabs/info.html.twig' %}
  35.                         {% if(destination.showAccommodation) %}
  36.                             {% include 'Components/Destination/Detail/Tabs/accommodation.html.twig' %}
  37.                         {% endif %}
  38.                         {% if(destination.trips|length > 0 or destination.trip is not empty) %}
  39.                             {% include 'Components/Destination/Detail/Tabs/trips.html.twig' %}
  40.                         {% endif %}
  41.                         {% if(destination.priceTable is not empty) %}
  42.                             {% include 'Components/Destination/Detail/Tabs/prices.html.twig' %}
  43.                         {% endif %}
  44.                         {% if(destination.gallerySecond is not empty and destination.gallerySecond.galleryItems|length > 0) %}
  45.                             {% include 'Components/Destination/Detail/Tabs/gallery.html.twig' %}
  46.                         {% endif %}
  47.                     </div>
  48.                 </div>
  49.             </div>
  50.         </div>
  51.     </div>
  52. {% endblock %}
  53. {% block scripts %}
  54.     {{ parent() }}
  55.     <script type="text/javascript">
  56.         /*******************************************************************
  57.          BEGIN: FLEX SLIDER SETTING
  58.          *******************************************************************/
  59.         $(window).load(function () {
  60.             "use strict";
  61.             $('#carousel').flexslider({
  62.                 animation: "slide",
  63.                 controlNav: false,
  64.                 animationLoop: false,
  65.                 slideshow: false,
  66.                 itemWidth: 150,
  67.                 itemMargin: 5,
  68.                 asNavFor: '#slider'
  69.             });
  70.             $('#slider').flexslider({
  71.                 animation: "slide",
  72.                 controlNav: false,
  73.                 animationLoop: false,
  74.                 slideshow: false,
  75.                 sync: "#carousel"
  76.             });
  77.             $(document).on('click', ".view-terms", function (el) {
  78.                 let container = $(this).data('toggleId');
  79.                 $('#' + container).toggle();
  80.             });
  81.             $("#accommodation .inclusion-wrapper").each((index, inclusion) => {
  82.                 $(".inclusion-title", inclusion).click(() => {
  83.                     $(".inclusion-body").hide();
  84.                     $(".inclusion-body", inclusion).toggle();
  85.                 });
  86.             });
  87.         });
  88.     </script>
  89. {% endblock %}