var/cache/dev/twig/c2/c23efa20bc3f9f7a693ce09b880eba4d.php line 204

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/restaurants.html.twig */
  14. class __TwigTemplate_d0500b8e5e851b24815fd4fb06265412 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/restaurants.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/restaurants.html.twig"));
  43.         $this->parent $this->loadTemplate("base.html.twig""default/restaurants.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 "Restaurantes
  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("restaurants");
  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["restaurants"]) || array_key_exists("restaurants"$context) ? $context["restaurants"] : (function () { throw new RuntimeError('Variable "restaurants" does not exist.'47$this->source); })())), "html"nulltrue);
  171.         echo "</strong>
  172. \t\t\t\t\t<em>
  173. \t\t\t\t\t\trestaurantes 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["restaurants"]) || array_key_exists("restaurants"$context) ? $context["restaurants"] : (function () { throw new RuntimeError('Variable "restaurants" does not exist.'55$this->source); })()));
  183.         foreach ($context['_seq'] as $context["_key"] => $context["restaurant"]) {
  184.             // line 56
  185.             echo "\t\t\t\t<div class=\"col my-4\">
  186. \t\t\t\t\t<div class=\"card shadow-sm\">
  187. \t\t\t\t\t\t<div class=\"card-header text-center py-1\">
  188. \t\t\t\t\t\t\t<a class=\"text-decoration-none\" href=\"";
  189.             // line 59
  190.             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->source$context["restaurant"], "nombre", [], "any"falsefalsefalse59), [" " => "-"])), "id" => twig_get_attribute($this->env$this->source$context["restaurant"], "id", [], "any"falsefalsefalse59)]), "html"nulltrue);
  191.             echo "\" title=\"";
  192.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "nombre", [], "any"falsefalsefalse59), "html"nulltrue);
  193.             echo "\" target=\"_blank\">
  194. \t\t\t\t\t\t\t\t<em class=\"fw-semibold text-dark-emphasis fs-6\">";
  195.             // line 60
  196.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "nombre", [], "any"falsefalsefalse60), "html"nulltrue);
  197.             echo "</em>
  198. \t\t\t\t\t\t\t</a>
  199. \t\t\t\t\t\t</div>
  200. \t\t\t\t\t\t<a class=\"text-decoration-none\" href=\"";
  201.             // line 63
  202.             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->source$context["restaurant"], "nombre", [], "any"falsefalsefalse63), [" " => "-"])), "id" => twig_get_attribute($this->env$this->source$context["restaurant"], "id", [], "any"falsefalsefalse63)]), "html"nulltrue);
  203.             echo "\" title=\"";
  204.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "nombre", [], "any"falsefalsefalse63), "html"nulltrue);
  205.             echo "\" target=\"_blank\">
  206. \t\t\t\t\t\t\t";
  207.             // line 64
  208.             if (twig_length_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "images", [], "any"falsefalsefalse64))) {
  209.                 // line 65
  210.                 echo "\t\t\t\t\t\t\t\t<img class=\"bd-placeholder-img card-img-top\" width=\"100%\" height=\"200\" src=\"/uploads/images/";
  211.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["restaurant"], "images", [], "any"falsefalsefalse65), 0, [], "array"falsefalsefalse65), "filePath", [], "any"falsefalsefalse65), "html"nulltrue);
  212.                 echo "\" title=\"Menu diario de ";
  213.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "nombre", [], "any"falsefalsefalse65), "html"nulltrue);
  214.                 echo "\" alt=\"Menu diario de ";
  215.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "nombre", [], "any"falsefalsefalse65), "html"nulltrue);
  216.                 echo "\" restaurante=\"";
  217.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "nombre", [], "any"falsefalsefalse65), "html"nulltrue);
  218.                 echo "\">
  219. \t\t\t\t\t\t\t";
  220.             } else {
  221.                 // line 67
  222.                 echo "\t\t\t\t\t\t\t\t<img class=\"bd-placeholder-img card-img-top\" width=\"100%\" height=\"200\" src=\"/img/default-restaurant.webp\" title=\"Menu diario de ";
  223.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "nombre", [], "any"falsefalsefalse67), "html"nulltrue);
  224.                 echo "\" alt=\"Menu diario de ";
  225.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "nombre", [], "any"falsefalsefalse67), "html"nulltrue);
  226.                 echo "\" restaurante=\"";
  227.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "nombre", [], "any"falsefalsefalse67), "html"nulltrue);
  228.                 echo "\">
  229. \t\t\t\t\t\t\t";
  230.             }
  231.             // line 69
  232.             echo "\t\t\t\t\t\t</a>
  233. \t\t\t\t\t\t";
  234.             // line 70
  235.             if (((isset($context["latActual"]) || array_key_exists("latActual"$context) ? $context["latActual"] : (function () { throw new RuntimeError('Variable "latActual" does not exist.'70$this->source); })()) && (isset($context["lngActual"]) || array_key_exists("lngActual"$context) ? $context["lngActual"] : (function () { throw new RuntimeError('Variable "lngActual" does not exist.'70$this->source); })()))) {
  236.                 // line 71
  237.                 echo "\t\t\t\t\t\t\t<div class=\"restaurant-km\">
  238. \t\t\t\t\t\t\t\t<small class=\"badge bg-success bg-gradient text-wrap fw-bolder fs-6\">
  239. \t\t\t\t\t\t\t\t\t<em>
  240. \t\t\t\t\t\t\t\t\t\t";
  241.                 // line 74
  242.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "distancia", [], "any"falsefalsefalse74), "html"nulltrue);
  243.                 echo "
  244. \t\t\t\t\t\t\t\t\t\tKm
  245. \t\t\t\t\t\t\t\t\t</em>
  246. \t\t\t\t\t\t\t\t</small>
  247. \t\t\t\t\t\t\t</div>
  248. \t\t\t\t\t\t";
  249.             }
  250.             // line 80
  251.             echo "\t\t\t\t\t\t<div class=\"card-body text-center py-1\">
  252. \t\t\t\t\t\t\t";
  253.             // line 81
  254.             if (twig_get_attribute($this->env$this->source$context["restaurant"], "rating", [], "any"falsefalsefalse81)) {
  255.                 // line 82
  256.                 echo "\t\t\t\t\t\t\t\t<div class=\"col-12 text-center\">
  257. \t\t\t\t\t\t\t\t\t";
  258.                 // line 83
  259.                 $context["rating"] = twig_split_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "rating", [], "any"falsefalsefalse83), ".");
  260.                 // line 84
  261.                 echo "\t\t\t\t\t\t\t\t\t";
  262.                 $context['_parent'] = $context;
  263.                 $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.'84$this->source); })()), 0, [], "array"falsefalsefalse84)));
  264.                 foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  265.                     // line 85
  266.                     echo "\t\t\t\t\t\t\t\t\t\t<i class=\"text-warning fa fa-star\"></i>
  267. \t\t\t\t\t\t\t\t\t";
  268.                 }
  269.                 $_parent $context['_parent'];
  270.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  271.                 $context array_intersect_key($context$_parent) + $_parent;
  272.                 // line 87
  273.                 echo "\t\t\t\t\t\t\t\t\t";
  274.                 if (twig_get_attribute($this->env$this->source, ($context["rating"] ?? null), 1, [], "array"truetruefalse87)) {
  275.                     // line 88
  276.                     echo "\t\t\t\t\t\t\t\t\t\t<i class=\"text-warning fa fa-star-half\"></i>
  277. \t\t\t\t\t\t\t\t\t";
  278.                 }
  279.                 // line 90
  280.                 echo "\t\t\t\t\t\t\t\t\t";
  281.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "rating", [], "any"falsefalsefalse90), "html"nulltrue);
  282.                 echo "
  283. \t\t\t\t\t\t\t\t</div>
  284. \t\t\t\t\t\t\t";
  285.             } else {
  286.                 // line 93
  287.                 echo "\t\t\t\t\t\t\t\t<div class=\"col-12 text-center fw-lighter fst-italic\">Sin puntuar</div>
  288. \t\t\t\t\t\t\t";
  289.             }
  290.             // line 95
  291.             echo "\t\t\t\t\t\t</div>
  292. \t\t\t\t\t\t<div class=\"card-footer d-flex justify-content-between align-items-center text-center\">
  293. \t\t\t\t\t\t\t<a class=\"text-decoration-none\" href=\"";
  294.             // line 97
  295.             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->source$context["restaurant"], "nombre", [], "any"falsefalsefalse97), [" " => "-"])), "id" => twig_get_attribute($this->env$this->source$context["restaurant"], "id", [], "any"falsefalsefalse97)]), "html"nulltrue);
  296.             echo "\" title=\"Ver menus de ";
  297.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "nombre", [], "any"falsefalsefalse97), "html"nulltrue);
  298.             echo "\" target=\"_blank\">
  299. \t\t\t\t\t\t\t\t<i class=\"fas fa-file mx-3\"></i>
  300. \t\t\t\t\t\t\t</a>
  301. \t\t\t\t\t\t\t<a href=\"whatsapp://send?text=";
  302.             // line 100
  303.             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->source$context["restaurant"], "nombre", [], "any"falsefalsefalse100), [" " => "-"])), "id" => twig_get_attribute($this->env$this->source$context["restaurant"], "id", [], "any"falsefalsefalse100)]), "html"nulltrue);
  304.             echo "\" data-action=\"share/whatsapp/share\">
  305. \t\t\t\t\t\t\t\t<i class=\"fas fa-share-alt mx-3\"></i>
  306. \t\t\t\t\t\t\t</a>
  307. \t\t\t\t\t\t\t";
  308.             // line 103
  309.             if (twig_get_attribute($this->env$this->source$context["restaurant"], "telefono", [], "any"falsefalsefalse103)) {
  310.                 // line 104
  311.                 echo "\t\t\t\t\t\t\t\t<a href=\"tel:";
  312.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "telefono", [], "any"falsefalsefalse104), "html"nulltrue);
  313.                 echo "\" title=\"";
  314.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "telefono", [], "any"falsefalsefalse104), "html"nulltrue);
  315.                 echo "\">
  316. \t\t\t\t\t\t\t\t\t<i class=\"fa fa-phone mx-3\"></i>
  317. \t\t\t\t\t\t\t\t</a>
  318. \t\t\t\t\t\t\t";
  319.             }
  320.             // line 108
  321.             echo "\t\t\t\t\t\t\t";
  322.             if ((twig_get_attribute($this->env$this->source$context["restaurant"], "lat", [], "any"falsefalsefalse108) && twig_get_attribute($this->env$this->source$context["restaurant"], "lng", [], "any"falsefalsefalse108))) {
  323.                 // line 109
  324.                 echo "\t\t\t\t\t\t\t\t<a href=\"https://www.google.es/maps/dir//";
  325.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "lat", [], "any"falsefalsefalse109), "html"nulltrue);
  326.                 echo "+";
  327.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["restaurant"], "lng", [], "any"falsefalsefalse109), "html"nulltrue);
  328.                 echo "\" target=\"_blank\">
  329. \t\t\t\t\t\t\t\t\t<i class=\"fa fa-map-marker m-3\" aria-hidden=\"true\"></i>
  330. \t\t\t\t\t\t\t\t</a>
  331. \t\t\t\t\t\t\t";
  332.             }
  333.             // line 113
  334.             echo "\t\t\t\t\t\t</div>
  335. \t\t\t\t\t</div>
  336. \t\t\t\t</div>
  337. \t\t\t";
  338.         }
  339.         $_parent $context['_parent'];
  340.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['restaurant'], $context['_parent'], $context['loop']);
  341.         $context array_intersect_key($context$_parent) + $_parent;
  342.         // line 117
  343.         echo "\t\t</div>
  344. \t</div>\t
  345. ";
  346.         
  347.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  348.         
  349.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  350.     }
  351.     // line 120
  352.     public function block_postjavascripts($context, array $blocks = [])
  353.     {
  354.         $macros $this->macros;
  355.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  356.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""postjavascripts"));
  357.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  358.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""postjavascripts"));
  359.         // line 121
  360.         echo "\t";
  361.         $this->displayParentBlock("postjavascripts"$context$blocks);
  362.         echo "
  363. \t<!-- parse-ignore-start -->
  364. \t<script>
  365. \t\t\$(document).ready(function () {
  366. \t\t\tconst tooltipTriggerList = document.querySelectorAll('[data-bs-toggle=\"tooltip\"]')
  367. \t\t\tconst tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
  368. \t\t\tif (!\$(\"input[name='latActual']\").val() && !\$(\"input[name='lngActual']\").val()) {
  369. \t\t\t\tif (navigator.geolocation) {
  370. \t\t\t\t\tnavigator.geolocation.getCurrentPosition(showPosition);
  371. \t\t\t\t} else {
  372. \t\t\t\t\tconsole.log(\"Geolocation is not supported by this browser.\");
  373. \t\t\t\t}
  374. \t\t\t}
  375. \t\t\t
  376. \t\t\t\$(\".js-range-precio\").ionRangeSlider({
  377. \t\t\t\tskin: \"round\",
  378. \t\t\t\tstep: 5,
  379. \t\t\t\tgrid: true,
  380. \t\t\t\tmin: 0,
  381. \t\t\t\tmax: 50,
  382. \t\t\t\tfrom: ";
  383.         // line 143
  384.         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.'143$this->source); })()), "html"nulltrue);
  385.         echo ",
  386. \t\t\t\tprefix: \"€\",
  387. \t\t\t\tonFinish: function (data) {
  388. \t\t\t\t\t\$(\"form\").submit();
  389. \t\t\t\t}
  390.             });
  391. \t\t\t\$(\".js-range-distancia\").ionRangeSlider({
  392. \t\t\t\tskin: \"round\",
  393.           \t\tstep: 5,
  394. \t\t\t\tgrid: true,
  395. \t\t\t\tmin: 0,
  396. \t\t\t\tmax: 50,
  397. \t\t\t\tfrom: ";
  398.         // line 156
  399.         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.'156$this->source); })()), "html"nulltrue);
  400.         echo ",
  401. \t\t\t\tprefix: \"Km\",
  402. \t\t\t\tonFinish: function (data) {
  403. \t\t\t\t\t\$(\"form\").submit();
  404. \t\t\t\t}
  405. \t\t\t});
  406. \t\t\tfunction showPosition(position) {
  407. \t\t\t\t\$(\"input[name='latActual']\").val(position.coords.latitude);
  408. \t\t\t\t\$(\"input[name='lngActual']\").val(position.coords.longitude);
  409. \t\t\t\t\$(\"form\").submit();
  410. \t\t\t}
  411. \t\t});
  412. \t</script>
  413.     <!-- parse-ignore-end -->
  414. ";
  415.         
  416.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  417.         
  418.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  419.     }
  420.     public function getTemplateName()
  421.     {
  422.         return "default/restaurants.html.twig";
  423.     }
  424.     public function isTraitable()
  425.     {
  426.         return false;
  427.     }
  428.     public function getDebugInfo()
  429.     {
  430.         return array (  441 => 156,  425 => 143,  399 => 121,  389 => 120,  377 => 117,  368 => 113,  358 => 109,  355 => 108,  345 => 104,  343 => 103,  337 => 100,  329 => 97,  325 => 95,  321 => 93,  314 => 90,  310 => 88,  307 => 87,  300 => 85,  295 => 84,  293 => 83,  290 => 82,  288 => 81,  285 => 80,  276 => 74,  271 => 71,  269 => 70,  266 => 69,  256 => 67,  244 => 65,  242 => 64,  236 => 63,  230 => 60,  224 => 59,  219 => 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,);
  431.     }
  432.     public function getSourceContext()
  433.     {
  434.         return new Source("{% extends 'base.html.twig' %}
  435. {% block metas %}
  436. \t<meta name=\"description\" content=\"Encuentra los mejores menús cerca de ti.\">
  437. \t<meta property=\"og:title\" content=\"Menu del dia\"/>
  438. \t<meta property=\"og:url\" content=\"{{ url(app.request.attributes.get(\"_route\"), app.request.attributes.get(\"_route_params\")) }}\"/>
  439. \t<meta property=\"og:description\" content=\"Encuentra los mejores menús cerca de ti.\">
  440. \t<meta property=\"og:image\" itemprop=\"image\" content=\"https://menusdeldia.com/uploads/menu.jpg\">
  441. {% endblock %}
  442. {% block stylesheets %}
  443. \t{{ parent() }}
  444. \t<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/css/ion.rangeSlider.min.css\"/>
  445. {% endblock %}
  446. {% block javascripts %}
  447. \t{{ parent() }}
  448. \t<script src=\"https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/js/ion.rangeSlider.min.js\"></script>
  449. {% endblock %}
  450. {% block title %}Restaurantes
  451. {% endblock %}
  452. {% block body %}
  453. \t<div class=\"container py-3\">
  454. \t\t<section class=\"pb-2 pt-2\">
  455. \t\t\t<form action=\"{{ path('restaurants') }}\" method=\"post\" role=\"form\" enctype=\"multipart/form-data\" class=\"w-100\">
  456. \t\t\t\t<div class=\"row\">
  457. \t\t\t\t\t<div class='col-md-6 text-center'>
  458. \t\t\t\t\t\t<h6>
  459. \t\t\t\t\t\t\t<small>Precio</small>
  460. \t\t\t\t\t\t</h6>
  461. \t\t\t\t\t\t<input type=\"text\" class=\"js-range-precio\" name=\"precioMax\" value=\"\"/>
  462. \t\t\t\t\t</div>
  463. \t\t\t\t\t<div class='col-md-6 text-center'>
  464. \t\t\t\t\t\t<h6>
  465. \t\t\t\t\t\t\t<small>Distancia</small>
  466. \t\t\t\t\t\t</h6>
  467. \t\t\t\t\t\t<input type=\"text\" class=\"js-range-distancia\" name=\"distanciaMax\" value=\"\"/>
  468. \t\t\t\t\t</div>
  469. \t\t\t\t\t<input name=\"latActual\" type=\"hidden\" value=\"{{ latActual }}\">
  470. \t\t\t\t\t<input name=\"lngActual\" type=\"hidden\" value=\"{{ lngActual }}\">
  471. \t\t\t\t</div>
  472. \t\t\t</form>
  473. \t\t\t<div class=\"row text-center mt-2\">
  474. \t\t\t\t<p>
  475. \t\t\t\t\t<em>Se han encontrado
  476. \t\t\t\t\t</em>
  477. \t\t\t\t\t<strong>{{ restaurants|length }}</strong>
  478. \t\t\t\t\t<em>
  479. \t\t\t\t\t\trestaurantes cerca de ti.
  480. \t\t\t\t\t</em>
  481. \t\t\t\t</p>
  482. \t\t\t</div>
  483. \t\t</section>
  484. \t\t<div class=\"row row-cols-1 row-cols-sm-2 row-cols-md-4 mt-1\">
  485. \t\t\t{% for restaurant in restaurants %}
  486. \t\t\t\t<div class=\"col my-4\">
  487. \t\t\t\t\t<div class=\"card shadow-sm\">
  488. \t\t\t\t\t\t<div class=\"card-header text-center py-1\">
  489. \t\t\t\t\t\t\t<a class=\"text-decoration-none\" href=\"{{ path('showrestaurant' , { 'restaurante': restaurant.nombre|replace({' ': '-'})|lower, 'id': restaurant.id }) }}\" title=\"{{ restaurant.nombre }}\" target=\"_blank\">
  490. \t\t\t\t\t\t\t\t<em class=\"fw-semibold text-dark-emphasis fs-6\">{{ restaurant.nombre }}</em>
  491. \t\t\t\t\t\t\t</a>
  492. \t\t\t\t\t\t</div>
  493. \t\t\t\t\t\t<a class=\"text-decoration-none\" href=\"{{ path('showrestaurant' , { 'restaurante': restaurant.nombre|replace({' ': '-'})|lower, 'id': restaurant.id }) }}\" title=\"{{ restaurant.nombre }}\" target=\"_blank\">
  494. \t\t\t\t\t\t\t{% if restaurant.images|length  %}
  495. \t\t\t\t\t\t\t\t<img class=\"bd-placeholder-img card-img-top\" width=\"100%\" height=\"200\" src=\"/uploads/images/{{ restaurant.images[0].filePath }}\" title=\"Menu diario de {{restaurant.nombre }}\" alt=\"Menu diario de {{ restaurant.nombre }}\" restaurante=\"{{restaurant.nombre}}\">
  496. \t\t\t\t\t\t\t{% else %}
  497. \t\t\t\t\t\t\t\t<img class=\"bd-placeholder-img card-img-top\" width=\"100%\" height=\"200\" src=\"/img/default-restaurant.webp\" title=\"Menu diario de {{restaurant.nombre }}\" alt=\"Menu diario de {{restaurant.nombre }}\" restaurante=\"{{restaurant.nombre}}\">
  498. \t\t\t\t\t\t\t{% endif %}
  499. \t\t\t\t\t\t</a>
  500. \t\t\t\t\t\t{% if latActual and lngActual %}
  501. \t\t\t\t\t\t\t<div class=\"restaurant-km\">
  502. \t\t\t\t\t\t\t\t<small class=\"badge bg-success bg-gradient text-wrap fw-bolder fs-6\">
  503. \t\t\t\t\t\t\t\t\t<em>
  504. \t\t\t\t\t\t\t\t\t\t{{ restaurant.distancia }}
  505. \t\t\t\t\t\t\t\t\t\tKm
  506. \t\t\t\t\t\t\t\t\t</em>
  507. \t\t\t\t\t\t\t\t</small>
  508. \t\t\t\t\t\t\t</div>
  509. \t\t\t\t\t\t{% endif %}
  510. \t\t\t\t\t\t<div class=\"card-body text-center py-1\">
  511. \t\t\t\t\t\t\t{% if restaurant.rating %}
  512. \t\t\t\t\t\t\t\t<div class=\"col-12 text-center\">
  513. \t\t\t\t\t\t\t\t\t{% set rating = restaurant.rating|split('.') %}
  514. \t\t\t\t\t\t\t\t\t{% for i in 1..rating[0] %}
  515. \t\t\t\t\t\t\t\t\t\t<i class=\"text-warning fa fa-star\"></i>
  516. \t\t\t\t\t\t\t\t\t{% endfor %}
  517. \t\t\t\t\t\t\t\t\t{% if rating[1] is defined %}
  518. \t\t\t\t\t\t\t\t\t\t<i class=\"text-warning fa fa-star-half\"></i>
  519. \t\t\t\t\t\t\t\t\t{% endif  %}
  520. \t\t\t\t\t\t\t\t\t{{ restaurant.rating }}
  521. \t\t\t\t\t\t\t\t</div>
  522. \t\t\t\t\t\t\t{% else %}
  523. \t\t\t\t\t\t\t\t<div class=\"col-12 text-center fw-lighter fst-italic\">Sin puntuar</div>
  524. \t\t\t\t\t\t\t{% endif %}
  525. \t\t\t\t\t\t</div>
  526. \t\t\t\t\t\t<div class=\"card-footer d-flex justify-content-between align-items-center text-center\">
  527. \t\t\t\t\t\t\t<a class=\"text-decoration-none\" href=\"{{ path('showrestaurant' , { 'restaurante': restaurant.nombre|replace({' ': '-'})|lower, 'id': restaurant.id }) }}\" title=\"Ver menus de {{ restaurant.nombre }}\" target=\"_blank\">
  528. \t\t\t\t\t\t\t\t<i class=\"fas fa-file mx-3\"></i>
  529. \t\t\t\t\t\t\t</a>
  530. \t\t\t\t\t\t\t<a href=\"whatsapp://send?text={{url('showrestaurant',{'restaurante' : restaurant.nombre|replace({' ': '-'})|lower, 'id' : restaurant.id})}}\" data-action=\"share/whatsapp/share\">
  531. \t\t\t\t\t\t\t\t<i class=\"fas fa-share-alt mx-3\"></i>
  532. \t\t\t\t\t\t\t</a>
  533. \t\t\t\t\t\t\t{% if restaurant.telefono %}
  534. \t\t\t\t\t\t\t\t<a href=\"tel:{{ restaurant.telefono }}\" title=\"{{ restaurant.telefono }}\">
  535. \t\t\t\t\t\t\t\t\t<i class=\"fa fa-phone mx-3\"></i>
  536. \t\t\t\t\t\t\t\t</a>
  537. \t\t\t\t\t\t\t{% endif %}
  538. \t\t\t\t\t\t\t{% if restaurant.lat and restaurant.lng %}
  539. \t\t\t\t\t\t\t\t<a href=\"https://www.google.es/maps/dir//{{ restaurant.lat }}+{{ restaurant.lng }}\" target=\"_blank\">
  540. \t\t\t\t\t\t\t\t\t<i class=\"fa fa-map-marker m-3\" aria-hidden=\"true\"></i>
  541. \t\t\t\t\t\t\t\t</a>
  542. \t\t\t\t\t\t\t{% endif %}
  543. \t\t\t\t\t\t</div>
  544. \t\t\t\t\t</div>
  545. \t\t\t\t</div>
  546. \t\t\t{% endfor %}
  547. \t\t</div>
  548. \t</div>\t
  549. {% endblock %}
  550. {% block postjavascripts %}
  551. \t{{ parent() }}
  552. \t<!-- parse-ignore-start -->
  553. \t<script>
  554. \t\t\$(document).ready(function () {
  555. \t\t\tconst tooltipTriggerList = document.querySelectorAll('[data-bs-toggle=\"tooltip\"]')
  556. \t\t\tconst tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
  557. \t\t\tif (!\$(\"input[name='latActual']\").val() && !\$(\"input[name='lngActual']\").val()) {
  558. \t\t\t\tif (navigator.geolocation) {
  559. \t\t\t\t\tnavigator.geolocation.getCurrentPosition(showPosition);
  560. \t\t\t\t} else {
  561. \t\t\t\t\tconsole.log(\"Geolocation is not supported by this browser.\");
  562. \t\t\t\t}
  563. \t\t\t}
  564. \t\t\t
  565. \t\t\t\$(\".js-range-precio\").ionRangeSlider({
  566. \t\t\t\tskin: \"round\",
  567. \t\t\t\tstep: 5,
  568. \t\t\t\tgrid: true,
  569. \t\t\t\tmin: 0,
  570. \t\t\t\tmax: 50,
  571. \t\t\t\tfrom: {{ precioMax }},
  572. \t\t\t\tprefix: \"€\",
  573. \t\t\t\tonFinish: function (data) {
  574. \t\t\t\t\t\$(\"form\").submit();
  575. \t\t\t\t}
  576.             });
  577. \t\t\t\$(\".js-range-distancia\").ionRangeSlider({
  578. \t\t\t\tskin: \"round\",
  579.           \t\tstep: 5,
  580. \t\t\t\tgrid: true,
  581. \t\t\t\tmin: 0,
  582. \t\t\t\tmax: 50,
  583. \t\t\t\tfrom: {{ distanciaMax }},
  584. \t\t\t\tprefix: \"Km\",
  585. \t\t\t\tonFinish: function (data) {
  586. \t\t\t\t\t\$(\"form\").submit();
  587. \t\t\t\t}
  588. \t\t\t});
  589. \t\t\tfunction showPosition(position) {
  590. \t\t\t\t\$(\"input[name='latActual']\").val(position.coords.latitude);
  591. \t\t\t\t\$(\"input[name='lngActual']\").val(position.coords.longitude);
  592. \t\t\t\t\$(\"form\").submit();
  593. \t\t\t}
  594. \t\t});
  595. \t</script>
  596.     <!-- parse-ignore-end -->
  597. {% endblock %}
  598. ""default/restaurants.html.twig""/var/www/vhosts/menusdeldia.com/httpdocs/templates/default/restaurants.html.twig");
  599.     }
  600. }