templates/default/ficha_oficina.html.twig line 1
{# {% extends 'default/contenido.html.twig' %} #}{% extends 'base.html.twig' %}{% block idiomas %}{% for k,idioma in locales %}{% if k == app.request.locale %}<option selected value="{{ path(app.request.get('_route', 'index'), app.request.get('_route_params', [])|merge({_locale: k})) }}" title="{{ idioma }}">{{ k | upper}}</option>{% else %}<option value="{{ path(app.request.get('_route', 'index'), app.request.get('_route_params', [])|merge({_locale: k, slugP: oficina.provincia.translate(k).slug(), slugL: oficina.localidad.slug, slugO: oficina.translate(k).slug() })) }}" title="{{ idioma }}">{{ k | upper}}</option>{% endif %}{% endfor %}{% endblock %}{% block bodyId %}ficha-oficina{% endblock %}{% block body %}<div id="cab-fi-ofi" class="container"><div id="img-ofi">{#{% if oficina.imagen %}{{ sonata_media(oficina.imagen, 'cabecera') }}{% endif %}#}<img src="/img/banner_currency_offices.png"/></div><div id="horario" class="row"><div id="franjas" class="col-12 col-md-8"><div id="nomH"><span>{{ 'Horarios' | trans}}</span></div><div id="textH">{% for franja in oficina.franjas %}>{{ franja.nombre }}:{# FOR DE LAS HORAS #}{% for horas in franja.franjaHoras %}<strong> {{ horas.horaInicio |date('H:i') }}a {{ horas.horaFin |date('H:i') }} </strong>{% endfor %}<br/>{% endfor %}{% set hoy = "now"|date("Y-m-d") %}{% for festivo in oficina.dayoffs %}{% set fechaFestivo = festivo.date|date("Y-m-d") %}{% set segundosEnUnDia = 86400 %}{% set segundosDeDiferencia = fechaFestivo|date("U") - hoy|date("U") %}{% set diasDeDiferencia = segundosDeDiferencia / segundosEnUnDia %}{% if fechaFestivo == hoy or diasDeDiferencia >= -2 and diasDeDiferencia <= 30 %}{#{% for hor in festivo.horarioReducidos %}<div>>Festivo: <strong>{{ festivo.date |date('d/m/Y') }}{% if hor.horaInicio|date('H:i') != '00:00' %} - {{ hor.horaInicio |date('H:i') }} a {{ hor.horaFin |date('H:i') }} {% endif %}</strong></div>{% endfor %}#}<div>>Festivo: <strong>{{ festivo.date |date('d/m/Y') }}{% if festivo.horarioReducidos is empty %} - {{ 'Cerrado' | trans }} {% else %} {% for hor in festivo.horarioReducidos %}{% if hor.horaInicio|date('H:i') != '00:00' %} - {{ hor.horaInicio |date('H:i') }} a {{ hor.horaFin |date('H:i') }} {% else %} - {{ 'Cerrado' | trans }} {% endif %}{% endfor %}{% endif %}</strong></div>{% endif %}{% endfor %}</div></div><div id="tel" class="col-12 col-md-4"><span>{{ oficina.telefono }}</span></div></div><div id="info-ofi"><div id="lin-ofi" class="row"><div class="texto col-12 col-lg-6"><p id="title">{{ oficina.title }}</p>{{ oficina.descripcion|raw }}</div><div class="tabla col-12 col-lg-6"><p class="precios">{{ 'Precios' | trans}}</p><div class="cont-table"><table id="tabla-cot"><tr><th>{{ 'Divisa' | trans}}</th><th>{{ 'Compramos' | trans}}</th><th>{{ 'Vendemos' | trans}}</th></tr>{% for cotizacion in cotizaciones %}<tr data-oficina="{{ cotizacion.oficina }}"><td><a class="d-none d-sm-block" href="{{ path('divisas', {'nombre': cotizacion.shortName.slug(app.request.locale)}) }}"><span class="banderas">{% if cotizacion.shortName.imagen %}{{ sonata_thumbnail(cotizacion.shortName.imagen, 'flag') }}{% endif %}</span>{{ cotizacion.shortName.nombre }}</a><a class="d-block d-sm-none" href="{{ path('divisas', {'nombre': cotizacion.shortName.slug(app.request.locale)}) }}"><span class="banderas">{% if cotizacion.shortName.imagen %}{{ sonata_thumbnail(cotizacion.shortName.imagen, 'flag') }}{% endif %}</span>{{ cotizacion.shortName }}</a></td><td>{% if cotizacion.oficina.id == 66 %}-{% elseif oficina.franjas is empty %}-{% else %}{{ cotizacion.precioCompra|number_format(cotizacion.shortName.numDecimales) }}{% endif %}</td><td>{% if oficina.franjas is empty %}-{% elseif cotizacion.oficina.permiteCompra == 1 %}{{ cotizacion.precioVenta|number_format(cotizacion.shortName.numDecimales) }}{% else %}-{% endif %}</td></tr>{% endfor %}</table></div>{% if oficina != "" %}<p class="info-select">{{ 'Precios para' | trans}} {{ diaMax }}</p>{% endif %}<div id="mas-cot"><a href="/cotizaciones">{{ 'Ver mas cotizaciones >' | trans}}</a></div></div></div></div>{% if oficina.servicios | length > 0 %}<h2>{{ 'Servicios disponibles en esta oficina de cambio' | trans }}</h2><div id="ofi-servicios" class="row"><ul>{% for servicio in oficina.servicios %}<li ><div class="card">{% if servicio.imagenCabecera %}{{ sonata_thumbnail(servicio.imagenCabecera, 'reference') }}{% elseif servicio.translate('es').imagenCabecera %}{{ sonata_thumbnail(servicio.translate('es').imagenCabecera, 'reference') }}{% endif %}<div class="card-body"><h5 class="card-title">{{ servicio.texto }}</h5></div></div><li>{% endfor %}<ul></div>{% endif %}<div id="text-servicios">{{ oficina.serviciosTexto|raw }}</div><div id="mapa" class="container"><div id="map"></div><div id="texto-mapa"><p>{{ oficina.direccion }}</p><a target="_blank" href="https://www.google.com/maps/dir/Current+Location/{{ oficina.latitud }},{{ oficina.longitud }}">{{ '¿Cómo llegar? >' | trans}}</a></div></div><div id="resto" class="container"><p id="ind">{{ 'Indicaciones para llegar:' | trans}}</p>{{ oficina.indicaciones|raw }}</div></div>{% block empresas %}{{ render(controller('App\\Controller\\DefaultController::empresas' )) }}{% endblock %}{# {{ dump(oficinaIdioma) }} #}{% endblock %}{% block javascripts_footer %}{{ parent() }}<script>// function initMap() {//// var mapElement = document.getElementById('map');//// if (mapElement) {//// var map = new google.maps.Map(mapElement, {// center: { lat: {{ oficina.latitud }}, lng: {{ oficina.longitud }} },// zoom: 12// });// }// }</script>{% include "includes/mapa_javascript.html.twig" with { oficinasMapa:[oficina] } only %}{% endblock %}