var/cache/dev/twig/20/202422407071f1ba6ef381c37748767c.php line 56

  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* default/cotizaciones.html.twig */
  14. class __TwigTemplate_5bb55ca326548997c1eb0bd6bcb5ca18 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'title' => [$this'block_title'],
  24.             'metadescription' => [$this'block_metadescription'],
  25.             'metakeywords' => [$this'block_metakeywords'],
  26.             'metarobots' => [$this'block_metarobots'],
  27.             'canonical' => [$this'block_canonical'],
  28.             'bodyId' => [$this'block_bodyId'],
  29.             'body' => [$this'block_body'],
  30.             'empresas' => [$this'block_empresas'],
  31.             'funciones_eventos' => [$this'block_funciones_eventos'],
  32.         ];
  33.     }
  34.     protected function doGetParent(array $context)
  35.     {
  36.         // line 2
  37.         return "base.html.twig";
  38.     }
  39.     protected function doDisplay(array $context, array $blocks = [])
  40.     {
  41.         $macros $this->macros;
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""default/cotizaciones.html.twig"));
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""default/cotizaciones.html.twig"));
  46.         $this->parent $this->loadTemplate("base.html.twig""default/cotizaciones.html.twig"2);
  47.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  48.         
  49.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  50.         
  51.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  52.     }
  53.     // line 4
  54.     public function block_title($context, array $blocks = [])
  55.     {
  56.         $macros $this->macros;
  57.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  58.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  59.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  60.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  61.         echo twig_escape_filter($this->envtwig_replace_filter(((twig_get_attribute($this->env$this->source, ($context["contenido"] ?? null), "metaTitle", [], "any"truetruefalse4)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["contenido"] ?? null), "metaTitle", [], "any"falsefalsefalse4), twig_get_attribute($this->env$this->source, (isset($context["contenido"]) || array_key_exists("contenido"$context) ? $context["contenido"] : (function () { throw new RuntimeError('Variable "contenido" does not exist.'4$this->source); })()), "titulo", [], "any"falsefalsefalse4))) : (twig_get_attribute($this->env$this->source, (isset($context["contenido"]) || array_key_exists("contenido"$context) ? $context["contenido"] : (function () { throw new RuntimeError('Variable "contenido" does not exist.'4$this->source); })()), "titulo", [], "any"falsefalsefalse4))), ["| Eurochange.es" => ""]), "html"nulltrue);
  62.         
  63.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  64.         
  65.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  66.     }
  67.     // line 5
  68.     public function block_metadescription($context, array $blocks = [])
  69.     {
  70.         $macros $this->macros;
  71.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  72.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metadescription"));
  73.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  74.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metadescription"));
  75.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["contenido"] ?? null), "metaDescription", [], "any"truetruefalse5)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["contenido"] ?? null), "metaDescription", [], "any"falsefalsefalse5), twig_get_attribute($this->env$this->source, (isset($context["contenido"]) || array_key_exists("contenido"$context) ? $context["contenido"] : (function () { throw new RuntimeError('Variable "contenido" does not exist.'5$this->source); })()), "intro", [], "any"falsefalsefalse5))) : (twig_get_attribute($this->env$this->source, (isset($context["contenido"]) || array_key_exists("contenido"$context) ? $context["contenido"] : (function () { throw new RuntimeError('Variable "contenido" does not exist.'5$this->source); })()), "intro", [], "any"falsefalsefalse5))), "html"nulltrue);
  76.         
  77.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  78.         
  79.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  80.     }
  81.     // line 6
  82.     public function block_metakeywords($context, array $blocks = [])
  83.     {
  84.         $macros $this->macros;
  85.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  86.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metakeywords"));
  87.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  88.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metakeywords"));
  89.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["contenido"]) || array_key_exists("contenido"$context) ? $context["contenido"] : (function () { throw new RuntimeError('Variable "contenido" does not exist.'6$this->source); })()), "metaKeywords", [], "any"falsefalsefalse6), "html"nulltrue);
  90.         
  91.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  92.         
  93.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  94.     }
  95.     // line 7
  96.     public function block_metarobots($context, array $blocks = [])
  97.     {
  98.         $macros $this->macros;
  99.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  100.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metarobots"));
  101.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  102.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metarobots"));
  103.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["contenido"] ?? null), "metaRobots", [], "any"truetruefalse7)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["contenido"] ?? null), "metaRobots", [], "any"falsefalsefalse7), $this->renderParentBlock("metarobots"$context$blocks))) : ($this->renderParentBlock("metarobots"$context$blocks))), "html"nulltrue);
  104.         
  105.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  106.         
  107.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  108.     }
  109.     // line 8
  110.     public function block_canonical($context, array $blocks = [])
  111.     {
  112.         $macros $this->macros;
  113.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  114.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""canonical"));
  115.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  116.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""canonical"));
  117.         if (twig_get_attribute($this->env$this->source, (isset($context["contenido"]) || array_key_exists("contenido"$context) ? $context["contenido"] : (function () { throw new RuntimeError('Variable "contenido" does not exist.'8$this->source); })()), "canonical", [], "any"falsefalsefalse8)) {
  118.             echo "<link rel=\"canonical\" href=\"";
  119.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["contenido"]) || array_key_exists("contenido"$context) ? $context["contenido"] : (function () { throw new RuntimeError('Variable "contenido" does not exist.'8$this->source); })()), "canonical", [], "any"falsefalsefalse8), "html"nulltrue);
  120.             echo "\" />";
  121.         }
  122.         
  123.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  124.         
  125.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  126.     }
  127.     // line 10
  128.     public function block_bodyId($context, array $blocks = [])
  129.     {
  130.         $macros $this->macros;
  131.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  132.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""bodyId"));
  133.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  134.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""bodyId"));
  135.         echo "cotizacion";
  136.         
  137.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  138.         
  139.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  140.     }
  141.     // line 12
  142.     public function block_body($context, array $blocks = [])
  143.     {
  144.         $macros $this->macros;
  145.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  146.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  147.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  148.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  149.         // line 13
  150.         echo "    <div class=\"title container\">
  151.         <h1>";
  152.         // line 14
  153.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Cotizaciones y tipo de cambio de divisas"), "html"nulltrue);
  154.         echo "</h1>
  155.     </div>
  156.     
  157.     <div id=\"cotizaciones\" class=\"container\">
  158.         <p id=\"pri\" class=\"d-none d-md-block\">";
  159.         // line 18
  160.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Si vas a viajar al extranjero, en Eurochange.es podrás cambiar tus Euros a la divisa que necesites. A tu vuelta también podrás cambiar los billetes extranjeros que te sobren a Euros en cualquiera de nuestras oficinas de cambio de divisas."), "html"nulltrue);
  161.         echo "</p>
  162.         <p class=\"d-none d-md-block\">";
  163.         // line 19
  164.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Consulta el tipo de cambio de las principales divisas a continuación. Busca tu oficina de cambio más cercana y comprueba los servicios disponibles, o haz tu reserva online y recóge tu dinero en cualquiera de nuestras casas de cambio, de una manera comoda en cualquier punto de España. ¡Así de sencillo!"), "html"nulltrue);
  165.         echo "</p>
  166.         
  167.         ";
  168.         // line 27
  169.         echo "        
  170.         ";
  171.         // line 28
  172.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\DefaultController::oficinaAction", ["select_id" => "select_ofi2"]));
  173.         echo "
  174.         
  175.         ";
  176.         // line 30
  177.         if (((isset($context["of"]) || array_key_exists("of"$context) ? $context["of"] : (function () { throw new RuntimeError('Variable "of" does not exist.'30$this->source); })()) != "")) {
  178.             echo "<p class=\"info-select\">";
  179.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Precios para"), "html"nulltrue);
  180.             echo " ";
  181.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["of"]) || array_key_exists("of"$context) ? $context["of"] : (function () { throw new RuntimeError('Variable "of" does not exist.'30$this->source); })()), "nombre", [], "any"falsefalsefalse30), "html"nulltrue);
  182.             echo " ";
  183.             echo twig_escape_filter($this->env, (isset($context["diaMax"]) || array_key_exists("diaMax"$context) ? $context["diaMax"] : (function () { throw new RuntimeError('Variable "diaMax" does not exist.'30$this->source); })()), "html"nulltrue);
  184.             echo "</p>";
  185.         }
  186.         // line 31
  187.         echo "        
  188.         ";
  189.         // line 32
  190.         if (((isset($context["ofi_var"]) || array_key_exists("ofi_var"$context) ? $context["ofi_var"] : (function () { throw new RuntimeError('Variable "ofi_var" does not exist.'32$this->source); })()) == 0)) {
  191.             // line 33
  192.             echo "            <span id=\"no-cot\">";
  193.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Porfavor selecciona una oficina para que le podamos dar las tarifas correctas"), "html"nulltrue);
  194.             echo "</span>
  195.         ";
  196.         }
  197.         // line 35
  198.         echo "        <table id=\"tabla-cot\">
  199.             <tr>
  200.                 <th>";
  201.         // line 37
  202.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Divisa"), "html"nulltrue);
  203.         echo "</th>
  204.                 <th>";
  205.         // line 38
  206.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Compramos"), "html"nulltrue);
  207.         echo "<span class=\"info-valor1\">i<p style=\"display:none;\">";
  208.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Utiliza la flecha para ver el tipo de cambio directo o indirecto."), "html"nulltrue);
  209.         echo "</p></span></th>
  210.                 <th>";
  211.         // line 39
  212.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Vendemos"), "html"nulltrue);
  213.         echo "<span class=\"info-valor2\">i<p style=\"display:none;\">";
  214.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Utiliza la flecha para ver el tipo de cambio directo o indirecto."), "html"nulltrue);
  215.         echo "</p></span></th>
  216.             </tr>
  217.             ";
  218.         // line 41
  219.         $context['_parent'] = $context;
  220.         $context['_seq'] = twig_ensure_traversable((isset($context["cotizaciones"]) || array_key_exists("cotizaciones"$context) ? $context["cotizaciones"] : (function () { throw new RuntimeError('Variable "cotizaciones" does not exist.'41$this->source); })()));
  221.         foreach ($context['_seq'] as $context["_key"] => $context["cotizacion"]) {
  222.             // line 42
  223.             echo "                <tr data-oficina=\"";
  224.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["cotizacion"], "oficina", [], "any"falsefalsefalse42), "html"nulltrue);
  225.             echo "\">
  226.                     <td>
  227.                         <a href=\"";
  228.             // line 44
  229.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("divisas", ["nombre" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse44), "slug", [], "any"falsefalsefalse44)]), "html"nulltrue);
  230.             echo "\"><span class=\"banderas\">
  231.                             ";
  232.             // line 45
  233.             if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse45), "imagen", [], "any"falsefalsefalse45)) {
  234.                 // line 46
  235.                 echo "                                ";
  236.                 echo $this->env->getRuntime('Sonata\MediaBundle\Twig\MediaRuntime')->thumbnail(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse46), "imagen", [], "any"falsefalsefalse46), "flag", ["title" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse46), "nombre", [], "any"falsefalsefalse46)]);
  237.                 echo "
  238.                             ";
  239.             }
  240.             // line 48
  241.             echo "                        </span>";
  242.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse48), "shortName", [], "any"falsefalsefalse48), "html"nulltrue);
  243.             echo " - ";
  244.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse48), "nombre", [], "any"falsefalsefalse48), "html"nulltrue);
  245.             echo "</a>
  246.                     </td>
  247.                     <td>
  248.                         ";
  249.             // line 51
  250.             if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "oficina", [], "any"falsefalsefalse51), "id", [], "any"falsefalsefalse51) == 66)) {
  251.                 // line 52
  252.                 echo "                            -
  253.                         ";
  254.             } elseif (twig_test_empty(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,             // line 53
  255. $context["cotizacion"], "oficina", [], "any"falsefalsefalse53), "franjas", [], "any"falsefalsefalse53))) {
  256.                 // line 54
  257.                 echo "                            -
  258.                         ";
  259.             } else {
  260.                 // line 56
  261.                 echo "                            <span class=\"antes\">1</span>
  262.                             <label class=\"switch\">
  263.                                 <input type=\"checkbox\" class=\"toggleSwitch\" autocomplete=\"off\">
  264.                                 <span class=\"slider\"></span>
  265.                                 <span class=\"label-on\">";
  266.                 // line 60
  267.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse60), "html"nulltrue);
  268.                 echo "</span>
  269.                                 <span class=\"label-off\">EUR</span>
  270.                             </label>
  271.                             <span class=\"despues\">";
  272.                 // line 63
  273.                 echo twig_escape_filter($this->envtwig_number_format_filter($this->envtwig_get_attribute($this->env$this->source$context["cotizacion"], "precioCompra", [], "any"falsefalsefalse63), twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse63), "numDecimales", [], "any"falsefalsefalse63)), "html"nulltrue);
  274.                 echo "</span>
  275.                         ";
  276.             }
  277.             // line 65
  278.             echo "                    </td>
  279.                     <td>
  280.                         ";
  281.             // line 67
  282.             if (twig_test_empty(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "oficina", [], "any"falsefalsefalse67), "franjas", [], "any"falsefalsefalse67))) {
  283.                 // line 68
  284.                 echo "                            -
  285.                         ";
  286.             } elseif ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,             // line 69
  287. $context["cotizacion"], "oficina", [], "any"falsefalsefalse69), "permiteCompra", [], "any"falsefalsefalse69) == 1)) {
  288.                 // line 70
  289.                 echo "                            <span class=\"antes\">1</span>
  290.                             <label class=\"switch\">
  291.                                 <input type=\"checkbox\" class=\"toggleSwitch\" autocomplete=\"off\">
  292.                                 <span class=\"slider\"></span>
  293.                                 <span class=\"label-on\">";
  294.                 // line 74
  295.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse74), "html"nulltrue);
  296.                 echo "</span>
  297.                                 <span class=\"label-off\">EUR</span>
  298.                             </label>
  299.                             <span class=\"despues\">";
  300.                 // line 77
  301.                 echo twig_escape_filter($this->envtwig_number_format_filter($this->envtwig_get_attribute($this->env$this->source$context["cotizacion"], "precioVenta", [], "any"falsefalsefalse77), twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse77), "numDecimales", [], "any"falsefalsefalse77)), "html"nulltrue);
  302.                 echo "</span>
  303.                         ";
  304.             } else {
  305.                 // line 79
  306.                 echo "                            -
  307.                         ";
  308.             }
  309.             // line 81
  310.             echo "                    </td>
  311.                 </tr>
  312.             ";
  313.         }
  314.         $_parent $context['_parent'];
  315.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['cotizacion'], $context['_parent'], $context['loop']);
  316.         $context array_intersect_key($context$_parent) + $_parent;
  317.         // line 84
  318.         echo "        </table>
  319.         
  320.         <div id=\"tabla-cot-res\">
  321.                 <ul class=\"nav nav-tabs\" id=\"tabla-res\" role=\"tablist\">
  322.                     <span id=\"divRes\">";
  323.         // line 88
  324.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Divisa"), "html"nulltrue);
  325.         echo "</span>
  326.                     <span class=\"info-valor1\">i<p style=\"display:none;\">";
  327.         // line 89
  328.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Utiliza la flecha para ver el tipo de cambio directo o indirecto."), "html"nulltrue);
  329.         echo "</p></span>
  330.                     <li class=\"nav-item\" role=\"presentation\">
  331.                         <button class=\"nav-link active\" id=\"comp\" data-bs-toggle=\"tab\" data-bs-target=\"#compramos\" type=\"button\" role=\"tab\" aria-controls=\"home\" aria-selected=\"true\">";
  332.         // line 91
  333.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Compramos"), "html"nulltrue);
  334.         echo "</button>
  335.                     </li>
  336.                     <li class=\"nav-item\" role=\"presentation\">
  337.                         <button class=\"nav-link\" id=\"vend\" data-bs-toggle=\"tab\" data-bs-target=\"#vendemos\" type=\"button\" role=\"tab\" aria-controls=\"profile\" aria-selected=\"false\">";
  338.         // line 94
  339.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Vendemos"), "html"nulltrue);
  340.         echo "</button>
  341.                     </li>
  342.                 </ul>
  343.                 
  344.                 <div class=\"tab-content\" id=\"tabla-res-content\">
  345.                     <div class=\"tab-pane fade show active\" id=\"compramos\" role=\"tabpanel\" aria-labelledby=\"home-tab\">
  346.                         ";
  347.         // line 100
  348.         $context['_parent'] = $context;
  349.         $context['_seq'] = twig_ensure_traversable((isset($context["cotizaciones"]) || array_key_exists("cotizaciones"$context) ? $context["cotizaciones"] : (function () { throw new RuntimeError('Variable "cotizaciones" does not exist.'100$this->source); })()));
  350.         foreach ($context['_seq'] as $context["_key"] => $context["cotizacion"]) {
  351.             // line 101
  352.             echo "                            <div class=\"row\">
  353.                                 <div class=\"col-6 voltN\">
  354.                                     <a href=\"";
  355.             // line 103
  356.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("divisas", ["nombre" => twig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse103)]), "html"nulltrue);
  357.             echo "\"><span class=\"banderas\">
  358.                                         ";
  359.             // line 104
  360.             if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse104), "imagen", [], "any"falsefalsefalse104)) {
  361.                 // line 105
  362.                 echo "                                            ";
  363.                 echo $this->env->getRuntime('Sonata\MediaBundle\Twig\MediaRuntime')->thumbnail(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse105), "imagen", [], "any"falsefalsefalse105), "flag", ["title" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse105), "nombre", [], "any"falsefalsefalse105)]);
  364.                 echo "
  365.                                         ";
  366.             }
  367.             // line 107
  368.             echo "                                    </span>";
  369.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse107), "html"nulltrue);
  370.             echo "</a>
  371.                                 </div>
  372.                                 <div class=\"col-6 volt\">
  373.                                     ";
  374.             // line 110
  375.             if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "oficina", [], "any"falsefalsefalse110), "id", [], "any"falsefalsefalse110) == 66)) {
  376.                 // line 111
  377.                 echo "                                        -
  378.                                     ";
  379.             } elseif (twig_test_empty(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,             // line 112
  380. $context["cotizacion"], "oficina", [], "any"falsefalsefalse112), "franjas", [], "any"falsefalsefalse112))) {
  381.                 // line 113
  382.                 echo "                                        -
  383.                                     ";
  384.             } else {
  385.                 // line 115
  386.                 echo "                                        <span class=\"antes\">1</span>
  387.                                         <label class=\"switch\">
  388.                                             <input type=\"checkbox\" class=\"toggleSwitch\" autocomplete=\"off\">
  389.                                             <span class=\"slider\"></span>
  390.                                             <span class=\"label-on\">";
  391.                 // line 119
  392.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse119), "html"nulltrue);
  393.                 echo "</span>
  394.                                             <span class=\"label-off\">EUR</span>
  395.                                         </label>
  396.                                         <span class=\"despues\">";
  397.                 // line 122
  398.                 echo twig_escape_filter($this->envtwig_number_format_filter($this->envtwig_get_attribute($this->env$this->source$context["cotizacion"], "precioCompra", [], "any"falsefalsefalse122), twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse122), "numDecimales", [], "any"falsefalsefalse122)), "html"nulltrue);
  399.                 echo "</span>
  400.                                     ";
  401.             }
  402.             // line 124
  403.             echo "                                </div>
  404.                             </div>
  405.                         ";
  406.         }
  407.         $_parent $context['_parent'];
  408.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['cotizacion'], $context['_parent'], $context['loop']);
  409.         $context array_intersect_key($context$_parent) + $_parent;
  410.         // line 127
  411.         echo "                    </div>
  412.                     
  413.                     <div class=\"tab-pane fade\" id=\"vendemos\" role=\"tabpanel\" aria-labelledby=\"profile-tab\">
  414.                         ";
  415.         // line 130
  416.         $context['_parent'] = $context;
  417.         $context['_seq'] = twig_ensure_traversable((isset($context["cotizaciones"]) || array_key_exists("cotizaciones"$context) ? $context["cotizaciones"] : (function () { throw new RuntimeError('Variable "cotizaciones" does not exist.'130$this->source); })()));
  418.         foreach ($context['_seq'] as $context["_key"] => $context["cotizacion"]) {
  419.             // line 131
  420.             echo "                            <div class=\"row\">
  421.                                 <div class=\"col-6 voltN\">
  422.                                     <a href=\"";
  423.             // line 133
  424.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("divisas", ["nombre" => twig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse133)]), "html"nulltrue);
  425.             echo "\"><span class=\"banderas\">
  426.                                         ";
  427.             // line 134
  428.             if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse134), "imagen", [], "any"falsefalsefalse134)) {
  429.                 // line 135
  430.                 echo "                                            ";
  431.                 echo $this->env->getRuntime('Sonata\MediaBundle\Twig\MediaRuntime')->thumbnail(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse135), "imagen", [], "any"falsefalsefalse135), "flag", ["title" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse135), "nombre", [], "any"falsefalsefalse135)]);
  432.                 echo "
  433.                                         ";
  434.             }
  435.             // line 137
  436.             echo "                                    </span>";
  437.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse137), "html"nulltrue);
  438.             echo "</a>
  439.                                 </div>
  440.                                 <div class=\"col-6 volt\">
  441.                                     ";
  442.             // line 140
  443.             if (twig_test_empty(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "oficina", [], "any"falsefalsefalse140), "franjas", [], "any"falsefalsefalse140))) {
  444.                 // line 141
  445.                 echo "                                        -
  446.                                     ";
  447.             } elseif ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,             // line 142
  448. $context["cotizacion"], "oficina", [], "any"falsefalsefalse142), "permiteCompra", [], "any"falsefalsefalse142) == 1)) {
  449.                 // line 143
  450.                 echo "                                        <span class=\"antes\">1</span>
  451.                                         <label class=\"switch\">
  452.                                             <input type=\"checkbox\" class=\"toggleSwitch\" autocomplete=\"off\">
  453.                                             <span class=\"slider\"></span>
  454.                                             <span class=\"label-on\">";
  455.                 // line 147
  456.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse147), "html"nulltrue);
  457.                 echo "</span>
  458.                                             <span class=\"label-off\">EUR</span>
  459.                                         </label>
  460.                                         <span class=\"despues\">";
  461.                 // line 150
  462.                 echo twig_escape_filter($this->envtwig_number_format_filter($this->envtwig_get_attribute($this->env$this->source$context["cotizacion"], "precioVenta", [], "any"falsefalsefalse150), twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["cotizacion"], "shortName", [], "any"falsefalsefalse150), "numDecimales", [], "any"falsefalsefalse150)), "html"nulltrue);
  463.                 echo "</span>
  464.                                     ";
  465.             } else {
  466.                 // line 152
  467.                 echo "                                        -
  468.                                     ";
  469.             }
  470.             // line 154
  471.             echo "                                </div>
  472.                             </div>
  473.                         ";
  474.         }
  475.         $_parent $context['_parent'];
  476.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['cotizacion'], $context['_parent'], $context['loop']);
  477.         $context array_intersect_key($context$_parent) + $_parent;
  478.         // line 157
  479.         echo "                    </div>
  480.                 </div>
  481.         </div>
  482.         
  483.         <button id=\"ver-mas\">";
  484.         // line 161
  485.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Ver +"), "html"nulltrue);
  486.         echo "</button>
  487.     </div>
  488.     
  489.      ";
  490.         // line 164
  491.         $this->displayBlock('empresas'$context$blocks);
  492.         // line 167
  493.         echo "    
  494. ";
  495.         
  496.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  497.         
  498.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  499.     }
  500.     // line 164
  501.     public function block_empresas($context, array $blocks = [])
  502.     {
  503.         $macros $this->macros;
  504.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  505.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""empresas"));
  506.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  507.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""empresas"));
  508.         // line 165
  509.         echo "        ";
  510.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\DefaultController::empresas"));
  511.         echo "
  512.     ";
  513.         
  514.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  515.         
  516.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  517.     }
  518.     // line 171
  519.     public function block_funciones_eventos($context, array $blocks = [])
  520.     {
  521.         $macros $this->macros;
  522.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  523.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""funciones_eventos"));
  524.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  525.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""funciones_eventos"));
  526.         // line 172
  527.         echo "    ";
  528.         $this->displayParentBlock("funciones_eventos"$context$blocks);
  529.         echo "
  530.     
  531.     <script>
  532.             // Hacer el cambio de Compramos/Vendemos
  533.             
  534.             const toggleSwitches = document.querySelectorAll('.toggleSwitch');
  535.             const spanAntes = document.querySelectorAll('.antes');
  536.             const spanDespues = document.querySelectorAll('.despues');
  537.             toggleSwitches.forEach((toggleSwitch, index) => {
  538.                 toggleSwitch.addEventListener('change', function() {
  539.                 
  540.                     const numero1 = parseFloat(spanAntes[index].innerText);
  541.                     const numero2 = parseFloat(spanDespues[index].innerText);
  542.                     
  543.                     if (toggleSwitch.checked) {
  544.                         spanAntes[index].innerText = (numero1 / numero2).toFixed(3);
  545.                         spanDespues[index].innerText = '1';
  546.                     } else {
  547.                         spanAntes[index].innerText = '1';
  548.                         spanDespues[index].innerText = (numero2 / numero1).toFixed(3);
  549.                     }
  550.                 });
  551.             });
  552.             
  553.             
  554.             // Funcionalidad del botón \"Ver +\"
  555.             
  556.             var tablaCuerpo = document.getElementById('tabla-cot');
  557.             var verMas = document.getElementById('ver-mas');
  558.             var filasVisibles = 16;
  559.             var aumento = 10;
  560.             function actualizarFilasVisibles() {
  561.                 var filas = tablaCuerpo.getElementsByTagName('tr');
  562.                 var filasOcultas = filas.length - filasVisibles;
  563.                 for (var i = 0; i < filas.length; i++) {
  564.                     if (i < filasVisibles) {
  565.                         filas[i].style.display = 'table-row';
  566.                     } else {
  567.                         filas[i].style.display = 'none';
  568.                     }
  569.                 }
  570.                 
  571.                 if (filasOcultas > 0) {
  572.                     verMas.style.display = 'block';
  573.                 } else {
  574.                     verMas.style.display = 'none';
  575.                 }
  576.             }
  577.             actualizarFilasVisibles();
  578.             verMas.addEventListener('click', function() {
  579.                 filasVisibles += aumento;
  580.                 actualizarFilasVisibles();
  581.             });
  582.     </script>
  583. ";
  584.         
  585.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  586.         
  587.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  588.     }
  589.     public function getTemplateName()
  590.     {
  591.         return "default/cotizaciones.html.twig";
  592.     }
  593.     public function isTraitable()
  594.     {
  595.         return false;
  596.     }
  597.     public function getDebugInfo()
  598.     {
  599.         return array (  581 => 172,  571 => 171,  558 => 165,  548 => 164,  537 => 167,  535 => 164,  529 => 161,  523 => 157,  515 => 154,  511 => 152,  506 => 150,  500 => 147,  494 => 143,  492 => 142,  489 => 141,  487 => 140,  480 => 137,  474 => 135,  472 => 134,  468 => 133,  464 => 131,  460 => 130,  455 => 127,  447 => 124,  442 => 122,  436 => 119,  430 => 115,  426 => 113,  424 => 112,  421 => 111,  419 => 110,  412 => 107,  406 => 105,  404 => 104,  400 => 103,  396 => 101,  392 => 100,  383 => 94,  377 => 91,  372 => 89,  368 => 88,  362 => 84,  354 => 81,  350 => 79,  345 => 77,  339 => 74,  333 => 70,  331 => 69,  328 => 68,  326 => 67,  322 => 65,  317 => 63,  311 => 60,  305 => 56,  301 => 54,  299 => 53,  296 => 52,  294 => 51,  285 => 48,  279 => 46,  277 => 45,  273 => 44,  267 => 42,  263 => 41,  256 => 39,  250 => 38,  246 => 37,  242 => 35,  236 => 33,  234 => 32,  231 => 31,  221 => 30,  216 => 28,  213 => 27,  208 => 19,  204 => 18,  197 => 14,  194 => 13,  184 => 12,  165 => 10,  142 => 8,  123 => 7,  104 => 6,  85 => 5,  66 => 4,  43 => 2,);
  600.     }
  601.     public function getSourceContext()
  602.     {
  603.         return new Source("{# {% extends 'default/contenido.html.twig' %} #}
  604. {% extends 'base.html.twig' %}
  605. {% block title %}{{ contenido.metaTitle|default(contenido.titulo)| replace({'| Eurochange.es':''}) }}{% endblock %}
  606. {% block metadescription %}{{ contenido.metaDescription|default(contenido.intro) }}{% endblock %}
  607. {% block metakeywords %}{{ contenido.metaKeywords }}{% endblock %}
  608. {% block metarobots %}{{ contenido.metaRobots|default(parent()) }}{% endblock %}
  609. {% block canonical %}{% if contenido.canonical %}<link rel=\"canonical\" href=\"{{contenido.canonical}}\" />{% endif %}{% endblock %}
  610. {% block bodyId %}cotizacion{% endblock %}
  611. {% block body %}
  612.     <div class=\"title container\">
  613.         <h1>{{ 'Cotizaciones y tipo de cambio de divisas' | trans}}</h1>
  614.     </div>
  615.     
  616.     <div id=\"cotizaciones\" class=\"container\">
  617.         <p id=\"pri\" class=\"d-none d-md-block\">{{ 'Si vas a viajar al extranjero, en Eurochange.es podrás cambiar tus Euros a la divisa que necesites. A tu vuelta también podrás cambiar los billetes extranjeros que te sobren a Euros en cualquiera de nuestras oficinas de cambio de divisas.' | trans}}</p>
  618.         <p class=\"d-none d-md-block\">{{ 'Consulta el tipo de cambio de las principales divisas a continuación. Busca tu oficina de cambio más cercana y comprueba los servicios disponibles, o haz tu reserva online y recóge tu dinero en cualquiera de nuestras casas de cambio, de una manera comoda en cualquier punto de España. ¡Así de sencillo!' | trans}}</p>
  619.         
  620.         {#<select id=\"select-ofi\" class=\"form-select\" aria-label=\"Default select example\">
  621.             <option value=\"todos\" selected>Para comenzar, selecciona tu oficina más cercana</option>
  622.             {% for oficina in oficinas %}
  623.                 <option value=\"{{ oficina.nombre }}\">{{ oficina.nombre }}</option>
  624.             {% endfor %}
  625.         </select>#}
  626.         
  627.         {{ render(controller('App\\\\Controller\\\\DefaultController::oficinaAction', { select_id: 'select_ofi2' } )) }}
  628.         
  629.         {% if of != \"\" %}<p class=\"info-select\">{{ 'Precios para' | trans}} {{ of.nombre }} {{ diaMax }}</p>{% endif %}
  630.         
  631.         {% if ofi_var == 0 %}
  632.             <span id=\"no-cot\">{{ 'Porfavor selecciona una oficina para que le podamos dar las tarifas correctas' | trans}}</span>
  633.         {% endif %}
  634.         <table id=\"tabla-cot\">
  635.             <tr>
  636.                 <th>{{ 'Divisa' | trans}}</th>
  637.                 <th>{{ 'Compramos' | trans}}<span class=\"info-valor1\">i<p style=\"display:none;\">{{ 'Utiliza la flecha para ver el tipo de cambio directo o indirecto.' | trans}}</p></span></th>
  638.                 <th>{{ 'Vendemos' | trans}}<span class=\"info-valor2\">i<p style=\"display:none;\">{{ 'Utiliza la flecha para ver el tipo de cambio directo o indirecto.' | trans}}</p></span></th>
  639.             </tr>
  640.             {% for cotizacion in cotizaciones %}
  641.                 <tr data-oficina=\"{{ cotizacion.oficina }}\">
  642.                     <td>
  643.                         <a href=\"{{ path('divisas', {'nombre': cotizacion.shortName.slug}) }}\"><span class=\"banderas\">
  644.                             {% if cotizacion.shortName.imagen %}
  645.                                 {{ sonata_thumbnail(cotizacion.shortName.imagen, 'flag', {'title': cotizacion.shortName.nombre}) }}
  646.                             {% endif %}
  647.                         </span>{{ cotizacion.shortName.shortName }} - {{ cotizacion.shortName.nombre }}</a>
  648.                     </td>
  649.                     <td>
  650.                         {% if cotizacion.oficina.id == 66 %}
  651.                             -
  652.                         {% elseif cotizacion.oficina.franjas is empty %}
  653.                             -
  654.                         {% else %}
  655.                             <span class=\"antes\">1</span>
  656.                             <label class=\"switch\">
  657.                                 <input type=\"checkbox\" class=\"toggleSwitch\" autocomplete=\"off\">
  658.                                 <span class=\"slider\"></span>
  659.                                 <span class=\"label-on\">{{ cotizacion.shortName }}</span>
  660.                                 <span class=\"label-off\">EUR</span>
  661.                             </label>
  662.                             <span class=\"despues\">{{ cotizacion.precioCompra|number_format(cotizacion.shortName.numDecimales) }}</span>
  663.                         {% endif %}
  664.                     </td>
  665.                     <td>
  666.                         {% if cotizacion.oficina.franjas is empty %}
  667.                             -
  668.                         {% elseif cotizacion.oficina.permiteCompra == 1 %}
  669.                             <span class=\"antes\">1</span>
  670.                             <label class=\"switch\">
  671.                                 <input type=\"checkbox\" class=\"toggleSwitch\" autocomplete=\"off\">
  672.                                 <span class=\"slider\"></span>
  673.                                 <span class=\"label-on\">{{ cotizacion.shortName }}</span>
  674.                                 <span class=\"label-off\">EUR</span>
  675.                             </label>
  676.                             <span class=\"despues\">{{ cotizacion.precioVenta|number_format(cotizacion.shortName.numDecimales) }}</span>
  677.                         {% else %}
  678.                             -
  679.                         {% endif %}
  680.                     </td>
  681.                 </tr>
  682.             {% endfor %}
  683.         </table>
  684.         
  685.         <div id=\"tabla-cot-res\">
  686.                 <ul class=\"nav nav-tabs\" id=\"tabla-res\" role=\"tablist\">
  687.                     <span id=\"divRes\">{{ 'Divisa' | trans}}</span>
  688.                     <span class=\"info-valor1\">i<p style=\"display:none;\">{{ 'Utiliza la flecha para ver el tipo de cambio directo o indirecto.' | trans}}</p></span>
  689.                     <li class=\"nav-item\" role=\"presentation\">
  690.                         <button class=\"nav-link active\" id=\"comp\" data-bs-toggle=\"tab\" data-bs-target=\"#compramos\" type=\"button\" role=\"tab\" aria-controls=\"home\" aria-selected=\"true\">{{ 'Compramos' | trans}}</button>
  691.                     </li>
  692.                     <li class=\"nav-item\" role=\"presentation\">
  693.                         <button class=\"nav-link\" id=\"vend\" data-bs-toggle=\"tab\" data-bs-target=\"#vendemos\" type=\"button\" role=\"tab\" aria-controls=\"profile\" aria-selected=\"false\">{{ 'Vendemos' | trans}}</button>
  694.                     </li>
  695.                 </ul>
  696.                 
  697.                 <div class=\"tab-content\" id=\"tabla-res-content\">
  698.                     <div class=\"tab-pane fade show active\" id=\"compramos\" role=\"tabpanel\" aria-labelledby=\"home-tab\">
  699.                         {% for cotizacion in cotizaciones %}
  700.                             <div class=\"row\">
  701.                                 <div class=\"col-6 voltN\">
  702.                                     <a href=\"{{ path('divisas', {'nombre': cotizacion.shortName}) }}\"><span class=\"banderas\">
  703.                                         {% if cotizacion.shortName.imagen %}
  704.                                             {{ sonata_thumbnail(cotizacion.shortName.imagen, 'flag', {'title': cotizacion.shortName.nombre}) }}
  705.                                         {% endif %}
  706.                                     </span>{{ cotizacion.shortName }}</a>
  707.                                 </div>
  708.                                 <div class=\"col-6 volt\">
  709.                                     {% if cotizacion.oficina.id == 66 %}
  710.                                         -
  711.                                     {% elseif cotizacion.oficina.franjas is empty %}
  712.                                         -
  713.                                     {% else %}
  714.                                         <span class=\"antes\">1</span>
  715.                                         <label class=\"switch\">
  716.                                             <input type=\"checkbox\" class=\"toggleSwitch\" autocomplete=\"off\">
  717.                                             <span class=\"slider\"></span>
  718.                                             <span class=\"label-on\">{{ cotizacion.shortName }}</span>
  719.                                             <span class=\"label-off\">EUR</span>
  720.                                         </label>
  721.                                         <span class=\"despues\">{{ cotizacion.precioCompra|number_format(cotizacion.shortName.numDecimales) }}</span>
  722.                                     {% endif %}
  723.                                 </div>
  724.                             </div>
  725.                         {% endfor %}
  726.                     </div>
  727.                     
  728.                     <div class=\"tab-pane fade\" id=\"vendemos\" role=\"tabpanel\" aria-labelledby=\"profile-tab\">
  729.                         {% for cotizacion in cotizaciones %}
  730.                             <div class=\"row\">
  731.                                 <div class=\"col-6 voltN\">
  732.                                     <a href=\"{{ path('divisas', {'nombre': cotizacion.shortName}) }}\"><span class=\"banderas\">
  733.                                         {% if cotizacion.shortName.imagen %}
  734.                                             {{ sonata_thumbnail(cotizacion.shortName.imagen, 'flag', {'title': cotizacion.shortName.nombre}) }}
  735.                                         {% endif %}
  736.                                     </span>{{ cotizacion.shortName }}</a>
  737.                                 </div>
  738.                                 <div class=\"col-6 volt\">
  739.                                     {% if cotizacion.oficina.franjas is empty %}
  740.                                         -
  741.                                     {% elseif cotizacion.oficina.permiteCompra == 1 %}
  742.                                         <span class=\"antes\">1</span>
  743.                                         <label class=\"switch\">
  744.                                             <input type=\"checkbox\" class=\"toggleSwitch\" autocomplete=\"off\">
  745.                                             <span class=\"slider\"></span>
  746.                                             <span class=\"label-on\">{{ cotizacion.shortName }}</span>
  747.                                             <span class=\"label-off\">EUR</span>
  748.                                         </label>
  749.                                         <span class=\"despues\">{{ cotizacion.precioVenta|number_format(cotizacion.shortName.numDecimales) }}</span>
  750.                                     {% else %}
  751.                                         -
  752.                                     {% endif %}
  753.                                 </div>
  754.                             </div>
  755.                         {% endfor %}
  756.                     </div>
  757.                 </div>
  758.         </div>
  759.         
  760.         <button id=\"ver-mas\">{{ 'Ver +' | trans}}</button>
  761.     </div>
  762.     
  763.      {% block empresas %}
  764.         {{ render(controller('App\\\\Controller\\\\DefaultController::empresas' )) }}
  765.     {% endblock %}
  766.     
  767. {% endblock %}
  768. {% block funciones_eventos %}
  769.     {{ parent() }}
  770.     
  771.     <script>
  772.             // Hacer el cambio de Compramos/Vendemos
  773.             
  774.             const toggleSwitches = document.querySelectorAll('.toggleSwitch');
  775.             const spanAntes = document.querySelectorAll('.antes');
  776.             const spanDespues = document.querySelectorAll('.despues');
  777.             toggleSwitches.forEach((toggleSwitch, index) => {
  778.                 toggleSwitch.addEventListener('change', function() {
  779.                 
  780.                     const numero1 = parseFloat(spanAntes[index].innerText);
  781.                     const numero2 = parseFloat(spanDespues[index].innerText);
  782.                     
  783.                     if (toggleSwitch.checked) {
  784.                         spanAntes[index].innerText = (numero1 / numero2).toFixed(3);
  785.                         spanDespues[index].innerText = '1';
  786.                     } else {
  787.                         spanAntes[index].innerText = '1';
  788.                         spanDespues[index].innerText = (numero2 / numero1).toFixed(3);
  789.                     }
  790.                 });
  791.             });
  792.             
  793.             
  794.             // Funcionalidad del botón \"Ver +\"
  795.             
  796.             var tablaCuerpo = document.getElementById('tabla-cot');
  797.             var verMas = document.getElementById('ver-mas');
  798.             var filasVisibles = 16;
  799.             var aumento = 10;
  800.             function actualizarFilasVisibles() {
  801.                 var filas = tablaCuerpo.getElementsByTagName('tr');
  802.                 var filasOcultas = filas.length - filasVisibles;
  803.                 for (var i = 0; i < filas.length; i++) {
  804.                     if (i < filasVisibles) {
  805.                         filas[i].style.display = 'table-row';
  806.                     } else {
  807.                         filas[i].style.display = 'none';
  808.                     }
  809.                 }
  810.                 
  811.                 if (filasOcultas > 0) {
  812.                     verMas.style.display = 'block';
  813.                 } else {
  814.                     verMas.style.display = 'none';
  815.                 }
  816.             }
  817.             actualizarFilasVisibles();
  818.             verMas.addEventListener('click', function() {
  819.                 filasVisibles += aumento;
  820.                 actualizarFilasVisibles();
  821.             });
  822.     </script>
  823. {% endblock %}
  824. ""default/cotizaciones.html.twig""/home/alien/www/eurochange/templates/default/cotizaciones.html.twig");
  825.     }
  826. }