src/Aviatur/TwigBundle/Resources/views/aval/Flux/Experience/Default/availability.html.twig line 1

Open in your IDE?
  1. {% extends twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/App/front.html.twig') %}
  2. {% block javascripts %}
  3.     {{ parent() }}
  4.      
  5.     {# JS ASSETS FROM WEB FOLDER #}
  6.     <script type="text/javascript">
  7.         jQuery(document).ajaxComplete(function () {
  8.             jQuery("div.lazy").lazyload({
  9.                 effect: "fadeIn",
  10.                 threshold: 800
  11.             });
  12.         });  
  13.     </script> 
  14.     {# JS ASSETS COMPILED FROM BUNDLES #}
  15.     {% javascripts
  16.             '@AviaturExperienceBundle/Resources/public/js/experience_availability.js'
  17.             '@AviaturGeneralBundle/Resources/public/js/component_socialNetwork.js'
  18.     %}
  19.     <script src="{{ asset_url }}" type="text/javascript"></script>
  20.     {% endjavascripts %}
  21.     {# JS USING TWIG VARIABLES #}
  22.     <script type="text/javascript">
  23.         var ajaxUrlAvail = '{{ ajaxUrl | raw }}';
  24.         var ajaxUrlDetail = '{{ path('aviatur_experience_ajax_detail', {id: 0} )}}';
  25.         var detailUrl = '{{ safeUrl }}';
  26.         var ProviderId = '{{ availabilityArray.ProviderId }}';
  27.         var Destination = '{{ availabilityArray.destination }}';
  28.         {% if availabilityArray.date1 is defined %}
  29.             var Date1 = '{{ availabilityArray.date1 }}';
  30.         {% else %}
  31.             var Date1 = '';
  32.         {% endif %}
  33.         {% if availabilityArray.date2 is defined %}
  34.             var Date2 = '{{ availabilityArray.date2 }}';
  35.         {% else %}
  36.             var Date2 = '';
  37.         {% endif %}
  38.     </script>
  39.     {# JS ASSETS COMPILED FROM BUNDLES #}
  40.     <script src="{{ script('common-avail.js') }}"></script>
  41.     <script src="{{ script('ExperienceBundle//experience_availability.js') }}"></script>
  42. {% endblock %}
  43. {% if inlineEngine is defined %}
  44.     {# if NOT desktop hompage, var from controller #}
  45.     {% set dispoEngine = true %}
  46. {% else %}
  47.     {% set dispoEngine = false %}
  48. {% endif %}
  49. {% block body %}
  50.     <div class="wrapper">
  51.         {% if cookieLastSearch.destination is defined and cookieLastSearch.destination != '' %}
  52.             {% set destiny = cookieLastSearch.destination %}
  53.             {% set label = 'Destino' %}
  54.         {% else %}
  55.             {% set destiny = cookieLastSearch.searchInfoExperience %}
  56.             {% set label = 'Palabra Clave' %}
  57.         {% endif %}
  58.         {% if app.request.attributes.get('_route') == 'aviatur_experience_round' %}
  59.             {% set roundtrip = true %}
  60.             {% set search_entities =
  61.                 [{'blocks': [
  62.                     {'title':destiny, 'label':label, 'tooltip':label},
  63.                 ]},
  64.                 {'blocks': [
  65.                     {'title':cookieLastSearch.date1|localizeddate('medium','none',null,null,'d MMM'), 'label':cookieLastSearch.date1|localizeddate('medium','none',null,null,'eeee'), 'tooltip':'Fecha de ida','traveltype':"d", 'travelNumber':"1"},
  66.                     {'title':cookieLastSearch.date2|localizeddate('medium','none',null,null,'d MMM'), 'label':cookieLastSearch.date2|localizeddate('medium','none',null,null,'eeee'), 'tooltip':'Fecha de vuelta','traveltype':"d", 'travelNumber':"1"}
  67.                 ]}]
  68.             %}
  69.         {% elseif app.request.attributes.get('_route') == 'aviatur_experience_oneway' %}
  70.             {% set roundtrip = false %}
  71.             {% set search_entities =
  72.                 [{'blocks': [
  73.                     {'title':destiny, 'label':label, 'tooltip':label,'traveltype':"d", 'travelNumber':"1"},
  74.                 ]},
  75.                 {'blocks': [
  76.                     {'title':cookieLastSearch.date1|localizeddate('medium','none',null,null,'d MMM'), 'label':cookieLastSearch.date1|localizeddate('medium','none',null,null,'eeee'), 'tooltip':'Fecha de ida','traveltype':"d", 'travelNumber':"1"}
  77.                 ]}]
  78.             %}
  79.         {% else %}
  80.             {% set roundtrip = false %}
  81.             {% set search_entities =
  82.                 [{'blocks': [
  83.                     {'title':destiny, 'label':label, 'tooltip':label,'traveltype':"d", 'travelNumber':"1"},
  84.                 ]}]
  85.             %}
  86.         {% endif %}
  87.         {% embed twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/General/Components/component_resumeSearch.html.twig') with {'entities': search_entities, 'roundtrip': roundtrip, 'multi': false} %}
  88.             {% block resume_id %}resumeSearchExperience{% endblock %}
  89.             {% block resume_custom_class %}resume-search--experience{% endblock %}
  90.             {% block resume_content %}
  91.                 {{ parent() }}
  92.                 <div class="resume-search__engine js-newSearchEngine hidden-all">
  93.                     <span class="resume-search__engine__close js-closeSearchEngine material-symbols-outlined">close</span>
  94.                     {# <span class="resume-search__engine__close js-closeSearchEngine">
  95.                         <i class="icon icon_search_close"></i>
  96.                     </span> #}
  97.                     {% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/Search/Experience/experienceSearch_engine.html.twig') %}
  98.                 </div>
  99.             {% endblock %}
  100.         {% endembed %}
  101.         <div class="wrapper-susy">
  102.             {#            <div class="dispo-shared__sidebar hide-portable">
  103.                             {% include twig_exists('@AviaturTwig/:'~ agency_folder.twigFlux() ~'/General/Components/component_socialNetwork.html.twig') %}
  104.                             {% include twig_exists('@AviaturTwig/:'~ agency_folder.twigFlux() ~'/Search/General/search_js.html.twig') %}
  105.                         </div>#}
  106.             <div class="relative dispo-shared__content-full-width">
  107.                 {% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/General/Components/component_loadingWorld.html.twig') %}
  108.                 {#{% if pointRedemption is defined and pointRedemption != null %}
  109.                     <div id="js-pointRedemption-lapandup" class="hidden-palm clearfix text-center ">
  110.                         <div id="js-pointRedemption-slider" class="inline-block" style="padding:0 9px;">
  111.                             <div id="js-pointRedemption" class="inline-block frame--tainted sp-stack">
  112.                                 <div class="clearfix">
  113.                                     <h3>{{ pointRedemption.Display.Title }}</h3>
  114.                                     <div class="wrapper-susy">
  115.                                         <div class="col-12">
  116.                                             <p>
  117.                                                 <span>Redimir</span><input type="text" id="js-points" class="text-input--inline js-pointRedemptionLoader" readonly><span>puntos</span>
  118.                                             </p>
  119.                                         </div>
  120.                                         <div class="col-12">
  121.                                             <div id="js-slider-points" data-config="{{ pointRedemption.Config|json_encode() }}"></div>
  122.                                         </div>
  123.                                         <div class="col-12">
  124.                                             <p class="condensed sp-offset--small">
  125.                                                 <small class="type-grey">* Puntos minimos para redimir: {{ pointRedemption.Config.Amount.MinStep }}</small>
  126.                                             </p>
  127.                                         </div>
  128.                                     </div>
  129.                                 </div>
  130.                             </div>
  131.                         </div>
  132.                     </div>
  133.                     {% javascripts
  134.                             '@AviaturGeneralBundle/Resources/public/js/component_inputSlider.js'
  135.                             '@AviaturGeneralBundle/Resources/public/js/widget_pointRedemption.js'
  136.                     %}
  137.                     <script src="{{ asset_url }}" type="text/javascript" defer></script>
  138.                     {% endjavascripts %}
  139.                     {#                    {% endblock %}#}
  140.                 {#                {% endembed %}
  141.             {% endif %}
  142.             <script type="text/javascript">
  143.         jQuery('#js-pointRedemption-lapandup, #js-pointRedemption-mobile, .js-pointdesk').hide();
  144.         jQuery('.js-toggleSideSliderTarget, #js-leftRedemptionPoint-widget, .left-slider__banner').hide()
  145.             </script>#}
  146.                 {% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/General/Components/component_loadingWorld.html.twig') %}
  147.                 <div id="experience-results">
  148.                     <p></p>
  149.                 </div>
  150.             </div>
  151.         </div>
  152.     </div>
  153.     <div id="js-scrollTopBtn" class="btn--scroll-top pointer" role="button">▲</div>
  154.     {% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/Search/General/search_datepickerContainer.html.twig') %}
  155. {% endblock %}
  156. {% block javascripts_bottom %}
  157.     {{ parent() }}
  158.     {% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/Search/General/search_js.html.twig') %}
  159. {% endblock javascripts_bottom %}