var/cache/dev/twig/70/709d977dfe27d474fcb090bec916afbe.php line 53

Open in your IDE?
  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/menus.html.twig */
  14. class __TwigTemplate_8b671edb1e9841b00c40b8a10bdc1ca0 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.             'metas' => [$this'block_metas'],
  24.             'stylesheets' => [$this'block_stylesheets'],
  25.             'javascripts' => [$this'block_javascripts'],
  26.             'title' => [$this'block_title'],
  27.             'body' => [$this'block_body'],
  28.             'postjavascripts' => [$this'block_postjavascripts'],
  29.         ];
  30.     }
  31.     protected function doGetParent(array $context)
  32.     {
  33.         // line 1
  34.         return "base.html.twig";
  35.     }
  36.     protected function doDisplay(array $context, array $blocks = [])
  37.     {
  38.         $macros $this->macros;
  39.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  40.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""default/menus.html.twig"));
  41.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  42.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""default/menus.html.twig"));
  43.         $this->parent $this->loadTemplate("base.html.twig""default/menus.html.twig"1);
  44.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  45.         
  46.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47.         
  48.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49.     }
  50.     // line 3
  51.     public function block_metas($context, array $blocks = [])
  52.     {
  53.         $macros $this->macros;
  54.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metas"));
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metas"));
  58.         // line 4
  59.         echo "\t<meta name=\"description\" content=\"Encuentra los mejores menús cerca de ti.\">
  60. \t<meta property=\"og:title\" content=\"Menu del dia\"/>
  61. \t<meta property=\"og:url\" content=\"";
  62.         // line 6
  63.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'6$this->source); })()), "request", [], "any"falsefalsefalse6), "attributes", [], "any"falsefalsefalse6), "get", [=> "_route"], "method"falsefalsefalse6), twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'6$this->source); })()), "request", [], "any"falsefalsefalse6), "attributes", [], "any"falsefalsefalse6), "get", [=> "_route_params"], "method"falsefalsefalse6)), "html"nulltrue);
  64.         echo "\"/>
  65. \t<meta property=\"og:description\" content=\"Encuentra los mejores menús cerca de ti.\">
  66. \t<meta property=\"og:image\" itemprop=\"image\" content=\"https://menusdeldia.com/uploads/menu.jpg\">
  67. ";
  68.         
  69.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  70.         
  71.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  72.     }
  73.     // line 10
  74.     public function block_stylesheets($context, array $blocks = [])
  75.     {
  76.         $macros $this->macros;
  77.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  78.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  79.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  80.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  81.         // line 11
  82.         echo "\t";
  83.         $this->displayParentBlock("stylesheets"$context$blocks);
  84.         echo "
  85. \t<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/css/ion.rangeSlider.min.css\"/>
  86. ";
  87.         
  88.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  89.         
  90.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  91.     }
  92.     // line 14
  93.     public function block_javascripts($context, array $blocks = [])
  94.     {
  95.         $macros $this->macros;
  96.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  97.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  98.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  99.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  100.         // line 15
  101.         echo "\t";
  102.         $this->displayParentBlock("javascripts"$context$blocks);
  103.         echo "
  104. \t<script src=\"https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/js/ion.rangeSlider.min.js\"></script>
  105. ";
  106.         
  107.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  108.         
  109.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  110.     }
  111.     // line 19
  112.     public function block_title($context, array $blocks = [])
  113.     {
  114.         $macros $this->macros;
  115.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  116.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  117.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  118.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  119.         echo "Menu del dia
  120. ";
  121.         
  122.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  123.         
  124.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  125.     }
  126.     // line 22
  127.     public function block_body($context, array $blocks = [])
  128.     {
  129.         $macros $this->macros;
  130.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  131.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  132.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  133.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  134.         // line 23
  135.         echo "\t<div class=\"container py-3\">
  136. \t\t<section class=\"pb-2 pt-2\">
  137. \t\t\t<form action=\"";
  138.         // line 25
  139.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("menus");
  140.         echo "\" method=\"post\" role=\"form\" enctype=\"multipart/form-data\" class=\"w-100\">
  141. \t\t\t\t<div class=\"row\">
  142. \t\t\t\t\t<div class='col-md-6 text-center'>
  143. \t\t\t\t\t\t<h6>
  144. \t\t\t\t\t\t\t<small>Precio</small>
  145. \t\t\t\t\t\t</h6>
  146. \t\t\t\t\t\t<input type=\"text\" class=\"js-range-precio\" name=\"precioMax\" value=\"\"/>
  147. \t\t\t\t\t</div>
  148. \t\t\t\t\t<div class='col-md-6 text-center'>
  149. \t\t\t\t\t\t<h6>
  150. \t\t\t\t\t\t\t<small>Distancia</small>
  151. \t\t\t\t\t\t</h6>
  152. \t\t\t\t\t\t<input type=\"text\" class=\"js-range-distancia\" name=\"distanciaMax\" value=\"\"/>
  153. \t\t\t\t\t</div>
  154. \t\t\t\t\t<input name=\"latActual\" type=\"hidden\" value=\"";
  155.         // line 39
  156.         echo twig_escape_filter($this->env, (isset($context["latActual"]) || array_key_exists("latActual"$context) ? $context["latActual"] : (function () { throw new RuntimeError('Variable "latActual" does not exist.'39$this->source); })()), "html"nulltrue);
  157.         echo "\">
  158. \t\t\t\t\t<input name=\"lngActual\" type=\"hidden\" value=\"";
  159.         // line 40
  160.         echo twig_escape_filter($this->env, (isset($context["lngActual"]) || array_key_exists("lngActual"$context) ? $context["lngActual"] : (function () { throw new RuntimeError('Variable "lngActual" does not exist.'40$this->source); })()), "html"nulltrue);
  161.         echo "\">
  162. \t\t\t\t</div>
  163. \t\t\t</form>
  164. \t\t\t<div class=\"row text-center mt-2\">
  165. \t\t\t\t<p>
  166. \t\t\t\t\t<em>Se han encontrado
  167. \t\t\t\t\t</em>
  168. \t\t\t\t\t<strong>";
  169.         // line 47
  170.         echo twig_escape_filter($this->envtwig_length_filter($this->env, (isset($context["menus"]) || array_key_exists("menus"$context) ? $context["menus"] : (function () { throw new RuntimeError('Variable "menus" does not exist.'47$this->source); })())), "html"nulltrue);
  171.         echo "</strong>
  172. \t\t\t\t\t<em>
  173. \t\t\t\t\t\tmenús cerca de ti.
  174. \t\t\t\t\t</em>
  175. \t\t\t\t</p>
  176. \t\t\t</div>
  177. \t\t</section>
  178. \t\t<div class=\"row row-cols-1 row-cols-sm-2 row-cols-md-4 mt-1\">
  179. \t\t\t";
  180.         // line 55
  181.         $context['_parent'] = $context;
  182.         $context['_seq'] = twig_ensure_traversable((isset($context["menus"]) || array_key_exists("menus"$context) ? $context["menus"] : (function () { throw new RuntimeError('Variable "menus" does not exist.'55$this->source); })()));
  183.         $context['loop'] = [
  184.           'parent' => $context['_parent'],
  185.           'index0' => 0,
  186.           'index'  => 1,
  187.           'first'  => true,
  188.         ];
  189.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  190.             $length count($context['_seq']);
  191.             $context['loop']['revindex0'] = $length 1;
  192.             $context['loop']['revindex'] = $length;
  193.             $context['loop']['length'] = $length;
  194.             $context['loop']['last'] = === $length;
  195.         }
  196.         foreach ($context['_seq'] as $context["_key"] => $context["menu"]) {
  197.             // line 56
  198.             echo "\t\t\t\t<div class=\"col my-4\">
  199. \t\t\t\t\t<div class=\"card shadow-sm\">
  200. \t\t\t\t\t\t<div class=\"card-header text-center py-1\">
  201. \t\t\t\t\t\t\t<a class=\"text-decoration-none\" href=\"";
  202.             // line 59
  203.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("showrestaurant", ["restaurante" => twig_lower_filter($this->envtwig_replace_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse59), "nombre", [], "any"falsefalsefalse59), [" " => "-"])), "id" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse59), "id", [], "any"falsefalsefalse59)]), "html"nulltrue);
  204.             echo "\" title=\"";
  205.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse59), "nombre", [], "any"falsefalsefalse59), "html"nulltrue);
  206.             echo "\" target=\"_blank\">
  207. \t\t\t\t\t\t\t\t<em class=\"fw-semibold text-dark-emphasis fs-6\">";
  208.             // line 60
  209.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse60), "nombre", [], "any"falsefalsefalse60), "html"nulltrue);
  210.             echo "</em>
  211. \t\t\t\t\t\t\t</a>
  212. \t\t\t\t\t\t</div>
  213. \t\t\t\t\t\t";
  214.             // line 63
  215.             echo twig_include($this->env$context"default/partials/_carousel.html.twig", ["images" => twig_get_attribute($this->env$this->source$context["menu"], "images", [], "any"falsefalsefalse63), "restaurant" => twig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse63)]);
  216.             echo "
  217. \t\t\t\t\t\t";
  218.             // line 65
  219.             if (((isset($context["latActual"]) || array_key_exists("latActual"$context) ? $context["latActual"] : (function () { throw new RuntimeError('Variable "latActual" does not exist.'65$this->source); })()) && (isset($context["lngActual"]) || array_key_exists("lngActual"$context) ? $context["lngActual"] : (function () { throw new RuntimeError('Variable "lngActual" does not exist.'65$this->source); })()))) {
  220.                 // line 66
  221.                 echo "\t\t\t\t\t\t\t<div class=\"restaurant-km\">
  222. \t\t\t\t\t\t\t\t<small class=\"badge bg-success bg-gradient text-wrap fw-bolder fs-6\">
  223. \t\t\t\t\t\t\t\t\t<em>
  224. \t\t\t\t\t\t\t\t\t\t";
  225.                 // line 69
  226.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse69), "distancia", [], "any"falsefalsefalse69), "html"nulltrue);
  227.                 echo "
  228. \t\t\t\t\t\t\t\t\t\tKm
  229. \t\t\t\t\t\t\t\t\t</em>
  230. \t\t\t\t\t\t\t\t</small>
  231. \t\t\t\t\t\t\t</div>
  232. \t\t\t\t\t\t";
  233.             }
  234.             // line 75
  235.             echo "\t\t\t\t\t\t<div class=\"card-body text-center py-1\">
  236. \t\t\t\t\t\t\t";
  237.             // line 76
  238.             if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse76), "rating", [], "any"falsefalsefalse76)) {
  239.                 // line 77
  240.                 echo "\t\t\t\t\t\t\t\t<div class=\"col-12 text-center\">
  241. \t\t\t\t\t\t\t\t\t<div class=\"float-start badge bg-primary text-wrap fw-bold fs-6\">
  242. \t\t\t\t\t\t\t\t\t\t";
  243.                 // line 79
  244.                 echo twig_escape_filter($this->envtwig_number_format_filter($this->envtwig_get_attribute($this->env$this->source$context["menu"], "precio", [], "any"falsefalsefalse79), 1"."","), "html"nulltrue);
  245.                 echo "€
  246. \t\t\t\t\t\t\t\t\t</div>
  247. \t\t\t\t\t\t\t\t\t<div class=\"float-end\">
  248. \t\t\t\t\t\t\t\t\t\t";
  249.                 // line 82
  250.                 $context["rating"] = twig_split_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse82), "rating", [], "any"falsefalsefalse82), ".");
  251.                 // line 83
  252.                 echo "\t\t\t\t\t\t\t\t\t\t";
  253.                 $context['_parent'] = $context;
  254.                 $context['_seq'] = twig_ensure_traversable(range(1twig_get_attribute($this->env$this->source, (isset($context["rating"]) || array_key_exists("rating"$context) ? $context["rating"] : (function () { throw new RuntimeError('Variable "rating" does not exist.'83$this->source); })()), 0, [], "array"falsefalsefalse83)));
  255.                 foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  256.                     // line 84
  257.                     echo "\t\t\t\t\t\t\t\t\t\t\t<i class=\"text-warning fa fa-star\"></i>
  258. \t\t\t\t\t\t\t\t\t\t";
  259.                 }
  260.                 $_parent $context['_parent'];
  261.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  262.                 $context array_intersect_key($context$_parent) + $_parent;
  263.                 // line 86
  264.                 echo "\t\t\t\t\t\t\t\t\t\t";
  265.                 if (twig_get_attribute($this->env$this->source, ($context["rating"] ?? null), 1, [], "array"truetruefalse86)) {
  266.                     // line 87
  267.                     echo "\t\t\t\t\t\t\t\t\t\t\t<i class=\"text-warning fa fa-star-half\"></i>
  268. \t\t\t\t\t\t\t\t\t\t";
  269.                 }
  270.                 // line 89
  271.                 echo "\t\t\t\t\t\t\t\t\t\t";
  272.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse89), "rating", [], "any"falsefalsefalse89), "html"nulltrue);
  273.                 echo "
  274. \t\t\t\t\t\t\t\t\t</div>
  275. \t\t\t\t\t\t\t\t</div>
  276. \t\t\t\t\t\t\t";
  277.             } else {
  278.                 // line 93
  279.                 echo "\t\t\t\t\t\t\t\t<div class=\"col-12 text-center\">
  280. \t\t\t\t\t\t\t\t\t<div class=\"float-start badge bg-primary text-wrap fw-bold fs-6\">
  281. \t\t\t\t\t\t\t\t\t\t";
  282.                 // line 95
  283.                 echo twig_escape_filter($this->envtwig_number_format_filter($this->envtwig_get_attribute($this->env$this->source$context["menu"], "precio", [], "any"falsefalsefalse95), 1"."","), "html"nulltrue);
  284.                 echo "€
  285. \t\t\t\t\t\t\t\t\t</div>
  286. \t\t\t\t\t\t\t\t\t<span class=\"float-end fw-lighter fst-italic\">
  287. \t\t\t\t\t\t\t\t\t\tSin puntuar</span>
  288. \t\t\t\t\t\t\t\t</div>
  289. \t\t\t\t\t\t\t";
  290.             }
  291.             // line 101
  292.             echo "\t\t\t\t\t\t</div>
  293. \t\t\t\t\t\t<div class=\"card-footer d-flex justify-content-between align-items-center text-center\">
  294. \t\t\t\t\t\t\t<a href=\"whatsapp://send?text=";
  295.             // line 103
  296.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("showrestaurant", ["restaurante" => twig_lower_filter($this->envtwig_replace_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse103), "nombre", [], "any"falsefalsefalse103), [" " => "-"])), "id" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse103), "id", [], "any"falsefalsefalse103)]), "html"nulltrue);
  297.             echo "\" data-action=\"share/whatsapp/share\">
  298. \t\t\t\t\t\t\t\t<i class=\"fas fa-share-alt mx-3\"></i>
  299. \t\t\t\t\t\t\t</a>
  300. \t\t\t\t\t\t\t";
  301.             // line 106
  302.             if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse106), "telefono", [], "any"falsefalsefalse106)) {
  303.                 // line 107
  304.                 echo "\t\t\t\t\t\t\t\t<a href=\"tel:";
  305.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse107), "telefono", [], "any"falsefalsefalse107), "html"nulltrue);
  306.                 echo "\" title=\"";
  307.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse107), "telefono", [], "any"falsefalsefalse107), "html"nulltrue);
  308.                 echo "\">
  309. \t\t\t\t\t\t\t\t\t<i class=\"fa fa-phone mx-3\"></i>
  310. \t\t\t\t\t\t\t\t</a>
  311. \t\t\t\t\t\t\t";
  312.             }
  313.             // line 111
  314.             echo "\t\t\t\t\t\t\t";
  315.             if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse111), "lat", [], "any"falsefalsefalse111) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse111), "lng", [], "any"falsefalsefalse111))) {
  316.                 // line 112
  317.                 echo "\t\t\t\t\t\t\t\t<a href=\"https://www.google.es/maps/dir//";
  318.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse112), "lat", [], "any"falsefalsefalse112), "html"nulltrue);
  319.                 echo "+";
  320.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["menu"], "restaurante", [], "any"falsefalsefalse112), "lng", [], "any"falsefalsefalse112), "html"nulltrue);
  321.                 echo "\" target=\"_blank\">
  322. \t\t\t\t\t\t\t\t\t<i class=\"fa fa-map-marker m-3\" aria-hidden=\"true\"></i>
  323. \t\t\t\t\t\t\t\t</a>
  324. \t\t\t\t\t\t\t";
  325.             }
  326.             // line 116
  327.             echo "\t\t\t\t\t\t</div>
  328. \t\t\t\t\t</div>
  329. \t\t\t\t</div>
  330. \t\t\t";
  331.             ++$context['loop']['index0'];
  332.             ++$context['loop']['index'];
  333.             $context['loop']['first'] = false;
  334.             if (isset($context['loop']['length'])) {
  335.                 --$context['loop']['revindex0'];
  336.                 --$context['loop']['revindex'];
  337.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  338.             }
  339.         }
  340.         $_parent $context['_parent'];
  341.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['menu'], $context['_parent'], $context['loop']);
  342.         $context array_intersect_key($context$_parent) + $_parent;
  343.         // line 120
  344.         echo "\t\t</div>
  345. \t</div>
  346. \t<div class=\"modal\" id=\"imagemodal\" tabindex=\"-1\">
  347. \t\t<div class=\"modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable\">
  348. \t\t\t<div class=\"modal-content\">
  349. \t\t\t\t<div class=\"modal-header\">
  350. \t\t\t\t\t<h6 class=\"nombre\"></h6>
  351. \t\t\t\t\t<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>
  352. \t\t\t\t</div>
  353. \t\t\t\t<div class=\"modal-body\">
  354. \t\t\t\t\t<img src=\"\" class=\"imagepreview\" style=\"width: 100%;\">
  355. \t\t\t\t</div>
  356. \t\t\t</div>
  357. \t\t</div>
  358. \t</div>
  359. ";
  360.         
  361.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  362.         
  363.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  364.     }
  365.     // line 136
  366.     public function block_postjavascripts($context, array $blocks = [])
  367.     {
  368.         $macros $this->macros;
  369.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  370.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""postjavascripts"));
  371.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  372.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""postjavascripts"));
  373.         // line 137
  374.         echo "\t";
  375.         $this->displayParentBlock("postjavascripts"$context$blocks);
  376.         echo "
  377. \t<!-- parse-ignore-start -->
  378. \t<script>
  379. \t\t\$(document).ready(function () {
  380. \t\t\t\$('.zoom').on('click', function () {
  381. \t\t\t\t\$(\".nombre\").html(\$(this).attr('restaurante'));
  382. \t\t\t\t\$('.imagepreview').attr('src', \$(this).attr('src'));
  383. \t\t\t\t\$('#imagemodal').modal('show');
  384. \t\t\t});
  385. \t\t\tconst tooltipTriggerList = document.querySelectorAll('[data-bs-toggle=\"tooltip\"]')
  386. \t\t\tconst tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
  387. \t\t\tif (!\$(\"input[name='latActual']\").val() && !\$(\"input[name='lngActual']\").val()) {
  388. \t\t\t\tif (navigator.geolocation) {
  389. \t\t\t\t\tnavigator.geolocation.getCurrentPosition(showPosition);
  390. \t\t\t\t} else {
  391. \t\t\t\t\tconsole.log(\"Geolocation is not supported by this browser.\");
  392. \t\t\t\t}
  393. \t\t\t}
  394. \t\t\t
  395. \t\t\t\$(\".js-range-precio\").ionRangeSlider({
  396. \t\t\t\tskin: \"round\",
  397. \t\t\t\tstep: 5,
  398. \t\t\t\tgrid: true,
  399. \t\t\t\tmin: 0,
  400. \t\t\t\tmax: 50,
  401. \t\t\t\tfrom: ";
  402.         // line 166
  403.         echo twig_escape_filter($this->env, (isset($context["precioMax"]) || array_key_exists("precioMax"$context) ? $context["precioMax"] : (function () { throw new RuntimeError('Variable "precioMax" does not exist.'166$this->source); })()), "html"nulltrue);
  404.         echo ",
  405. \t\t\t\tprefix: \"€\",
  406. \t\t\t\tonFinish: function (data) {
  407. \t\t\t\t\t\$(\"form\").submit();
  408. \t\t\t\t}
  409.             });
  410. \t\t\t\$(\".js-range-distancia\").ionRangeSlider({
  411. \t\t\t\tskin: \"round\",
  412.           \t\tstep: 5,
  413. \t\t\t\tgrid: true,
  414. \t\t\t\tmin: 0,
  415. \t\t\t\tmax: 50,
  416. \t\t\t\tfrom: ";
  417.         // line 179
  418.         echo twig_escape_filter($this->env, (isset($context["distanciaMax"]) || array_key_exists("distanciaMax"$context) ? $context["distanciaMax"] : (function () { throw new RuntimeError('Variable "distanciaMax" does not exist.'179$this->source); })()), "html"nulltrue);
  419.         echo ",
  420. \t\t\t\tprefix: \"Km\",
  421. \t\t\t\tonFinish: function (data) {
  422. \t\t\t\t\t\$(\"form\").submit();
  423. \t\t\t\t}
  424. \t\t\t});
  425. \t\t\tfunction showPosition(position) {
  426. \t\t\t\t\$(\"input[name='latActual']\").val(position.coords.latitude);
  427. \t\t\t\t\$(\"input[name='lngActual']\").val(position.coords.longitude);
  428. \t\t\t\t\$(\"form\").submit();
  429. \t\t\t}
  430. \t\t});
  431. \t</script>
  432.     <!-- parse-ignore-end -->
  433. ";
  434.         
  435.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  436.         
  437.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  438.     }
  439.     public function getTemplateName()
  440.     {
  441.         return "default/menus.html.twig";
  442.     }
  443.     public function isTraitable()
  444.     {
  445.         return false;
  446.     }
  447.     public function getDebugInfo()
  448.     {
  449.         return array (  463 => 179,  447 => 166,  414 => 137,  404 => 136,  379 => 120,  362 => 116,  352 => 112,  349 => 111,  339 => 107,  337 => 106,  331 => 103,  327 => 101,  318 => 95,  314 => 93,  306 => 89,  302 => 87,  299 => 86,  292 => 84,  287 => 83,  285 => 82,  279 => 79,  275 => 77,  273 => 76,  270 => 75,  261 => 69,  256 => 66,  254 => 65,  249 => 63,  243 => 60,  237 => 59,  232 => 56,  215 => 55,  204 => 47,  194 => 40,  190 => 39,  173 => 25,  169 => 23,  159 => 22,  139 => 19,  125 => 15,  115 => 14,  101 => 11,  91 => 10,  77 => 6,  73 => 4,  63 => 3,  40 => 1,);
  450.     }
  451.     public function getSourceContext()
  452.     {
  453.         return new Source("{% extends 'base.html.twig' %}
  454. {% block metas %}
  455. \t<meta name=\"description\" content=\"Encuentra los mejores menús cerca de ti.\">
  456. \t<meta property=\"og:title\" content=\"Menu del dia\"/>
  457. \t<meta property=\"og:url\" content=\"{{ url(app.request.attributes.get(\"_route\"), app.request.attributes.get(\"_route_params\")) }}\"/>
  458. \t<meta property=\"og:description\" content=\"Encuentra los mejores menús cerca de ti.\">
  459. \t<meta property=\"og:image\" itemprop=\"image\" content=\"https://menusdeldia.com/uploads/menu.jpg\">
  460. {% endblock %}
  461. {% block stylesheets %}
  462. \t{{ parent() }}
  463. \t<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/css/ion.rangeSlider.min.css\"/>
  464. {% endblock %}
  465. {% block javascripts %}
  466. \t{{ parent() }}
  467. \t<script src=\"https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/js/ion.rangeSlider.min.js\"></script>
  468. {% endblock %}
  469. {% block title %}Menu del dia
  470. {% endblock %}
  471. {% block body %}
  472. \t<div class=\"container py-3\">
  473. \t\t<section class=\"pb-2 pt-2\">
  474. \t\t\t<form action=\"{{ path('menus') }}\" method=\"post\" role=\"form\" enctype=\"multipart/form-data\" class=\"w-100\">
  475. \t\t\t\t<div class=\"row\">
  476. \t\t\t\t\t<div class='col-md-6 text-center'>
  477. \t\t\t\t\t\t<h6>
  478. \t\t\t\t\t\t\t<small>Precio</small>
  479. \t\t\t\t\t\t</h6>
  480. \t\t\t\t\t\t<input type=\"text\" class=\"js-range-precio\" name=\"precioMax\" value=\"\"/>
  481. \t\t\t\t\t</div>
  482. \t\t\t\t\t<div class='col-md-6 text-center'>
  483. \t\t\t\t\t\t<h6>
  484. \t\t\t\t\t\t\t<small>Distancia</small>
  485. \t\t\t\t\t\t</h6>
  486. \t\t\t\t\t\t<input type=\"text\" class=\"js-range-distancia\" name=\"distanciaMax\" value=\"\"/>
  487. \t\t\t\t\t</div>
  488. \t\t\t\t\t<input name=\"latActual\" type=\"hidden\" value=\"{{ latActual }}\">
  489. \t\t\t\t\t<input name=\"lngActual\" type=\"hidden\" value=\"{{ lngActual }}\">
  490. \t\t\t\t</div>
  491. \t\t\t</form>
  492. \t\t\t<div class=\"row text-center mt-2\">
  493. \t\t\t\t<p>
  494. \t\t\t\t\t<em>Se han encontrado
  495. \t\t\t\t\t</em>
  496. \t\t\t\t\t<strong>{{ menus|length }}</strong>
  497. \t\t\t\t\t<em>
  498. \t\t\t\t\t\tmenús cerca de ti.
  499. \t\t\t\t\t</em>
  500. \t\t\t\t</p>
  501. \t\t\t</div>
  502. \t\t</section>
  503. \t\t<div class=\"row row-cols-1 row-cols-sm-2 row-cols-md-4 mt-1\">
  504. \t\t\t{% for menu in menus %}
  505. \t\t\t\t<div class=\"col my-4\">
  506. \t\t\t\t\t<div class=\"card shadow-sm\">
  507. \t\t\t\t\t\t<div class=\"card-header text-center py-1\">
  508. \t\t\t\t\t\t\t<a class=\"text-decoration-none\" href=\"{{ path('showrestaurant' , { 'restaurante': menu.restaurante.nombre|replace({' ': '-'})|lower, 'id': menu.restaurante.id }) }}\" title=\"{{ menu.restaurante.nombre }}\" target=\"_blank\">
  509. \t\t\t\t\t\t\t\t<em class=\"fw-semibold text-dark-emphasis fs-6\">{{ menu.restaurante.nombre }}</em>
  510. \t\t\t\t\t\t\t</a>
  511. \t\t\t\t\t\t</div>
  512. \t\t\t\t\t\t{{ include('default/partials/_carousel.html.twig', { 'images': menu.images , 'restaurant' : menu.restaurante}) }}
  513. \t\t\t\t\t\t{% if latActual and lngActual %}
  514. \t\t\t\t\t\t\t<div class=\"restaurant-km\">
  515. \t\t\t\t\t\t\t\t<small class=\"badge bg-success bg-gradient text-wrap fw-bolder fs-6\">
  516. \t\t\t\t\t\t\t\t\t<em>
  517. \t\t\t\t\t\t\t\t\t\t{{ menu.restaurante.distancia }}
  518. \t\t\t\t\t\t\t\t\t\tKm
  519. \t\t\t\t\t\t\t\t\t</em>
  520. \t\t\t\t\t\t\t\t</small>
  521. \t\t\t\t\t\t\t</div>
  522. \t\t\t\t\t\t{% endif %}
  523. \t\t\t\t\t\t<div class=\"card-body text-center py-1\">
  524. \t\t\t\t\t\t\t{% if menu.restaurante.rating %}
  525. \t\t\t\t\t\t\t\t<div class=\"col-12 text-center\">
  526. \t\t\t\t\t\t\t\t\t<div class=\"float-start badge bg-primary text-wrap fw-bold fs-6\">
  527. \t\t\t\t\t\t\t\t\t\t{{ menu.precio|number_format(1, '.', ',') }}€
  528. \t\t\t\t\t\t\t\t\t</div>
  529. \t\t\t\t\t\t\t\t\t<div class=\"float-end\">
  530. \t\t\t\t\t\t\t\t\t\t{% set rating = menu.restaurante.rating|split('.') %}
  531. \t\t\t\t\t\t\t\t\t\t{% for i in 1..rating[0] %}
  532. \t\t\t\t\t\t\t\t\t\t\t<i class=\"text-warning fa fa-star\"></i>
  533. \t\t\t\t\t\t\t\t\t\t{% endfor %}
  534. \t\t\t\t\t\t\t\t\t\t{% if rating[1] is defined %}
  535. \t\t\t\t\t\t\t\t\t\t\t<i class=\"text-warning fa fa-star-half\"></i>
  536. \t\t\t\t\t\t\t\t\t\t{% endif  %}
  537. \t\t\t\t\t\t\t\t\t\t{{ menu.restaurante.rating }}
  538. \t\t\t\t\t\t\t\t\t</div>
  539. \t\t\t\t\t\t\t\t</div>
  540. \t\t\t\t\t\t\t{% else %}
  541. \t\t\t\t\t\t\t\t<div class=\"col-12 text-center\">
  542. \t\t\t\t\t\t\t\t\t<div class=\"float-start badge bg-primary text-wrap fw-bold fs-6\">
  543. \t\t\t\t\t\t\t\t\t\t{{ menu.precio|number_format(1, '.', ',') }}€
  544. \t\t\t\t\t\t\t\t\t</div>
  545. \t\t\t\t\t\t\t\t\t<span class=\"float-end fw-lighter fst-italic\">
  546. \t\t\t\t\t\t\t\t\t\tSin puntuar</span>
  547. \t\t\t\t\t\t\t\t</div>
  548. \t\t\t\t\t\t\t{% endif %}
  549. \t\t\t\t\t\t</div>
  550. \t\t\t\t\t\t<div class=\"card-footer d-flex justify-content-between align-items-center text-center\">
  551. \t\t\t\t\t\t\t<a href=\"whatsapp://send?text={{url('showrestaurant',{'restaurante' : menu.restaurante.nombre|replace({' ': '-'})|lower, 'id' : menu.restaurante.id})}}\" data-action=\"share/whatsapp/share\">
  552. \t\t\t\t\t\t\t\t<i class=\"fas fa-share-alt mx-3\"></i>
  553. \t\t\t\t\t\t\t</a>
  554. \t\t\t\t\t\t\t{% if menu.restaurante.telefono %}
  555. \t\t\t\t\t\t\t\t<a href=\"tel:{{ menu.restaurante.telefono }}\" title=\"{{ menu.restaurante.telefono }}\">
  556. \t\t\t\t\t\t\t\t\t<i class=\"fa fa-phone mx-3\"></i>
  557. \t\t\t\t\t\t\t\t</a>
  558. \t\t\t\t\t\t\t{% endif %}
  559. \t\t\t\t\t\t\t{% if menu.restaurante.lat and menu.restaurante.lng %}
  560. \t\t\t\t\t\t\t\t<a href=\"https://www.google.es/maps/dir//{{ menu.restaurante.lat }}+{{ menu.restaurante.lng }}\" target=\"_blank\">
  561. \t\t\t\t\t\t\t\t\t<i class=\"fa fa-map-marker m-3\" aria-hidden=\"true\"></i>
  562. \t\t\t\t\t\t\t\t</a>
  563. \t\t\t\t\t\t\t{% endif %}
  564. \t\t\t\t\t\t</div>
  565. \t\t\t\t\t</div>
  566. \t\t\t\t</div>
  567. \t\t\t{% endfor %}
  568. \t\t</div>
  569. \t</div>
  570. \t<div class=\"modal\" id=\"imagemodal\" tabindex=\"-1\">
  571. \t\t<div class=\"modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable\">
  572. \t\t\t<div class=\"modal-content\">
  573. \t\t\t\t<div class=\"modal-header\">
  574. \t\t\t\t\t<h6 class=\"nombre\"></h6>
  575. \t\t\t\t\t<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>
  576. \t\t\t\t</div>
  577. \t\t\t\t<div class=\"modal-body\">
  578. \t\t\t\t\t<img src=\"\" class=\"imagepreview\" style=\"width: 100%;\">
  579. \t\t\t\t</div>
  580. \t\t\t</div>
  581. \t\t</div>
  582. \t</div>
  583. {% endblock %}
  584. {% block postjavascripts %}
  585. \t{{ parent() }}
  586. \t<!-- parse-ignore-start -->
  587. \t<script>
  588. \t\t\$(document).ready(function () {
  589. \t\t\t\$('.zoom').on('click', function () {
  590. \t\t\t\t\$(\".nombre\").html(\$(this).attr('restaurante'));
  591. \t\t\t\t\$('.imagepreview').attr('src', \$(this).attr('src'));
  592. \t\t\t\t\$('#imagemodal').modal('show');
  593. \t\t\t});
  594. \t\t\tconst tooltipTriggerList = document.querySelectorAll('[data-bs-toggle=\"tooltip\"]')
  595. \t\t\tconst tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
  596. \t\t\tif (!\$(\"input[name='latActual']\").val() && !\$(\"input[name='lngActual']\").val()) {
  597. \t\t\t\tif (navigator.geolocation) {
  598. \t\t\t\t\tnavigator.geolocation.getCurrentPosition(showPosition);
  599. \t\t\t\t} else {
  600. \t\t\t\t\tconsole.log(\"Geolocation is not supported by this browser.\");
  601. \t\t\t\t}
  602. \t\t\t}
  603. \t\t\t
  604. \t\t\t\$(\".js-range-precio\").ionRangeSlider({
  605. \t\t\t\tskin: \"round\",
  606. \t\t\t\tstep: 5,
  607. \t\t\t\tgrid: true,
  608. \t\t\t\tmin: 0,
  609. \t\t\t\tmax: 50,
  610. \t\t\t\tfrom: {{ precioMax }},
  611. \t\t\t\tprefix: \"€\",
  612. \t\t\t\tonFinish: function (data) {
  613. \t\t\t\t\t\$(\"form\").submit();
  614. \t\t\t\t}
  615.             });
  616. \t\t\t\$(\".js-range-distancia\").ionRangeSlider({
  617. \t\t\t\tskin: \"round\",
  618.           \t\tstep: 5,
  619. \t\t\t\tgrid: true,
  620. \t\t\t\tmin: 0,
  621. \t\t\t\tmax: 50,
  622. \t\t\t\tfrom: {{ distanciaMax }},
  623. \t\t\t\tprefix: \"Km\",
  624. \t\t\t\tonFinish: function (data) {
  625. \t\t\t\t\t\$(\"form\").submit();
  626. \t\t\t\t}
  627. \t\t\t});
  628. \t\t\tfunction showPosition(position) {
  629. \t\t\t\t\$(\"input[name='latActual']\").val(position.coords.latitude);
  630. \t\t\t\t\$(\"input[name='lngActual']\").val(position.coords.longitude);
  631. \t\t\t\t\$(\"form\").submit();
  632. \t\t\t}
  633. \t\t});
  634. \t</script>
  635.     <!-- parse-ignore-end -->
  636. {% endblock %}
  637. ""default/menus.html.twig""/var/www/vhosts/menusdeldia.com/httpdocs/templates/default/menus.html.twig");
  638.     }
  639. }