templates/FrontCommun/VoyagesOrganise/details/details.html.twig line 1

Open in your IDE?
  1. {% set configAffichage = getConfigAffichage() %}
  2. {% set add_select_pack = configAffichage.VOYAGE.ADD_SELECT_PACK == 'oui' %}
  3. {% set type_champ_periode = configAffichage.VOYAGE.TYPE_CHAMP_PERIODE %}
  4. {% set resultView = {1:'pension-room',2:'pension-combin-room',3:'combin-room-pension',4:'room-pension','pension-room':'pension-room','pension-combin-room':'pension-combin-room','combin-room-pension':'combin-room-pension','room-pension':'room-pension'}[app.request.get('modele',is_mobile() ? configAffichage.HOTEL.BLOC_CHAMBRE_TARIFS_MOBILE : configAffichage.HOTEL.BLOC_CHAMBRE_TARIFS)] %}
  5. {% set produit = "SHT" %}
  6. {% set onlyHotelPrice = true %}
  7. {% extends 'FrontCommun/base.html.twig' %}
  8. {% import "FrontCommun/template_banner.html.twig" as tpl %}
  9. {% block title %}
  10.     {% if details.referencement.title is defined and details.referencement.title != null %}{{ details.referencement.title|raw }}{% else %}Details Voyages!{% endif %}
  11. {% endblock %}
  12. {% block breadcrumb_title %}
  13.     {{ details.libelle }}
  14. {% endblock %}
  15. {% block stylesheets %}
  16.     {{ parent() }}
  17.     <link rel="stylesheet" href="{{ asset('assets-commun/css/choices.min.css') }}">
  18.     <link rel="stylesheet" href="{{ asset('assets-commun/css/slick.css') }}">
  19.     <link rel="stylesheet" href="{{ asset('assets-commun/css/slick-theme.css') }}">
  20.     <link rel="stylesheet" href="{{ asset('assets-commun/css/prettyPhoto.css') }}">
  21.     {% if configAffichage is defined and configAffichage!= null and configAffichage.VOYAGE.BLOC_CARNET is defined and configAffichage.VOYAGE.BLOC_CARNET ==2 %}
  22.         <link rel="stylesheet" href="{{ asset('assets-commun/css/details-voyages-carnet-02.css') }}">
  23.     {% elseif configAffichage is defined and configAffichage!= null and configAffichage.VOYAGE.BLOC_CARNET is defined and configAffichage.VOYAGE.BLOC_CARNET == 3 %}
  24.         <link rel="stylesheet" href="{{ asset('assets-commun/css/details-voyages-carnet-03.css') }}">
  25.     {% else %}
  26.         <link rel="stylesheet" href="{{ asset('assets-commun/css/details-voyages-carnet-01.css') }}">
  27.     {% endif %}
  28.     {% if configAffichage is defined and configAffichage!= null and configAffichage.VOYAGE.BLOCS_DETAILS is defined and configAffichage.VOYAGE.BLOCS_DETAILS == 4 %}
  29.         <link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.css'>
  30.         <link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/carousel/carousel.css'>
  31.         <link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/carousel/carousel.thumbs.css'>
  32.     {% endif %}
  33.     <link rel="stylesheet" href="{{ asset('assets-commun/css/details-voyages-pricing-01.css') }}">
  34.     <style>
  35.         ul.tarifs-pack li {
  36.             order: 5;
  37.         }
  38.         ul.tarifs-pack {
  39.             display: flex;
  40.             flex-direction: column;
  41.         }
  42.         .loading img {
  43.             width: 15%;
  44.         }
  45.         .title-event .text-bold.font-color {
  46.             font-weight: 600;
  47.             color: #f26622;
  48.         }
  49.         .bg-transparent {
  50.             background-color: transparent !important;;
  51.         }
  52.         .noborder {
  53.             border: none !important;
  54.         }
  55.         .border-color-omra {
  56.             border: 2px solid var(--color)
  57.         }
  58.         .border-color-omra h4 {
  59.             color: #f26622;
  60.             font-weight: 600 !important;
  61.         }
  62.     </style>
  63.     <link href="{{ asset('assets-commun/css/icones.css') }}" rel="stylesheet" type="text/css"/>
  64.     <script>(function (d, s, id) {
  65.             var js, fjs = d.getElementsByTagName(s)[0];
  66.             if (d.getElementById(id)) return;
  67.             js = d.createElement(s);
  68.             js.id = id;
  69.             js.src = "//connect.facebook.net/fr_FR/sdk.js#xfbml=1&version=v2.5&appId=1312988775401737";
  70.             fjs.parentNode.insertBefore(js, fjs);
  71.         }(document, 'script', 'facebook-jssdk'));</script>
  72.     <script type="application/ld+json">
  73.          {
  74.               "telephone" : "{{ getAgence().tel1 }}",
  75.               "@context" : "http://schema.org",
  76.               "@type": "Product",
  77.               "name": "{{ details.libelle }}",
  78.               "@id": "{{ app.request.uri }}",
  79.               "brand": {
  80.                   "@type": "Brand",
  81.                   "name": "{{ agence.nom }}"
  82.               },
  83.               "description" : "{{ details.descriptionCourte }}",
  84.               "priceRange" : "Prix disponible dès {{ details.prix }}
  85.          {{ app.session.get('devise',{'symbole':'DT'})['symbole'] }}",
  86.               "@type" : "Voyage",
  87.               "name" : "{{ details.libelle }}",
  88.               "image" : "{{ details.photoPrincipal }}",
  89.               "url" : "{{ app.request.uri }}",
  90.               "offers": {
  91.                   "@type": "Offer",
  92.                   "url": "{{ app.request.uri }}",
  93.                   "priceCurrency": "{{ app.session.get('devise',{'symbole':'DT'})['symbole'] }}",
  94.                   "price": "{{ details.prix }}",
  95.                   "itemCondition": "https://schema.org/NewCondition"
  96.               }
  97.           }
  98.     </script>
  99. {% endblock %}
  100. {% block meta_keywords %}
  101.     {% if  details.referencement.metaKeywords is defined and details.referencement.metaKeywords != null %}
  102.         <meta name="keywords" content="{{ details.referencement.metaKeywords|raw }}">
  103.     {% endif %}
  104. {% endblock %}
  105. {% block meta_description %}
  106.     {% if details.referencement.metaDescription is defined and details.referencement.metaDescription != null %}
  107.         <meta name="description" content="{{ details.referencement.metaDescription|raw }}">
  108.     {% endif %}
  109. {% endblock %}
  110. {% block injection_head %}
  111.     {% if details.referencement.injectionHeader is defined and details.referencement.injectionHeader != null %}
  112.         {{ details.referencement.injectionHeader|raw }}
  113.     {% endif %}
  114.     {% block metas %}
  115.         <meta property="og:locale" content="fr_FR"/>
  116.         <meta property="og:type" content="article"/>
  117.         <meta property="og:title" content="{{ details.libelle }}"/>
  118.         <meta property="og:description" content="{{ details.descriptionCourte }}"/>
  119.         <meta property="og:url" content="{{ app.request.uri }}"/>
  120.         <meta property="og:site_name" content="{{ agence.nom }}"/>
  121.         <meta property="og:image" content="{{ details.photoPrincipal }}"/>
  122.     {% endblock %}
  123. {% endblock %}
  124. {% block body %}
  125.     {% block injection_body %}
  126.         {% if details.referencement.injectionBody is defined and details.referencement.injectionBody != null %}
  127.             {{ details.referencement.injectionBody|raw }}
  128.         {% endif %}
  129.     {% endblock %}
  130.    {% set modele = configAffichage.VOYAGE.MODELE_OMRA_PERSONNALISE %}
  131.     {% set file = (type == 6 and modele != 'modele-voyage-organise')
  132.         ? 'details-omra-content' ~ modele ~ '.html.twig'
  133.         : 'details-content.html.twig' %}
  134.     {% include checkCustomTemplate('VoyagesOrganise/details/' ~ file) %}
  135. {% endblock %}
  136. {% block javascripts %}
  137.     {{ parent() }}
  138.     <script type="text/javascript"
  139.             src="https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-61d2ef47fa39ad61"></script>
  140.     <script type="text/javascript" src="{{ asset('assets-commun/html5lightbox/html5lightbox.js') }}"></script>
  141.     <script type="text/javascript" src="{{ asset('assets-commun/js/jquery.jclock.js') }}"></script>
  142.     <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
  143.     <script src="{{ asset('assets-commun/js/jquery.month.circle.js') }}" charset="utf-8"></script>
  144.     <script type="text/javascript">
  145.         $(function ($) {
  146.             $('#jclock').jclock({
  147.                 format: '%H:%M:%S',
  148.                 utc: true,
  149.                 utcOffset: 5
  150.             });
  151.         });
  152.         /*plan de voyage*/
  153.         $('#sel2').on('change', function () {
  154.             $(".pack_item_palns").hide();
  155.             $("#pl-" + $(this).val()).show();
  156.         });
  157.         /**/
  158.         /*periode pack*/
  159.         {% if type_champ_periode == 'select' %}
  160.         $('#sel1').on('change', function () {
  161.             $(".pack_item").hide();
  162.             $("#p-" + $(this).val()).show();
  163.             {% if add_select_pack %}
  164.             $("select#packs option").hide();
  165.             $("select#packs option.packs-" + $(this).val()).show();
  166.             $("select#packs option.packs-" + $(this).val() + ":first").prop('selected', true);
  167.             $("div.periode-pack").hide();
  168.             $("div#periode__periode__-pack__pack__".replace('__periode__', $('select#sel1').val()).replace('__pack__', $('select#packs').val())).show();
  169.             {% endif %}
  170.         });
  171.         {% if add_select_pack %}
  172.         $('#packs').on('change', function () {
  173.             $("div.periode-pack").hide();
  174.             $("div#periode__periode__-pack__pack__".replace('__periode__', $('select#sel1').val()).replace('__pack__', $('select#packs').val())).show();
  175.         })
  176.         {% endif %}
  177.         {% endif %}
  178.         /*end periode pack */
  179.         {% if type_champ_periode == 'radio' %}
  180.         /*periode pack radio */
  181.         $('[name=sel1]').on('change', function () {
  182.             $(".pack_item").hide();
  183.             $("#p-" + $(this).val()).show();
  184.             {% if add_select_pack %}
  185.             $("label.packs").hide();
  186.             $("label.packs.packs-" + $(this).val()).show();
  187.             $("label.packs.packs-" + $(this).val() + ":first input").prop('checked', true);
  188.             $("div.periode-pack").hide();
  189.             $("div#periode__periode__-pack__pack__".replace('__periode__', $('[name=sel1]:checked').val()).replace('__pack__', $('[name=packs]:checked').val())).show();
  190.             {% endif %}
  191.         });
  192.         {% if add_select_pack %}
  193.         $('[name=packs]').on('change', function () {
  194.             $("div.periode-pack").hide();
  195.             $("div#periode__periode__-pack__pack__".replace('__periode__', $('[name=sel1]:checked').val()).replace('__pack__', $('[name=packs]:checked').val())).show();
  196.         })
  197.         {% endif %}
  198.         {% endif %}
  199.         /*end periode pack*/
  200.     </script>
  201.     {##}
  202.     <script src="{{ asset('assets-commun/js/vuejs-component/vue-paginate.js') }}"></script>
  203.     <script src="{{ asset('assets-commun/js/vuejs-component/axios.min.js') }}"></script>
  204.     {% include 'FrontCommun/SejourHotel/availability/vuejs-list-hotels.html.twig' %}
  205.     {% include 'FrontCommun/vuejs-advanced-search.html.twig' with { produit:'SHT', onlySearchCity:'0', destination:{type:'h', id:app.request.get('id'), name:''} } %}
  206.     {##}
  207.     <script>
  208.         $('.heberger').click(function () {
  209.             let checkout = new Date($(this).data('checkin'))
  210.             checkout.setDate(checkout.getDate() + $(this).data('nuitees'));
  211.             vjsAdvancedSearchSHT.checkin_en = $(this).data('checkin')
  212.             vjsAdvancedSearchSHT.checkout_en = checkout.toISOString().split('T')[0]
  213.             vjsAdvancedSearchSHT.nuitees = $(this).data('nuitees')
  214.             window.checkin_en = vjsAdvancedSearchSHT.checkin_en
  215.             window.checkout_en = vjsAdvancedSearchSHT.checkout_en
  216.             vjsAdvancedSearchSHT.destination = `h-${$(this).data('hotel')}`
  217.             $('#occupationsSHT .modal-header h3').html(` ${$(this).data('title')}`)
  218.         })
  219.         $('#demande-hebergement').click(function () {
  220.             let rooms = []
  221.             vjsAdvancedSearchSHT.rooms.map(x => {
  222.                 rooms.push(([x['Adult']].concat(x['Child'])).join(','))
  223.             });
  224.             vjsAdvancedSearchSHT.room = rooms.join(';')
  225.             vjsAdvancedSearchSHT.callAvailabilitySHT()
  226.         })
  227.     </script>
  228.     <script>
  229.         function setRecap() {
  230.             vjsAdvancedSearchSHT.Recap()
  231.             $('#recap-checkin').html(vjsAdvancedSearchSHT.checkin_en)
  232.             $('#recap-nuitees').html(vjsAdvancedSearchSHT.nuitees + ' nuitées')
  233.             $('#recap-occupations').html(vjsAdvancedSearchSHT.recap_occupations)
  234.         }
  235.         $("#demande-hebergement").click(function () {
  236.             $("#event-room").show();
  237.             $("#vjs-advanced-search-sht").hide();
  238.             setRecap()
  239.         });
  240.         $(document).on('click', '#edit-search', function () {
  241.             $("#vjs-advanced-search-sht").show();
  242.             $("#event-room").hide();
  243.             setRecap()
  244.         });
  245.         $(document).on('click', '.heberger', function () {
  246.             $("#vjs-advanced-search-sht").show();
  247.             $("#event-room").hide();
  248.             setRecap()
  249.         });
  250.     </script>
  251.     <script>
  252.         // Get all share buttons
  253.         const shareButtons = document.querySelectorAll('.share-button');
  254.         // Add click event listener to each button
  255.         shareButtons.forEach(button => {
  256.             button.addEventListener('click', () => {
  257.                 // Get the URL of the current page
  258.                 const url = window.location.href;
  259.                 // Get the social media platform from the button's class name
  260.                 const platform = button.classList[1];
  261.                 // Set the URL to share based on the social media platform
  262.                 let shareUrl;
  263.                 switch (platform) {
  264.                     case 'facebook':
  265.                         shareUrl = `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(url)}`;
  266.                         break;
  267.                     case 'twitter':
  268.                         shareUrl = `https://twitter.com/share?url=${encodeURIComponent(url)}`;
  269.                         break;
  270.                     case 'linkedin':
  271.                         shareUrl = `https://www.linkedin.com/shareArticle?url=${encodeURIComponent(url)}`;
  272.                         break;
  273.                     case 'instagram':
  274.                         shareUrl = `https://www.instagram.com/?url=${encodeURIComponent(url)}`;
  275.                         break;
  276.                     case 'whatsapp':
  277.                         shareUrl = `https://api.whatsapp.com/send?text=${encodeURIComponent(url)}`;
  278.                         break;
  279.                 }
  280.                 // Open a new window to share the URL
  281.                 window.open(shareUrl, '_blank');
  282.             });
  283.         });
  284.     </script>
  285.     {% if configAffichage is defined and configAffichage!= null and configAffichage.VOYAGE.BLOCS_DETAILS is defined and configAffichage.VOYAGE.BLOCS_DETAILS == 4 %}
  286.         <script src='https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.umd.js'></script>
  287.         <script src='https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/carousel/carousel.umd.js'></script>
  288.         <script src='https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/carousel/carousel.thumbs.umd.js'></script>
  289.         <script>
  290.             const container = document.getElementById("myCarousel");
  291.             const options = {
  292.                 Dots: false,
  293.                 Thumbs: {
  294.                     type: 'classic',
  295.                 },
  296.             };
  297.             new Carousel(container, options, {Thumbs});
  298.             Fancybox.bind("[data-fancybox]", {
  299.                 // Your custom options
  300.             });
  301.         </script>
  302.     {% endif %}
  303.     <script>
  304.         $(document).ready(function () {
  305.             $('.chambre .inc').on('click', function () {
  306.                 var maxOcc = $(this).parents('.chambre').find('.chambre-select').val();
  307.                 var nbrAdultes = $(this).parents(".chambre").find("input[type='number'].adultes");
  308.                 var nbrEnfants = $(this).parents(".chambre").find("input[type='number'].enfants");
  309.                 var nbrBebes = $(this).parents(".chambre").find("input[type='number'].bebes");
  310.                 var InputNumber = $(this).siblings("input[type='number']");
  311.                 InputNumber.attr('max', maxOcc);
  312.                 InputNumber.attr('min', 0);
  313.                 var Occ = parseInt(nbrAdultes.val(), 10) + parseInt(nbrEnfants.val(), 10) + parseInt(nbrBebes.val(), 10);
  314.                 if (Occ < maxOcc) {
  315.                     InputNumber.val(parseInt(InputNumber.val()) + +1);
  316.                 }
  317.             });
  318.             $('.chambre .dec').on('click', function () {
  319.                 var InputNumber = $(this).siblings("input[type='number']:not(.adultes)");
  320.                 var InputNumberAdulte = $(this).siblings("input[type='number'].adultes");
  321.                 if (InputNumberAdulte.val() > 1) {
  322.                     InputNumberAdulte.val(parseInt(InputNumberAdulte.val()) + -1);
  323.                 }
  324.                 if (InputNumber.val() > 0) {
  325.                     InputNumber.val(parseInt(InputNumber.val()) + -1);
  326.                 }
  327.             });
  328.             $('.add_chambre').on('click', function () {
  329.                 chambre = $('.chambres .chambre.first').clone(true);
  330.                 var idx = $('.chambres .chambre').length + 1;
  331.                 chambre.removeClass('first');
  332.                 chambre.attr('id', 'chambre_' + idx);
  333.                 chambre.find('.control-label.chmbr').html('Chambre' + (idx));
  334.                 chambre.find("input[type='number'].adultes").val(1);
  335.                 chambre.find("input[type='number']:not(.adultes)").val(0);
  336.                 chambre.find("select").val(4);
  337.                 chambre.find('.delete_chambre').show();
  338.                 chambre.find("select[name='reservation[chambre][0][type]']").attr('name', "reservation[chambre][" + (idx) + "][type]");
  339.                 chambre.find("input[type='number'][name='reservation[chambre][0][adultes]']").attr('name', "reservation[chambre][" + (idx) + "][adultes]");
  340.                 chambre.find("input[type='number'][name='reservation[chambre][0][enfants]']").attr('name', "reservation[chambre][" + (idx) + "][enfants]");
  341.                 chambre.find("input[type='number'][name='reservation[chambre][0][bebes]']").attr('name', "reservation[chambre][" + (idx) + "][bebes]");
  342.                 $('.chambres').append(chambre);
  343.                 $('.delete_chambre').on('click', function () {
  344.                     $(this).closest('.chambre:not(.first)').remove();
  345.                 });
  346.                 $('.reset_chambres').on('click', function () {
  347.                     $('.chambres').find('.chambre:not(.first)').remove();
  348.                 });
  349.             });
  350.             // Disable scroll when focused on a number input.
  351.             $('form').on('focus', 'input[type=number]', function (e) {
  352.                 $(this).on('wheel', function (e) {
  353.                     e.preventDefault();
  354.                 });
  355.             });
  356.             // Disable up and down keys.
  357.             $('form').on('keydown', 'input[type=number]', function (e) {
  358.                 if (e.which == 38 || e.which == 40)
  359.                     e.preventDefault();
  360.             });
  361.         });
  362.     </script>
  363.     </body>
  364. {% endblock %}