{% extends twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/App/front.html.twig') %}
{% if app.session.has('operatorId') != 1 %}
{% set host = app.request.getSchemeAndHttpHost()%}
{% endif %}
{% block javascripts %}
{% if app.user != "" and (is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_CREATE_'~agencyId) or is_granted('ROLE_SUPER_ADMIN')) %}
<script src="{{app.request.getSchemeAndHttpHost() ~ '/js/tinymce/tinymce.min.js'}}"></script>
{% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/Content/Content/content_js.html.twig') %}
{% endif %}
{% endblock %}
{% block head_title %}
{% if typeArticle is defined %}
{% if typeArticle == 'general'%}
Contenidos e información General | Contenido - {{ page }}
{% elseif typeArticle == 'revista-horizontes'%}
Contenidos e información Revista Horizontes | Contenido - {{ page }}
{% elseif typeArticle == 'informacion-aviatur'%}
Contenidos e información de Aviatur | Contenido - {{ page }}
{% endif %}
{% endif %}
{% endblock head_title %}
{% block head_meta_title %}
{% if typeArticle is defined %}
{% if typeArticle== 'general'%}
Contenidos e información General | Contenido - {{ page }}
{% elseif typeArticle== 'revista-horizontes'%}
Contenidos e información Revista Horizontes | Contenido - {{ page }}
{% elseif typeArticle=='informacion-aviatur'%}
Contenidos e información de Aviatur | Contenido - {{ page }}
{% endif %}
{% endif %}
{% endblock head_meta_title %}
{% block head_description_content %}
{% if typeArticle is defined %}
{% if typeArticle == 'general'%}
Encuentra información y datos interesantes de destinos nacionales e internacionales, ferias, festivales, fechas especiales y mucho más | Aviatur - {{ page }}
{% elseif typeArticle == 'revista-horizontes'%}
Guía de viajes para conocer detalles de destinos, novedades del sector turístico, recomendaciones para el viajero y noticias | Aviatur - {{ page }}
{% elseif typeArticle == 'informacion-aviatur'%}
Encuentra información acerca de nuestros servicios, promociones, alianzas, medios de pago, términos y condiciones, políticas, entre otros | Aviatur - {{ page }}
{% endif %}
{% endif %}
{% endblock head_description_content %}
{% block head_meta_label %}
{% if app.session.has('operatorId') != 1 and typeArticle is defined %}
<link rel="canonical" href="{{host}} ~ /contenidos/ ~ {{typeArticle}}" />
{% endif %}
{% if typeArticle is defined and typeArticle == 'revista-horizontes' %}
<meta name="robots" content="index, follow">
{% endif %}
{% endblock head_meta_label %}
{% block body %}
<div class="wrapper" id="content-info">
{% if typeArticle is defined and typeArticle != 'general'%}
<ol itemscope="" itemtype="http://schema.org/BreadcrumbList" class="breadcumb">
<li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
<a itemprop="item" href="https://www.aviatur.com" style="display: inline-block;">
<span itemprop="name">Aviatur.com</span></a>
<i class="icon icon_chevron_right" style="display: inline-block;"></i>
<meta itemprop="position" content="1">
</li>
<li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
<a itemprop="item" href="https://www.aviatur.com/contenidos">
<span itemprop="name">Contenidos</span></a>
<i class="icon icon_chevron_right"></i>
<meta itemprop="position" content="2">
</li>
{% if typeArticle=='revista-horizontes' %}
<li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
<a itemprop="item" href="https://www.aviatur.com/contenidos/{{typeArticle}}">
<span itemprop="name">Revista Horizontes</span></a>
<meta itemprop="position" content="3">
</li>
{% elseif typeArticle == 'informacion-aviatur'%}
<li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
<a itemprop="item" href="https://www.aviatur.com/contenidos/{{typeArticle}}">
<span itemprop="name">Información Aviatur</span></a>
<meta itemprop="position" content="3">
</li>
{% endif %}
</ol>
{% endif %}
{% if typeArticle is defined %}
<h1 class="text-center type-main text-content">{% if typeArticle=='general'%}Contenidos Generales{% elseif typeArticle=='revista-horizontes'%}Contenidos Revista Horizontes{% elseif typeArticle=='informacion-aviatur'%}Información Aviatur{% endif %}</h1>{% else %}<h1>Contenidos Aviatur</h1>
{% endif %}
<section class="btn-group">
{% if active == "activo" %}
<label for="PD_Search">Buscar:</label>
<input type="search" id="PD_searchValidate" value="" class="text ui-widget-content ui-corner-all">
{% endif %}
</section>
<section class="btn-group">
{% if app.user != "" and (is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_CREATE_'~agencyId) or is_granted('ROLE_SUPER_ADMIN') ) %}
<a href="{{ path('aviatur_content_new') }}" class="btn js-createContent" style="margin-right: 5px">Crear Artículo</a>
{% if active == "inactivo" %}
<a href="{{ path('aviatur_content_filtered', {'active':'activo', 'type':typeArticle}) }}" class="btn">
<i class="icon icon_magnifying-glass" style="font-size: 15px;"></i>
Ver Artículo Activos
</a>
{% elseif active == "activo" %}
<a href="{{ path('aviatur_content_filtered', {'active':'inactivo', 'type':typeArticle}) }}" class="btn">
<i class="icon icon_magnifying-glass" style="font-size: 15px;"></i>
Ver Artículo Inactivos
</a>
{% endif %}
{% endif %}
</section>
<div class="slidePanel-body is-withHeader">
<div id="js-spinner-detailAvailability" class="overlay overlay--inDiv" style="display: none;">
<div class="overlay-center">
<div id="js-spinOverlay-detailAvailability" class="spinOverlayLoading"></div>
<p class="spin-text js-globalOverlay-text">Cargando...</p>
</div>
</div>
<div id="js-body-detailAvailability">
</div>
</div>
<div id="listContents" class="wrapper-susy">
{% for articulos in articulo %}
{% set articleType = 'general' %} {# ensure default article type #}
{% set articleDescription = '' %}
{% set contentInfo = json_decode(articulos.description, true) %}
{% if contentInfo['type'] is defined %}
{% set articleType = contentInfo['type'] %}
{% endif %}
{% if contentInfo['description'] is defined %}
{% set articleDescription = contentInfo['description'] %}
{% endif %}
{% if contentInfo['categoria'] is defined %}
{% set categoryType = contentInfo['categoria'] %}
{% endif %}
{% if typeArticle is defined and typeArticle == articleType %}
{% if typeArticle=="general"%}
<div class="content-con">
{% if active == "inactivo" %}
{% set color = "frame--negative" %}
{% elseif active == "activo" %}
{% set color = "frame--hero" %}
{% endif %}
<section class="frame-group">
<div class="frame-content {{ color }} no-margin" align="center" style="height: 74px;">
<p>{{ articulos.title }}</p>
</div>
{% if app.user != ""%}
<div class="frame-content">
<section class="text-center">
<a href="{{ path('aviatur_blog_view', {'id':articulos.url, 'content':categoryType})}}">
<i class="icon icon_magnifying-glass"></i>
Visualizar
</a>
{% if app.user != "" and ( is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_EDIT_'~agencyId) or is_granted('ROLE_SUPER_ADMIN') )%}
|
<a class="js-content" data-id="{{ articulos.id }}" data-toggle="modal" data-target="#js-promo-editModal" >
<img src="{{ asset('assets/default_assets/img/content/editar.png') }}" title='Editar' width="15px"/>
Editar
</a>
{% endif %}
{% if app.user != "" and ( is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_DELETE_'~agencyId) or is_granted('ROLE_SUPER_ADMIN') ) %}
|
{% if active == "inactivo" %}
<a href="#" class="js-isActiContent content-menu-li-a" data-id="{{ articulos.id }}" data-toggle="modal" data-target="#js-promo-editModal" >
<img src="{{ asset('assets/default_assets/img/content/activar.png') }}" title='Activar' width="15px"/>
Activar
</a>
{% elseif active == "activo" %}
<a class="js-isActiContent" data-id="{{ articulos.id }}" data-toggle="modal" data-target="#js-promo-editModal" >
<img src="{{ asset('assets/default_assets/img/content/inactivar.png') }}" title='Inactivar' width="15px"/>
Desactivar
</a>
{% endif %}
{% endif %}
</section>
</div>
{% endif %}
{% if articulos.url=="ferias-y-fiestas-de-colombia"%}
{% set imageArticle = 'https://www.aviatur.com/source/contenidos/desfiles-del-carnaval.jpg' %}
<div class="frame-content" style="padding: 0px; height: 180px; background-color: white; border-top:0;">
<img style="height: 100%; width: 100%; object-fit: cover;" src="{{imageArticle}}" title="Fiestas y ferias de Colombia" alt="Fiestas y ferias de Colombia">
</div>
{% elseif articulos.url=="fiestas-y-eventos-del-mundo"%}
{% set imageArticle='http://www.aviatur.com/source/contenidos/festival-de-luces-yi-peng-tailandia.jpg'%}
<div class="frame-content" style="padding: 0px; height: 180px; background-color: white; border-top:0;">
<img style="height: 100%; width: 100%; object-fit: cover;" src="{{imageArticle}}" title="Fiestas y eventos del mundo" alt="Fiestas y eventos del mundo">
</div>
{% elseif articulos.url=="cambiar-de-ambiente-en-cholon"%}
{% set imageArticle='https://www.aviatur.com/source/casa-cholon/1.jpg'%}
<div class="frame-content" style="padding: 0px; height: 180px; background-color: white; border-top:0;">
<img style="height: 100%; width: 100%; object-fit: cover;" src="{{imageArticle}}" title="Casa Cholón, Barú" alt="Casa Cholón, Barú">
</div>
{% elseif articulos.url=="descubrir-destinos-segun-presupuesto-explorar-aviatur"%}
{% set imageArticle='http://www.aviatur.com/source/contenidos/blog/header/descubrir-destinos-segun-presupuesto-explorar-aviatur.jpg'%}
<div class="frame-content" style="padding: 0px; height: 180px; background-color: white; border-top:0;">
<img style="height: 100%; width: 100%; object-fit: cover;" src="{{imageArticle}}" title="Con nuestro presupuesto descubramos destinos" alt="Vuelos según presupuesto Aviatur">
</div>
{% elseif articulos.url=="mejores-tarifas-vuelos-alertas-precios-aviatur"%}
{% set imageArticle='http://www.aviatur.com/source/contenidos/blog/header/mejores-tarifas-vuelos-alertas-precios-aviatur.jpg'%}
<div class="frame-content" style="padding: 0px; height: 180px; background-color: white; border-top:0;">
<img style="height: 100%; width: 100%; object-fit: cover;" src="{{imageArticle}}" title="“Alerta” te ayuda a encontrar el mejor precio" alt="Alertas de mejores tarifas Aviatur">
</div>
{% elseif articulos.url=="comprar-tiquetes-baratos-combinando-aerolineas-aviatur"%}
{% set imageArticle='http://www.aviatur.com/source/contenidos/blog/header/comprar-tiquetes-baratos-combinando-aerolineas-aviatur.jpg'%}
<div class="frame-content" style="padding: 0px; height: 180px; background-color: white; border-top:0;">
<img style="height: 100%; width: 100%; object-fit: cover;" src="{{imageArticle}}" title="Cómo comprar tiquetes baratos combinando aerolíneas" alt="Vuelos con distintas aerolineas Aviatur">
</div>
{% elseif articulos.url=="mejores-fechas-para-viajar-prediccion-precios-aviatur"%}
{% set imageArticle='https://www.aviatur.com/source/contenidos/blog/header/mejores-fechas-para-viajar-prediccion-precios-aviatur.jpg'%}
<div class="frame-content" style="padding: 0px; height: 180px; background-color: white; border-top:0;">
<img style="height: 100%; width: 100%; object-fit: cover;" src="{{imageArticle}}" title="Nuestras mejores tarifas aéreas en el calendario" alt="Predicción de precios Aviatur">
</div>
{% else %}
{% set separator1 = 'src="'%}
{% set separator2 = '" ' %}
{% set imageArticle= render(controller('Aviatur\\ContentBundle\\Controller\\ContentController::extractUrlAction', { 'separator1':separator1 ,'separator2':separator2,'text':articulos, 'type':'content' }))%}
{% set dataImage= json_decode(imageArticle, true)%}
<div class="frame-content" style="padding: 0px; height: 180px; background-color: white; border-top:0;">
{% if "aviatur_logo" in imageArticle%}
<img style="width: 100%;" src="{{dataImage["img"]}}" title="{{dataImage["title"]}}" alt="{{dataImage["title"]}}">
{% else %}
<img style="height: 100%; width: 100%; object-fit: cover;" src="{{dataImage["img"]}}" title="{{dataImage["title"]}}" alt="{{dataImage["title"]}}">
{% endif %}
</div>
{% endif %}
<div class="frame-content">
<p class="box-content">{{ articleDescription|striptags|slice(0, 250) }} ...</p>
<p style="text-align: center; padding: 0px 18px 18px; margin-bottom: 0;">
<a href="{{ path('aviatur_blog_view', {'id':articulos.url, 'content':categoryType})}}">
<i class="icon icon_magnifying-glass"></i> Ver más
</a>
</p>
</div>
</section>
</div>
{% else %}
<div class="content-con">
{% if active == "inactivo" %}
{% set color = "frame--negative" %}
{% elseif active == "activo" %}
{% set color = "frame--hero" %}
{% endif %}
<section class="frame-group">
<div class="frame-content {{ color }} no-margin" align="center" style="height: 74px;">
<p>{{ articulos.title }}</p>
</div>
{% if app.user != ""%}
<div class="frame-content">
<section class="text-center">
<a href="{{ path('aviatur_content_view', {'id':articulos.url})}}">
<i class="icon icon_magnifying-glass"></i>
Visualizar
</a>
{% if app.user != "" and ( is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_EDIT_'~agencyId) or is_granted('ROLE_SUPER_ADMIN') )%}
|
<a class="js-content" data-id="{{ articulos.id }}" data-toggle="modal" data-target="#js-promo-editModal" >
<img src="{{ asset('assets/default_assets/img/content/editar.png') }}" title='Editar' width="15px"/>
Editar
</a>
{% endif %}
{% if app.user != "" and ( is_granted('ROLE_AVIATUR_ADMIN_ADMIN_PROMO_PRODUCT_DELETE_'~agencyId) or is_granted('ROLE_SUPER_ADMIN') ) %}
|
{% if active == "inactivo" %}
<a href="#" class="js-isActiContent content-menu-li-a" data-id="{{ articulos.id }}" data-toggle="modal" data-target="#js-promo-editModal" >
<img src="{{ asset('assets/default_assets/img/content/activar.png') }}" title='Activar' width="15px"/>
Activar
</a>
{% elseif active == "activo" %}
<a class="js-isActiContent" data-id="{{ articulos.id }}" data-toggle="modal" data-target="#js-promo-editModal" >
<img src="{{ asset('assets/default_assets/img/content/inactivar.png') }}" title='Inactivar' width="15px"/>
Desactivar
</a>
{% endif %}
{% endif %}
</section>
</div>
{% endif %}
{% if articulos.url=="ferias-y-fiestas-de-colombia"%}
{% set imageArticle = 'https://www.aviatur.com/source/contenidos/desfiles-del-carnaval.jpg' %}
<div class="frame-content" style="padding: 0px; height: 180px; background-color: white; border-top:0;">
<img style="height: 100%; width: 100%; object-fit: cover;" src="{{imageArticle}}" title="Fiestas y ferias de Colombia" alt="Fiestas y ferias de Colombia">
</div>
{% elseif articulos.url=="cambiar-de-ambiente-en-cholon"%}
{% set imageArticle='https://www.aviatur.com/source/casa-cholon/1.jpg'%}
<div class="frame-content" style="padding: 0px; height: 180px; background-color: white; border-top:0;">
<img style="height: 100%; width: 100%; object-fit: cover;" src="{{imageArticle}}" title="Casa Cholón, Barú" alt="Casa Cholón, Barú">
</div>
{% else %}
{% set separator1 = 'src="'%}
{% set separator2 = '"' %}
{% set imageArticle= render(controller('Aviatur\\ContentBundle\\Controller\\ContentController::extractUrlAction', { 'separator1':separator1 ,'separator2':separator2,'text':articulos, 'type':'content' }))%}
{% set dataImage= json_decode(imageArticle, true)%}
<div class="frame-content" style="padding: 0px; height: 180px; background-color: white; border-top:0;">
{% if "aviatur_logo" in imageArticle%}
<img style="width: 100%;" src="{{dataImage["img"]}}" title="{{dataImage["title"]}}" alt="{{dataImage["title"]}}">
{% else %}
<img style="height: 100%; width: 100%; object-fit: cover;" src="{{dataImage["img"]}}" title="{{dataImage["title"]}}" alt="{{dataImage["title"]}}">
{% endif %}
</div>
{% endif %}
<div class="frame-content">
<p class="box-content">{{ articleDescription|striptags|slice(0, 250) }} ...</p>
<p style="text-align: center; padding: 0px 18px 18px; margin-bottom: 0;">
<a href="{{ path('aviatur_content_view', {'id':articulos.url})}}">
<i class="icon icon_magnifying-glass"></i> Ver más
</a>
</p>
</div>
</section>
</div>
{% endif %}
{% endif %}
{% endfor %}
<div id="js-scrollTopBtn" class="btn--scroll-top pointer">▲</div>
</div>
{% if totalRegi > 1%}
<div id="pagination">
<button id="enlaceajax">Cargar más</button>
</div>
<script type="text/javascript">
var contador = 2;
var searching = 0;
const offset = 455;
var loadMore = function () {
if (contador <={{totalRegi}} ) {
var $url = '{{ path('aviatur_content_filtered', { 'page':'2', 'active':active, 'type':typeArticle }) }}';
$url = $url.replace('2', contador);
jQuery("#enlaceajax").css("display", "none");
_loadSpinner("pagination");
jQuery("#pagination").css("background-size", "contain");
searching = 1;
jQuery.ajax({
type: "POST",
url: $url
}).done(function (result) {
_removeSpinner("pagination");
jQuery("#listContents").append(result);
contador = contador + 1;
searching = 0;
jQuery("#enlaceajax").css("display", "inline-block");
});
} else {
jQuery("#pagination").remove();
searching = 1;
jQuery(window).off("scroll", scrollHandler);
}
};
var scrollHandler = function () {
if (jQuery(window).scrollTop() + jQuery(window).height() > jQuery(document).height() - offset && searching == 0) {
loadMore();
}
}
jQuery(window).scroll(scrollHandler);
jQuery("#enlaceajax").click(function (event) {
if (searching == 0) {
loadMore();
}
});
</script>
{#<div align='center' class="bs-example" data-example-id="disabled-active-pagination">
{% set lastpage = page-1 %}
{% set nextpage = page+1 %}
{% if page != 1 %}
<a href="{{ path('aviatur_content_filtered', { 'page':lastpage, 'active':active, 'type':typeArticle }) }}" class="btn" aria-label="Previous">
<span aria-hidden="true">«</span>
</a>
{% endif %}
{% for i in 1..totalRegi %}
<a href="{{ path('aviatur_content_filtered', { 'page':i, 'active':active, 'type':typeArticle }) }}" class="btn">{{i}}
<span class="sr-only">(current)</span>
</a>
{% endfor %}
{% if page != totalRegi %}
<a href="{{ path('aviatur_content_filtered', { 'page':nextpage, 'active':active, 'type':typeArticle }) }}" class="btn" aria-label="Previous">
<span aria-hidden="true">»</span>
</a>
{% endif %}
</div> #}
{% endif %}
</div>
{% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/Content/Content/contentModal.html.twig') %}
{% endblock %}