src/Aviatur/TwigBundle/Resources/views/aviatur/Flux/Hotel/Hotel/view_content.html.twig line 1

Open in your IDE?
  1. {% extends twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/App/front.html.twig') %}
  2. {% if app.session.has('operatorId') != 1 %}
  3.     {% set urlArticle = app.request.uri %}
  4.     {% set text =  articulo %}
  5.     {% set separator1 = "background-image: url('" %}
  6.     {% set separator2 = "');" %}
  7.     {% set imageArticle= ""~render(controller('Aviatur\\ContentBundle\\Controller\\ContentController::extractUrlAction', { 'separator1':separator1 ,'separator2':separator2,'text':text,'type':'content' }))%}
  8.     {% set dataImage= json_decode(imageArticle, true)%}
  9.     {% set contentInfo = json_decode(articulo.description, true) %}
  10.     {% if contentInfo['origin1'] is defined %}
  11.         {% set originArticle = contentInfo['origin1'] %}
  12.         {% set nameCity =  render(controller('Aviatur\\BlogBundle\\Controller\\DefaultController::nameCityBlogAction', {'iata':originArticle}))%}
  13.     {% endif %}
  14.     {% set city = articulo.url %}
  15.     {% set city = city|replace({'-': ' '}) %}
  16. {% endif %}
  17. {% block head_title %}Hoteles en {{nameCity|title|slice(0, 13)}} | Buscador de hoteles baratos en Aviatur.com{% endblock head_title %}
  18. {% block head_meta_title %}Hoteles en {{nameCity|title|slice(0, 13)}} | Buscador de hoteles baratos en Aviatur.com{% endblock head_meta_title %}
  19. {% block head_description_content %}
  20.     {% if app.session.has('operatorId') != 1 %}
  21.         {% if nameCity is defined %}
  22.             {% if originArticle=="A28" %}
  23.                 Hoteles y alojamientos en Melgar. Con Aviatur reserve el hotel que se acomode a su necesidad y disfrute con amigos o en familia de la piscina bajo el sol.
  24.             {% elseif originArticle=="A01"%}
  25.                 Hoteles con noches disponibles en Barú. Con Aviatur reserve el hotel que se acomode a su necesidad y disfrute del Caribe y de un cóctel en la playa.
  26.             {% elseif originArticle=="VDL"%}
  27.                 Con Aviatur reserve hoteles y alojamientos en Villa de Leyva y disfrute de los lugares turísticos y paradisíacos de este destino, el más visitado de Boyacá.
  28.             {% elseif cookieLastSearch.description is defined and cookieLastSearch.description!='No disponible'%}
  29.                {{cookieLastSearch.description}} {{ cookieLastSearch.description > 1 ? 'Hoteles':'Hotel' }} con noches disponibles en {{nameCity|title}}. Con Aviatur reserve el hotel que se acomode a su necesidad: cerca del aeropuerto, del centro
  30.             {% else %}
  31.                 Hoteles y alojamientos en {{nameCity|title}}. Con Aviatur reserve el hotel que se acomode a su necesidad: cerca del aeropuerto, del centro
  32.             {% endif %}
  33.         {% else %}
  34.             {% if cookieLastSearch.description is defined and cookieLastSearch.description!='No disponible'%}
  35.                 {{ cookieLastSearch.description }} {{ cookieLastSearch.description > 1 ? 'Hoteles':'Hotel' }} con noches disponibles en {{city|title}}. Con Aviatur reserve el hotel que se acomode a su necesidad: cerca del aeropuerto, del centro
  36.             {% else %}
  37.                 Hoteles y alojamientos en {{city|title}}. Con Aviatur reserve el hotel que se acomode a su necesidad: cerca del aeropuerto, del centro
  38.             {% endif %}
  39.         {% endif %}
  40.     {% endif %}
  41. {% endblock head_description_content %}
  42. {% block head_meta_label %}
  43.     {% if app.session.has('operatorId') != 1 %}
  44.         <meta property="og:type" content="article" />
  45.         <meta property="og:title" content="Hoteles en {{nameCity|title|slice(0, 13)}} | Buscador de hoteles baratos en Aviatur.com" />
  46.         <meta property="og:url" content="{{urlArticle}}" />
  47.         <meta property="og:description" content="{% if cookieLastSearch.description is defined and cookieLastSearch.description!='No disponible'%} {{ cookieLastSearch.description }} Hoteles con noches disponibles en {{nameCity|title}}. Con Aviatur reserve el hotel que se acomode a su necesidad: cerca del aeropuerto, del centro{% else %} Hoteles y alojamientos en {{nameCity|title}}. Con Aviatur reserve el hotel que se acomode a su necesidad: cerca del aeropuerto, del centro{% endif %}"/>
  48.         <meta property="og:image" content="{{dataImage["img"]}}"/>
  49.         <meta property="og:image:width" content="900" />
  50.         <meta property="og:image:height" content="450" />
  51.         <meta property="og:site_name" content="Aviatur.com" />
  52.         <meta property="fb:admins" content="266311843398184" />
  53.         <meta property="og:locale" content="es_CO" />
  54.         <meta property="og:locale:alternate" content="es_CO" />
  55.         <meta name="twitter:card" content="summary_large_image" />
  56.         <meta name="twitter:site" content="@Aviatur" />
  57.         <meta name="twitter:creator" content="@Aviatur" />
  58.         <meta name="twitter:title" content="Hoteles en {{nameCity|title|slice(0, 13)}} | Buscador de hoteles baratos en Aviatur.com" />
  59.         <meta name="twitter:description" content="{% if cookieLastSearch.description is defined and cookieLastSearch.description!='No disponible'%} {{ cookieLastSearch.description }} Hoteles con noches disponibles en {{nameCity|title}}. Con Aviatur reserve el hotel que se acomode a su necesidad: cerca del aeropuerto, del centro{% else %} Hoteles y alojamientos en {{nameCity|title}}. Con Aviatur reserve el hotel que se acomode a su necesidad: cerca del aeropuerto, del centro{% endif %}" />
  60.         <meta name="twitter:url" content="{{urlArticle}}" />
  61.         <meta name = "twitter: image" content = "{{dataImage["img"]}}" />
  62.         {% if '?itm' in app.request.uri %}
  63.             {% set urlCanonical = app.request.uri|split('?itm') %}
  64.             <link rel="canonical" href="{{urlCanonical[0]}}" />
  65.         {% endif %}
  66.         {% if '?utm' in app.request.uri %}
  67.             {% set urlCanonical = app.request.uri|split('?utm') %}
  68.             <link rel="canonical" href="{{urlCanonical[0]}}" />
  69.         {% endif %}
  70.     {% endif %}
  71. {% endblock head_meta_label %}
  72. {% block searcher_header %}
  73.     <div class="page__body--search js-page-body-toggle {% if app.session.has('operatorId') == 1 %}page__body--front{% endif %} {% if 'aviatur_general_homepage' in app.request.get('_route') %}hidden-palm{% endif %}">
  74.         {% block search_content %}
  75.             <div class="wrapper search__light" style="padding-top:25px !important; padding-bottom:30px !important;">
  76.                 <div class="search__light--box frame">
  77.                     {% if app.session.has('notEnableFlightSearch') == 0 %}
  78.                         {% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/Search/Hotel/hotelSearch_engine.html.twig') %}
  79.                     {% endif %}
  80.                 </div>
  81.             </div>
  82.         {% endblock %}
  83.     </div>
  84. {% endblock searcher_header %}
  85. {% block javascripts %}
  86.     {% javascripts
  87.         '@AviaturGeneralBundle/Resources/public/js/component_socialNetwork.js'
  88.         '@AviaturContentBundle/Resources/public/js/content-promo.js'
  89.     %}
  90.     <script type="text/javascript" src="/{{ asset_url }}"></script>
  91.     {% endjavascripts %}
  92.     <script type="text/javascript">
  93.         if (document.getElementsByClassName('frame-single')[0]) {
  94.             var share = document.getElementsByClassName('frame-single')[0];
  95.             share.style.paddingLeft = "0px";
  96.         }
  97.         if (document.getElementById("promos-hoteles")) {//para también te puede interesar, rutas, y otros links
  98.             var promosHotel = document.getElementById('promos-hoteles').innerHTML;
  99.             jQuery("#promos-hoteles").remove();
  100.             document.getElementById("promos_hoteles").innerHTML = promosHotel;
  101.         }
  102.         jQuery(document).ready(function () {
  103.             jQuery(".lazy").lazyload({
  104.                 effect: "fadeIn",
  105.                 threshold: 300
  106.             });
  107.         });
  108.     </script>
  109.     {% if app.user != "" and (is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_EDIT_' ~ app.session.get('agencyId')) or is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_CREATE_' ~ app.session.get('agencyId')) or is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_DELETE_' ~ app.session.get('agencyId')) or is_granted('ROLE_SUPER_ADMIN') and promoType is defined) %}
  110.         <script type="text/javascript">
  111.             jQuery(document).ready(function () {
  112.                 jQuery('.js-ajax-homePromo').on('click', function () {
  113.                     jQuery('.modal-title').html('Edit Promo');
  114.                     jQuery('#js-form-homePromo').empty();
  115.                     _loadSpinner("js-form-homePromo");
  116.                     var url = "{{ path('aviatur_edit_homepromo', {promoType: 'hoteles-destino', id: 'xx', size: 'yy'}) }}";
  117.                     var id = jQuery(this).data("id");
  118.                     var size = jQuery(this).data("size");
  119.                     var url = url.replace(/\xx/g, id);
  120.                     var url = url.replace(/\yy/g, size);
  121.                     jQuery.get(url, function (data) {
  122.                         jQuery('#js-form-homePromo').html(data);
  123.                         _removeSpinner("js-form-homePromo");
  124.                     });
  125.                 });
  126.             });
  127.         </script>
  128.     {% endif %}
  129. {% endblock %}
  130. {% block body %}<br>
  131.     {% set contentInfo = json_decode(articulo.description, true) %}
  132.     {% if contentInfo['breadcumb'] is defined %}
  133.         {% set breadcumb = contentInfo['breadcumb'] %}
  134.     {% endif %}
  135.     {% if contentInfo['type2'] is defined %}
  136.         {% set articleType = contentInfo['type2'] %}
  137.     {% endif %}
  138.     <div class="wrapper">
  139.         <div class="dispo-shared__sidebar_content_socialNetwork hide-portable" style="width: 4%;">
  140.             {% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/General/Components/component_socialNetwork.html.twig') %}
  141.         </div>
  142.         {% if breadcumb is defined and breadcumb!=""%}
  143.             <ol itemscope="" itemtype="http://schema.org/BreadcrumbList" class="breadcumb">
  144.                 <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
  145.                     <a itemprop="item" href="https://www.aviatur.com">
  146.                         <span itemprop="name">Aviatur.com</span></a>
  147.                     <i class="icon icon_chevron_right"></i>
  148.                     <meta itemprop="position" content="1">
  149.                 </li>
  150.                 <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
  151.                     <a itemprop="item" href="https://www.aviatur.com/buscar/hoteles">
  152.                         <span itemprop="name">Hoteles</span></a>
  153.                     <i class="icon icon_chevron_right"></i>
  154.                     <meta itemprop="position" content="2">
  155.                 </li>
  156.                 <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
  157.                     <a itemprop="item" href="https://www.aviatur.com/hoteles/hoteles-baratos-en">
  158.                         <span itemprop="name">Hoteles Baratos</span></a>
  159.                     <i class="icon icon_chevron_right"></i>
  160.                     <meta itemprop="position" content="3">
  161.                 </li>
  162.                 <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
  163.                     <a itemprop="item" href="https://www.aviatur.com/hoteles/hoteles-baratos-en/{{articleType}}">
  164.                         <span itemprop="name">{{articleType|replace({'america': 'américa', 'oceania': 'oceanía','africa': 'áfrica'})|capitalize}}</span></a>
  165.                     <i class="icon icon_chevron_right"></i>
  166.                     <meta itemprop="position" content="4">
  167.                 </li>
  168.                 <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
  169.                     <a itemprop="item" href="https://www.aviatur.com/hoteles/hoteles-baratos-en-{{articulo.url}}">
  170.                         <span itemprop="name">{{breadcumb}}</span></a>
  171.                     <meta itemprop="position" content="5">
  172.                 </li>
  173.             </ol>
  174.         {% endif %}
  175.         <div id="promos-hoteles">
  176.             <section id="home-promos" class="wrapper flex-center">
  177.                 {% if app.user != "" and ( is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_CREATE_' ~ app.session.get('agencyId')) or is_granted('ROLE_SUPER_ADMIN') ) %}
  178.                     <a href="#" class="js-ajax-homePromo" data-id="0" data-size="picture" style="margin-bottom: 5px; display: block; font-size: 16px; font-weight: bold;" data-toggle="modal" data-target="#js-promo-editModal">CREAR UNA NUEVA PROMO</a>
  179.                 {% endif %}
  180.                 {% for hotelPromo in hotelPromos %}
  181.                     {% if hotelPromo.size == "picture" and  hotelPromo.linkSwitch== articulo.url%}
  182.                         {% if hotelPromo.mobile == true or not is_mobile() or is_tablet()%}
  183.                                 {% set imageGuessedName = (hotelPromo.link|split('?')|first)|split('/')|last ~ "_" ~ hotelPromo.id ~ ".jpeg" %}
  184.                                 {% set pathToImage = "assets/" ~ agency_folder.assetStyle() ~ "/img/promo/box/"%}
  185.                                 {% if file_exists(pathToImage ~ imageGuessedName)%}
  186.                                     {% set imageLink = pathToImage ~ imageGuessedName %}
  187.                                 {% else %}
  188.                                     {% set imageLink = pathToImage ~ hotelPromo.id ~ ".jpeg" %}
  189.                                 {% endif %}
  190.                                 <div id="promo{{ loop.index }}" class="promo_box">
  191.                                 {% if app.user != "" and ( is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_EDIT_' ~ app.session.get('agencyId')) or is_granted('ROLE_SUPER_ADMIN') ) %}
  192.                                     <a href="#" class="js-ajax-homePromo" data-id="{{ hotelPromo.id }}" data-size="picture" style="margin-bottom: 2px"  data-toggle="modal" data-target="#js-promo-editModal">EDITAR</a> -
  193.                                 {% endif %}
  194.                                 {% if app.user != "" and ( is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_DELETE_' ~ app.session.get('agencyId')) or is_granted('ROLE_SUPER_ADMIN') ) %}
  195.                                     <a href="{{ path('aviatur_edit_homepromo_delete', {id: hotelPromo.id, promoType: promoType}) }}">BORRAR</a>
  196.                                 {% endif %}
  197.                                 {% if hotelPromo.link|length > 0 or hotelPromo.link != null %}
  198.                                 <a href="{{ hotelPromo.link }}" target="_blank">
  199.                                 {% endif %}
  200.                                     <div class="relative">
  201.                                         <img src="/version/{{ hotelPromo.date| date('U') }}/{{imageLink}}" alt="{{hotelPromo.title}}">
  202.                                         {% if hotelPromo.content != null %}
  203.                                             <div class="promo_box-conditions">
  204.                                                 <span>{{ hotelPromo.content }}</span>
  205.                                             </div>
  206.                                         {% endif %}
  207.                                     </div>
  208.                                     <div class="promo-content">
  209.                                         {% if hotelPromo.title != null %}
  210.                                             <h3 class="promo_box-title">
  211.                                                 {%if '/' in hotelPromo.title%}
  212.                                                     {% set promoTitle= hotelPromo.title|split('/')%}
  213.                                                     {{promoTitle[0]}}<br>{{promoTitle[1]}}
  214.                                                 {% else %}
  215.                                                     {{ hotelPromo.title }}
  216.                                                 {% endif %}
  217.                                             </h3>
  218.                                         {% endif %}
  219.                                         {% if hotelPromo.titleSwitch != null and hotelPromo.price != null %}
  220.                                             <p class="promo_box-subtitle text-left">{{ hotelPromo.price }}<br>{{ hotelPromo.titleSwitch }}</p>
  221.                                             {% elseif hotelPromo.titleSwitch != null and hotelPromo.price == null%}
  222.                                             <p class="promo_box-subtitle text-left">{{ hotelPromo.titleSwitch }}</p>
  223.                                         {% else %}
  224.                                             <p class="promo_box-subtitle text-left">{{ hotelPromo.price }}</p>
  225.                                         {% endif %}
  226.                                     </div>
  227.                                      {% if hotelPromo.link|length > 0 or hotelPromo.link != null %}
  228.                                 </a>
  229.                             {% endif %}
  230.                                 </div>
  231.                         {% endif %}
  232.                     {% endif %}
  233.                 {% endfor %}
  234.             </section>
  235.         </div>
  236.         {{ articulo.text|raw }}
  237.     </div>
  238.     <div id="js-scrollTopBtn" class="btn--scroll-top pointer" role="button">▲</div>
  239.     {% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/Search/General/search_datepickerContainer.html.twig') %}
  240.     {% if app.user != "" and (is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_EDIT_'~app.session.get('agencyId')) or is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_CREATE_'~app.session.get('agencyId')) or is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_DELETE_'~app.session.get('agencyId')) or is_granted('ROLE_SUPER_ADMIN') ) %}
  241.         {% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/Search/General/mainSearch_editModal.html.twig') %}
  242.     {% endif %}
  243. {% endblock %}
  244. {% block javascripts_bottom %}
  245.     {{ parent() }}
  246.     {% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/Search/General/search_js.html.twig') %}
  247.     <script type="text/javascript" src="{{ asset('assets/common_assets/js/vendor/owl.carousel.min.js') }}"></script>
  248. {% endblock javascripts_bottom %}