src/Aviatur/TwigBundle/Resources/views/aviatur/Flux/App/front.html.twig line 119

Open in your IDE?
  1. {% extends twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/App/base.html.twig') %}
  2. {# head #}
  3. {% if pdfGenerator is not defined %}
  4.     {% block head_title %}
  5.         {% if seo_title is defined %}
  6.             {{seo_title}}{% else %}Tiquetes Baratos, Hoteles, Paquetes Turísticos y Viajes | Aviatur
  7.         {% endif %}
  8.     {% endblock head_title %}
  9.     {% block head_description_content %}
  10.         {% if seo_description is defined %}
  11.             {{seo_description}}{% else %}Agencia de viajes Aviatur. Encuentra ofertas de vuelos, hoteles, paquetes turísticos, cruceros, autos y más. Tiquetes baratos Nacionales e Internacionales
  12.         {% endif %}
  13.     {% endblock head_description_content %}
  14.     {% block head_meta_title %}
  15.         {% if seo_meta_title is defined %}
  16.             {{seo_meta_title}}
  17.         {% endif %}
  18.     {% endblock head_meta_title %}
  19.     {% if is_mobile() %}
  20.         {% block head_viewport %}
  21.             <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
  22.             <link rel="apple-touch-icon" href="{{ absolute_url(asset('assets/'~ agency_folder.assetStyle() ~'/img/ios/touch-icon-iphone.png')) }}">
  23.             <link rel="apple-touch-icon" sizes="76x76" href="{{ absolute_url(asset('assets/'~ agency_folder.assetStyle() ~'/img/ios/touch-icon-ipad.png')) }}">
  24.             <link rel="apple-touch-icon" sizes="120x120" href="{{ absolute_url(asset('assets/'~ agency_folder.assetStyle() ~'/img/ios/touch-icon-iphone-retina.png')) }}">
  25.             <link rel="apple-touch-icon" sizes="152x152" href="{{ absolute_url(asset('assets/'~ agency_folder.assetStyle() ~'/img/ios/touch-icon-ipad-retina.png')) }}">
  26.             <link rel="apple-touch-icon" sizes="180x180" href="{{ absolute_url(asset('assets/'~ agency_folder.assetStyle() ~'/img/ios/touch-icon-iphone-plus-retina.png')) }}">
  27.         {% endblock head_viewport %}
  28.     {% endif %}
  29. {% endif %}
  30. {#{% block stylesheets %}
  31.     <link type="text/css" rel="stylesheet" href="{{ absolute_url(asset('assets/common_assets/css/vendor/owl-carousel/owl.carousel.css')) }}"/>
  32.     <link type="text/css" rel="stylesheet" href="{{ absolute_url(asset('assets/common_assets/css/vendor/owl-carousel/owl.theme.css')) }}"/>
  33.     {{ parent() }}
  34. {% endblock stylesheets %}#}
  35. {# END head #}
  36. {% block base_content %}
  37.     {% if pdfGenerator is not defined %}
  38.         <!--[if (!IE)|(gt IE 8)]><!-->
  39.         {% block header %}
  40.             {% set somepromoimage = false %}
  41.             {% set linkHeader = path('homepage') %}
  42.             {% set specialStyle = '' %}
  43.             {% set classMainNav = '' %}
  44.             {% set logoVersion = '' %}
  45.             {% set onPromo = false %}
  46.             {# {% set headerPromoStart = app.session.get('headerPromoStart')|date('U') %}
  47.                                                                                                                                                                         {% set headerPromoEnd = app.session.get('headerPromoEnd')|date('U') %} #}
  48.             {% set nowDateU = "now"|date('U') %}
  49.             {% if background_home is defined %}
  50.                 {% if background_home.active == 'true' %}
  51.                     {% set videoType ='-day' %}
  52.                     {% set imgType = background_home.name %}
  53.                 {% endif %}
  54.             {% else %}
  55.                 {% set videoType = '-day' %}
  56.                 {% set imgType = '_background_default' %}
  57.             {% endif %}
  58.             {% if blackFriday is defined %}
  59.                 {% if blackFriday == 'true' %}
  60.                     {% set videoType = 'NO_VID' %}
  61.                     {% set imgType = '_black_friday' %}
  62.                     <input type="hidden" class="js-hdBlackFriday" value="{{blackFriday}}">
  63.                 {% endif %}
  64.             {% endif %}
  65.             <header class="page-head{{ specialStyle }}">
  66.                 {% if app.user != "" and (is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_EDIT_' ~ app.session.get('agencyId')) or is_granted('ROLE_SUPER_ADMIN') ) %}
  67.                     {% if background_home is defined %}
  68.                         <div class="page-head-edit-background">
  69.                             <a href="#" class="js-ajax-homechange" data-toggle="modal" data-target="#js-promo-editModal">Editar</a>
  70.                         </div>
  71.                     {% endif %}
  72.                 {% endif %}
  73.                 <div class="page-head__bg-container">
  74.                     {% if videoType is not defined %}
  75.                         {% set curHour = 'now'|localizeddate("medium", "none", null, null, "Hmm") %}
  76.                         {% if curHour >= '500' and curHour < '900' %}
  77.                             {# 05:00 - 08:59 #}
  78.                             {% set videoType = '-day' %}
  79.                         {% elseif curHour >= '900' and curHour < '1300' %}
  80.                             {# 09:00 - 12:59 #}
  81.                             {% set videoType = '-day' %}
  82.                         {% elseif curHour >= '1300' and curHour < '1700' %}
  83.                             {# 13:00 - 16:59 #}
  84.                             {% set videoType = '-day' %}
  85.                         {% elseif curHour >= '1700' and curHour < '2100' %}
  86.                             {# 17:00 - 20:59 #}
  87.                             {% set videoType = '-day' %}
  88.                         {% else %}
  89.                             {# 21:00 - 04:59 #}
  90.                             {% set videoType = '-day' %}
  91.                         {% endif %}
  92.                     {% endif %}
  93.                     {% if videoType != 'NO_VID' %}
  94.                         {% block headerVideo %}{% endblock headerVideo %}
  95.                         <div class="page-head__bg__img bg-img{{ videoType }} js-headerImg"></div>
  96.                     {% else %}
  97.                         <div class="page-head__bg__img bg-img{{ imgType }} js-headerImg"></div>
  98.                     {% endif %}
  99.                 </div>
  100.                 {% if app.session.has('operatorId') != 1 %}
  101.                     {% include twig_exists('@AviaturTwig/'~ agency_folder.twigStyle() ~'/App/header.html.twig') %}
  102.                 {% endif %}
  103.                 {% block searcher_header %}{% endblock %}
  104.             </header>
  105.         {% endblock %}
  106.     {% else %}
  107.         <section></section>
  108.     {% endif %}
  109.     {% set displayState = '' %}
  110.     {% if 'aviatur_general_homepage' in app.request.attributes.get('_route') and not app.request.query.has('anchor') %}
  111.         {% set displayState = 'hidden-palm' %}
  112.     {% endif %}
  113.     <div class="page__body pt-[17px]">
  114.         <div class="ajax-loader spinOverlay sp-offset--big js-loadingChangeCoin" style="display: none;"></div>
  115.         {% block body %}{% endblock body %}
  116.         {# {% embed twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/General/Components/component_contactWidget.html.twig') %}
  117.             {% block contactWidget_banner %}
  118.                 <img class="icon-contact" src="{{ absolute_url(asset('assets/'~ agency_folder.assetStyle() ~'/img/header/lo-llamamos.svg')) }}" alt="Whatsapp">
  119.             {% endblock %}
  120.             {% block contactWidget_disclaimer %}
  121.                 Cerrar
  122.             {% endblock %}
  123.         {% endembed %} #}
  124.         <div class="hidden-portable">
  125.             {% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/App/needHelp.html.twig') %}
  126.         </div>
  127.         {# <a class="hide" href="https://www.aviatur.com/contenidos/asesor-en-linea" style="position: fixed; right: 132px; width: 106px;bottom:20px"><img target="_blank" class="btn_adviser schedule-appointment_icon" src="https://aviaturcdndev.z5.web.core.windows.net/assets/aviatur_assets/img/header/asesor.webp" alt="Whatsapp"></a> #}
  128.     </div>
  129.     {% if pdfGenerator is not defined %}
  130.         {% if app.session.has('operatorId') != 1 and app.session.has('whitemark') != 1 %}
  131.             {% block footer %}
  132.                 {% include twig_exists('@AviaturTwig/'~ agency_folder.twigStyle() ~'/App/footer.html.twig') %}
  133.             {% endblock footer %}
  134.         {% endif %}
  135.         {% block modal %}
  136.             {{ parent()}}
  137.             {% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/General/Components/callUsModal.html.twig') %}
  138.             {% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/General/Templates/modalLogin.html.twig') with {'redirectLogin': path('aviatur_customer_edit_info')} %}
  139.         {% endblock modal %}
  140.     {% endif %}
  141. {% endblock base_content %}
  142. {% block javascripts_bottom %}
  143.     {{ parent() }}
  144.     <script>
  145.         let miBoton = document.getElementById("miBoton");
  146.         let help = document.getElementById("needHelp");
  147.         let iconCall = document.getElementById("iconCall");
  148.         let openCall = document.getElementById("openCall");
  149.         let callDarkOpen = document.getElementById("callDarkOpen");
  150.         let callMenu = document.getElementById("callMenu");
  151.         let loLlamamos = document.getElementById("loLlamamos");
  152.         let loLlamamos_soporte_linea = document.getElementById("loLlamamos_soporte_linea");
  153.         let loLlamamos_palm = document.getElementById("loLlamamos_palm");
  154.         let loLlamamos_palm_soporte_linea = document.getElementById("loLlamamos_palm_soporte_linea");
  155.         let wsp = document.getElementById("wsp");
  156.         let comuniquese = document.getElementById("comuniquese");
  157.         let comuniquese_palm = document.getElementById("comuniquese_palm");
  158.         let showLoLlamamos = document.getElementById("showLoLlamamos");
  159.         let divFormLoLlamamos = document.getElementById("divFormLoLlamamos");
  160.         let formLoLlamamos = document.getElementById("formLoLlamamos");
  161.         let resultLoLlamamos = document.getElementById("resultLoLlamamos");
  162.         let closeModal = document.getElementById("closeModal");
  163.         let okCloseModal = document.getElementById("okCloseModal");
  164.         let showComuniquese = document.getElementById("showComuniquese");
  165.         let closeModalComuniquese = document.getElementById("closeModalComuniquese");
  166.         let screenWidth = window.innerWidth;
  167.         //boton principal ayuda
  168.         let activeCall = false;
  169.         miBoton.addEventListener("click", () => {
  170.             activeCall = !activeCall;
  171.             if (activeCall) {
  172.                 miBoton.classList.add("call-btn--close_active");
  173.                 help.style.display = "none";
  174.                 iconCall.setAttribute("width", "38")
  175.                 iconCall.setAttribute("height", "30")
  176.                 iconCall.style.viewBox = "0 -2 20 23"
  177.                 openCall.classList.add("call_bg--open")
  178.                 callDarkOpen.classList.add("call_bg-dark__open")
  179.                 callMenu.classList.add("call-menu--active")
  180.             } else {
  181.                 miBoton.classList.remove("call-btn--close_active");
  182.                 help.style.display = "block";
  183.                 iconCall.setAttribute("width", "22")
  184.                 iconCall.setAttribute("height", "20")
  185.                 openCall.classList.remove("call_bg--open")
  186.                 callDarkOpen.classList.remove("call_bg-dark__open")
  187.                 callMenu.classList.remove("call-menu--active")
  188.             }
  189.         });
  190.         wsp.addEventListener("click", () => {
  191.             if (screenWidth < 723) {
  192.                 wsp.setAttribute("href", "https://api.whatsapp.com/send?phone=5713821616&text=")
  193.             } else {
  194.                 wsp.setAttribute("href", "https://web.whatsapp.com/send?phone=5713821616&amp;text=")
  195.             }
  196.         })
  197.         // modal lo llamamos
  198.         let modalLoLlamamos = false
  199.         let openModalLollamamos = () =>{
  200.             modalLoLlamamos = !modalLoLlamamos;
  201.                 if (modalLoLlamamos) {
  202.                     showLoLlamamos.style.display = "flex";
  203.                 } else {
  204.                     showLoLlamamos.style.display = "none";
  205.                 }
  206.         }
  207.         formLoLlamamos.addEventListener('submit', function(event) {
  208.             event.preventDefault();
  209.             modalLoLlamamos = false;
  210.             if (formLoLlamamos.checkValidity()) {
  211.                 const nombre = formLoLlamamos.elements['Nombre'].value;
  212.                 const numeroCelular = formLoLlamamos.elements['NumeroCelular'].value;
  213.                 resultLoLlamamos.style.display = "block";
  214.                 divFormLoLlamamos.style.display = "none";
  215.                 jQuery.post("/formularios/llamar", ({
  216.                     "name": nombre,
  217.                     "phone": numeroCelular
  218.                 }), function(res){
  219.                     // alert(res);
  220.                 }).fail(function(xhr, status, error) {
  221.                     console.log('Error en la petición POST');
  222.                     console.error('Error en la petición POST:', error);
  223.                 });
  224.             } else {
  225.                 formLoLlamamos.reportValidity();
  226.             }
  227.         });
  228.         // Validador del tipo de texto que se permite en el input
  229.         const validationInputType = (e, type = "text") => {
  230.             if (type === "text") {
  231.                 if (!(e.which > 64 && e.which < 91) && e.which != 8 && e.which != 20 && e.which !== 32 && e.which !== 9) {
  232.                     e.preventDefault();
  233.                 }
  234.             }
  235.             if (type === "phone") {
  236.                 if (!(e.key > -1 && e.key < 10) && e.which != 8 && !(e.which > 95 && e.which < 106) && e.which !== 9) {
  237.                     e.preventDefault();
  238.                 }
  239.             }
  240.         }
  241.         closeModal.addEventListener("click", () => {
  242.             modalLoLlamamos = false
  243.             if (!modalLoLlamamos) {
  244.                 showLoLlamamos.style.display = "none";
  245.             }
  246.         })
  247.         okCloseModal.addEventListener("click", () => {
  248.             resultLoLlamamos.style.display = "none";
  249.             divFormLoLlamamos.style.display = "block"
  250.             formLoLlamamos.elements['Nombre'].value = '';
  251.             formLoLlamamos.elements['NumeroCelular'].value = '';
  252.             modalLoLlamamos = false
  253.             if (!modalLoLlamamos) {
  254.                 showLoLlamamos.style.display = "none";
  255.             }
  256.         })
  257.         // modal comuniquese
  258.         let modalComuniquese = false
  259.         const openModalComuniquese = () => {
  260.             modalComuniquese = !modalComuniquese;
  261.                 if (modalComuniquese) {
  262.                     showComuniquese.style.display = "flex";
  263.                 } else {
  264.                     showComuniquese.style.display = "none";
  265.                 }
  266.         }
  267.         closeModalComuniquese.addEventListener("click", () => {
  268.             modalComuniquese = false
  269.             if (!modalComuniquese) {
  270.                 showComuniquese.style.display = "none";
  271.             }
  272.         })
  273.         // desktop lo llamamos
  274.         loLlamamos.addEventListener("click", openModalLollamamos)
  275.         loLlamamos_soporte_linea.addEventListener("click", openModalLollamamos)
  276.         // desktop comuniquese
  277.         comuniquese.addEventListener("click", openModalComuniquese)
  278.         if (screenWidth < 1024) {
  279.             // mobile lo llamamos
  280.             comuniquese_palm.addEventListener("click", openModalComuniquese)
  281.             // mobile comuniquese
  282.             loLlamamos_palm.addEventListener("click", openModalLollamamos)
  283.             loLlamamos_palm_soporte_linea.addEventListener("click", openModalLollamamos)
  284.         }
  285.     </script>
  286. {% endblock javascripts_bottom %}