<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* default/restaurants.html.twig */
class __TwigTemplate_d0500b8e5e851b24815fd4fb06265412 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'metas' => [$this, 'block_metas'],
'stylesheets' => [$this, 'block_stylesheets'],
'javascripts' => [$this, 'block_javascripts'],
'title' => [$this, 'block_title'],
'body' => [$this, 'block_body'],
'postjavascripts' => [$this, 'block_postjavascripts'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "default/restaurants.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "default/restaurants.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "default/restaurants.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_metas($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metas"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metas"));
// line 4
echo "\t<meta name=\"description\" content=\"Encuentra los mejores menús cerca de ti.\">
\t<meta property=\"og:title\" content=\"Menu del dia\"/>
\t<meta property=\"og:url\" content=\"";
// line 6
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_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", false, false, false, 6), "attributes", [], "any", false, false, false, 6), "get", [0 => "_route"], "method", false, false, false, 6), twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_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", false, false, false, 6), "attributes", [], "any", false, false, false, 6), "get", [0 => "_route_params"], "method", false, false, false, 6)), "html", null, true);
echo "\"/>
\t<meta property=\"og:description\" content=\"Encuentra los mejores menús cerca de ti.\">
\t<meta property=\"og:image\" itemprop=\"image\" content=\"https://menusdeldia.com/uploads/menu.jpg\">
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 10
public function block_stylesheets($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 11
echo "\t";
$this->displayParentBlock("stylesheets", $context, $blocks);
echo "
\t<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/css/ion.rangeSlider.min.css\"/>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 14
public function block_javascripts($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 15
echo "\t";
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
\t<script src=\"https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/js/ion.rangeSlider.min.js\"></script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 19
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
echo "Restaurantes
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 22
public function block_body($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 23
echo "\t<div class=\"container py-3\">
\t\t<section class=\"pb-2 pt-2\">
\t\t\t<form action=\"";
// line 25
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("restaurants");
echo "\" method=\"post\" role=\"form\" enctype=\"multipart/form-data\" class=\"w-100\">
\t\t\t\t<div class=\"row\">
\t\t\t\t\t<div class='col-md-6 text-center'>
\t\t\t\t\t\t<h6>
\t\t\t\t\t\t\t<small>Precio</small>
\t\t\t\t\t\t</h6>
\t\t\t\t\t\t<input type=\"text\" class=\"js-range-precio\" name=\"precioMax\" value=\"\"/>
\t\t\t\t\t</div>
\t\t\t\t\t<div class='col-md-6 text-center'>
\t\t\t\t\t\t<h6>
\t\t\t\t\t\t\t<small>Distancia</small>
\t\t\t\t\t\t</h6>
\t\t\t\t\t\t<input type=\"text\" class=\"js-range-distancia\" name=\"distanciaMax\" value=\"\"/>
\t\t\t\t\t</div>
\t\t\t\t\t<input name=\"latActual\" type=\"hidden\" value=\"";
// line 39
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", null, true);
echo "\">
\t\t\t\t\t<input name=\"lngActual\" type=\"hidden\" value=\"";
// line 40
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", null, true);
echo "\">
\t\t\t\t</div>
\t\t\t</form>
\t\t\t<div class=\"row text-center mt-2\">
\t\t\t\t<p>
\t\t\t\t\t<em>Se han encontrado
\t\t\t\t\t</em>
\t\t\t\t\t<strong>";
// line 47
echo twig_escape_filter($this->env, twig_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", null, true);
echo "</strong>
\t\t\t\t\t<em>
\t\t\t\t\t\trestaurantes cerca de ti.
\t\t\t\t\t</em>
\t\t\t\t</p>
\t\t\t</div>
\t\t</section>
\t\t<div class=\"row row-cols-1 row-cols-sm-2 row-cols-md-4 mt-1\">
\t\t\t";
// line 55
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["restaurant"]) {
// line 56
echo "\t\t\t\t<div class=\"col my-4\">
\t\t\t\t\t<div class=\"card shadow-sm\">
\t\t\t\t\t\t<div class=\"card-header text-center py-1\">
\t\t\t\t\t\t\t<a class=\"text-decoration-none\" href=\"";
// line 59
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("showrestaurant", ["restaurante" => twig_lower_filter($this->env, twig_replace_filter(twig_get_attribute($this->env, $this->source, $context["restaurant"], "nombre", [], "any", false, false, false, 59), [" " => "-"])), "id" => twig_get_attribute($this->env, $this->source, $context["restaurant"], "id", [], "any", false, false, false, 59)]), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "nombre", [], "any", false, false, false, 59), "html", null, true);
echo "\" target=\"_blank\">
\t\t\t\t\t\t\t\t<em class=\"fw-semibold text-dark-emphasis fs-6\">";
// line 60
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "nombre", [], "any", false, false, false, 60), "html", null, true);
echo "</em>
\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<a class=\"text-decoration-none\" href=\"";
// line 63
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("showrestaurant", ["restaurante" => twig_lower_filter($this->env, twig_replace_filter(twig_get_attribute($this->env, $this->source, $context["restaurant"], "nombre", [], "any", false, false, false, 63), [" " => "-"])), "id" => twig_get_attribute($this->env, $this->source, $context["restaurant"], "id", [], "any", false, false, false, 63)]), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "nombre", [], "any", false, false, false, 63), "html", null, true);
echo "\" target=\"_blank\">
\t\t\t\t\t\t\t";
// line 64
if (twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "images", [], "any", false, false, false, 64))) {
// line 65
echo "\t\t\t\t\t\t\t\t<img class=\"bd-placeholder-img card-img-top\" width=\"100%\" height=\"200\" src=\"/uploads/images/";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["restaurant"], "images", [], "any", false, false, false, 65), 0, [], "array", false, false, false, 65), "filePath", [], "any", false, false, false, 65), "html", null, true);
echo "\" title=\"Menu diario de ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "nombre", [], "any", false, false, false, 65), "html", null, true);
echo "\" alt=\"Menu diario de ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "nombre", [], "any", false, false, false, 65), "html", null, true);
echo "\" restaurante=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "nombre", [], "any", false, false, false, 65), "html", null, true);
echo "\">
\t\t\t\t\t\t\t";
} else {
// line 67
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 ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "nombre", [], "any", false, false, false, 67), "html", null, true);
echo "\" alt=\"Menu diario de ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "nombre", [], "any", false, false, false, 67), "html", null, true);
echo "\" restaurante=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "nombre", [], "any", false, false, false, 67), "html", null, true);
echo "\">
\t\t\t\t\t\t\t";
}
// line 69
echo "\t\t\t\t\t\t</a>
\t\t\t\t\t\t";
// line 70
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); })()))) {
// line 71
echo "\t\t\t\t\t\t\t<div class=\"restaurant-km\">
\t\t\t\t\t\t\t\t<small class=\"badge bg-success bg-gradient text-wrap fw-bolder fs-6\">
\t\t\t\t\t\t\t\t\t<em>
\t\t\t\t\t\t\t\t\t\t";
// line 74
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "distancia", [], "any", false, false, false, 74), "html", null, true);
echo "
\t\t\t\t\t\t\t\t\t\tKm
\t\t\t\t\t\t\t\t\t</em>
\t\t\t\t\t\t\t\t</small>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t";
}
// line 80
echo "\t\t\t\t\t\t<div class=\"card-body text-center py-1\">
\t\t\t\t\t\t\t";
// line 81
if (twig_get_attribute($this->env, $this->source, $context["restaurant"], "rating", [], "any", false, false, false, 81)) {
// line 82
echo "\t\t\t\t\t\t\t\t<div class=\"col-12 text-center\">
\t\t\t\t\t\t\t\t\t";
// line 83
$context["rating"] = twig_split_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "rating", [], "any", false, false, false, 83), ".");
// line 84
echo "\t\t\t\t\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(1, twig_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", false, false, false, 84)));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 85
echo "\t\t\t\t\t\t\t\t\t\t<i class=\"text-warning fa fa-star\"></i>
\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 87
echo "\t\t\t\t\t\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, ($context["rating"] ?? null), 1, [], "array", true, true, false, 87)) {
// line 88
echo "\t\t\t\t\t\t\t\t\t\t<i class=\"text-warning fa fa-star-half\"></i>
\t\t\t\t\t\t\t\t\t";
}
// line 90
echo "\t\t\t\t\t\t\t\t\t";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "rating", [], "any", false, false, false, 90), "html", null, true);
echo "
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t";
} else {
// line 93
echo "\t\t\t\t\t\t\t\t<div class=\"col-12 text-center fw-lighter fst-italic\">Sin puntuar</div>
\t\t\t\t\t\t\t";
}
// line 95
echo "\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class=\"card-footer d-flex justify-content-between align-items-center text-center\">
\t\t\t\t\t\t\t<a class=\"text-decoration-none\" href=\"";
// line 97
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("showrestaurant", ["restaurante" => twig_lower_filter($this->env, twig_replace_filter(twig_get_attribute($this->env, $this->source, $context["restaurant"], "nombre", [], "any", false, false, false, 97), [" " => "-"])), "id" => twig_get_attribute($this->env, $this->source, $context["restaurant"], "id", [], "any", false, false, false, 97)]), "html", null, true);
echo "\" title=\"Ver menus de ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "nombre", [], "any", false, false, false, 97), "html", null, true);
echo "\" target=\"_blank\">
\t\t\t\t\t\t\t\t<i class=\"fas fa-file mx-3\"></i>
\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t<a href=\"whatsapp://send?text=";
// line 100
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("showrestaurant", ["restaurante" => twig_lower_filter($this->env, twig_replace_filter(twig_get_attribute($this->env, $this->source, $context["restaurant"], "nombre", [], "any", false, false, false, 100), [" " => "-"])), "id" => twig_get_attribute($this->env, $this->source, $context["restaurant"], "id", [], "any", false, false, false, 100)]), "html", null, true);
echo "\" data-action=\"share/whatsapp/share\">
\t\t\t\t\t\t\t\t<i class=\"fas fa-share-alt mx-3\"></i>
\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t";
// line 103
if (twig_get_attribute($this->env, $this->source, $context["restaurant"], "telefono", [], "any", false, false, false, 103)) {
// line 104
echo "\t\t\t\t\t\t\t\t<a href=\"tel:";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "telefono", [], "any", false, false, false, 104), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "telefono", [], "any", false, false, false, 104), "html", null, true);
echo "\">
\t\t\t\t\t\t\t\t\t<i class=\"fa fa-phone mx-3\"></i>
\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t";
}
// line 108
echo "\t\t\t\t\t\t\t";
if ((twig_get_attribute($this->env, $this->source, $context["restaurant"], "lat", [], "any", false, false, false, 108) && twig_get_attribute($this->env, $this->source, $context["restaurant"], "lng", [], "any", false, false, false, 108))) {
// line 109
echo "\t\t\t\t\t\t\t\t<a href=\"https://www.google.es/maps/dir//";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "lat", [], "any", false, false, false, 109), "html", null, true);
echo "+";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["restaurant"], "lng", [], "any", false, false, false, 109), "html", null, true);
echo "\" target=\"_blank\">
\t\t\t\t\t\t\t\t\t<i class=\"fa fa-map-marker m-3\" aria-hidden=\"true\"></i>
\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t";
}
// line 113
echo "\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['restaurant'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 117
echo "\t\t</div>
\t</div>\t
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 120
public function block_postjavascripts($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "postjavascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "postjavascripts"));
// line 121
echo "\t";
$this->displayParentBlock("postjavascripts", $context, $blocks);
echo "
\t<!-- parse-ignore-start -->
\t<script>
\t\t\$(document).ready(function () {
\t\t\tconst tooltipTriggerList = document.querySelectorAll('[data-bs-toggle=\"tooltip\"]')
\t\t\tconst tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
\t\t\tif (!\$(\"input[name='latActual']\").val() && !\$(\"input[name='lngActual']\").val()) {
\t\t\t\tif (navigator.geolocation) {
\t\t\t\t\tnavigator.geolocation.getCurrentPosition(showPosition);
\t\t\t\t} else {
\t\t\t\t\tconsole.log(\"Geolocation is not supported by this browser.\");
\t\t\t\t}
\t\t\t}
\t\t\t
\t\t\t\$(\".js-range-precio\").ionRangeSlider({
\t\t\t\tskin: \"round\",
\t\t\t\tstep: 5,
\t\t\t\tgrid: true,
\t\t\t\tmin: 0,
\t\t\t\tmax: 50,
\t\t\t\tfrom: ";
// line 143
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", null, true);
echo ",
\t\t\t\tprefix: \"€\",
\t\t\t\tonFinish: function (data) {
\t\t\t\t\t\$(\"form\").submit();
\t\t\t\t}
});
\t\t\t\$(\".js-range-distancia\").ionRangeSlider({
\t\t\t\tskin: \"round\",
\t\tstep: 5,
\t\t\t\tgrid: true,
\t\t\t\tmin: 0,
\t\t\t\tmax: 50,
\t\t\t\tfrom: ";
// line 156
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", null, true);
echo ",
\t\t\t\tprefix: \"Km\",
\t\t\t\tonFinish: function (data) {
\t\t\t\t\t\$(\"form\").submit();
\t\t\t\t}
\t\t\t});
\t\t\tfunction showPosition(position) {
\t\t\t\t\$(\"input[name='latActual']\").val(position.coords.latitude);
\t\t\t\t\$(\"input[name='lngActual']\").val(position.coords.longitude);
\t\t\t\t\$(\"form\").submit();
\t\t\t}
\t\t});
\t</script>
<!-- parse-ignore-end -->
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "default/restaurants.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block metas %}
\t<meta name=\"description\" content=\"Encuentra los mejores menús cerca de ti.\">
\t<meta property=\"og:title\" content=\"Menu del dia\"/>
\t<meta property=\"og:url\" content=\"{{ url(app.request.attributes.get(\"_route\"), app.request.attributes.get(\"_route_params\")) }}\"/>
\t<meta property=\"og:description\" content=\"Encuentra los mejores menús cerca de ti.\">
\t<meta property=\"og:image\" itemprop=\"image\" content=\"https://menusdeldia.com/uploads/menu.jpg\">
{% endblock %}
{% block stylesheets %}
\t{{ parent() }}
\t<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/css/ion.rangeSlider.min.css\"/>
{% endblock %}
{% block javascripts %}
\t{{ parent() }}
\t<script src=\"https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.1/js/ion.rangeSlider.min.js\"></script>
{% endblock %}
{% block title %}Restaurantes
{% endblock %}
{% block body %}
\t<div class=\"container py-3\">
\t\t<section class=\"pb-2 pt-2\">
\t\t\t<form action=\"{{ path('restaurants') }}\" method=\"post\" role=\"form\" enctype=\"multipart/form-data\" class=\"w-100\">
\t\t\t\t<div class=\"row\">
\t\t\t\t\t<div class='col-md-6 text-center'>
\t\t\t\t\t\t<h6>
\t\t\t\t\t\t\t<small>Precio</small>
\t\t\t\t\t\t</h6>
\t\t\t\t\t\t<input type=\"text\" class=\"js-range-precio\" name=\"precioMax\" value=\"\"/>
\t\t\t\t\t</div>
\t\t\t\t\t<div class='col-md-6 text-center'>
\t\t\t\t\t\t<h6>
\t\t\t\t\t\t\t<small>Distancia</small>
\t\t\t\t\t\t</h6>
\t\t\t\t\t\t<input type=\"text\" class=\"js-range-distancia\" name=\"distanciaMax\" value=\"\"/>
\t\t\t\t\t</div>
\t\t\t\t\t<input name=\"latActual\" type=\"hidden\" value=\"{{ latActual }}\">
\t\t\t\t\t<input name=\"lngActual\" type=\"hidden\" value=\"{{ lngActual }}\">
\t\t\t\t</div>
\t\t\t</form>
\t\t\t<div class=\"row text-center mt-2\">
\t\t\t\t<p>
\t\t\t\t\t<em>Se han encontrado
\t\t\t\t\t</em>
\t\t\t\t\t<strong>{{ restaurants|length }}</strong>
\t\t\t\t\t<em>
\t\t\t\t\t\trestaurantes cerca de ti.
\t\t\t\t\t</em>
\t\t\t\t</p>
\t\t\t</div>
\t\t</section>
\t\t<div class=\"row row-cols-1 row-cols-sm-2 row-cols-md-4 mt-1\">
\t\t\t{% for restaurant in restaurants %}
\t\t\t\t<div class=\"col my-4\">
\t\t\t\t\t<div class=\"card shadow-sm\">
\t\t\t\t\t\t<div class=\"card-header text-center py-1\">
\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\">
\t\t\t\t\t\t\t\t<em class=\"fw-semibold text-dark-emphasis fs-6\">{{ restaurant.nombre }}</em>
\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t</div>
\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\">
\t\t\t\t\t\t\t{% if restaurant.images|length %}
\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}}\">
\t\t\t\t\t\t\t{% else %}
\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}}\">
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t</a>
\t\t\t\t\t\t{% if latActual and lngActual %}
\t\t\t\t\t\t\t<div class=\"restaurant-km\">
\t\t\t\t\t\t\t\t<small class=\"badge bg-success bg-gradient text-wrap fw-bolder fs-6\">
\t\t\t\t\t\t\t\t\t<em>
\t\t\t\t\t\t\t\t\t\t{{ restaurant.distancia }}
\t\t\t\t\t\t\t\t\t\tKm
\t\t\t\t\t\t\t\t\t</em>
\t\t\t\t\t\t\t\t</small>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t<div class=\"card-body text-center py-1\">
\t\t\t\t\t\t\t{% if restaurant.rating %}
\t\t\t\t\t\t\t\t<div class=\"col-12 text-center\">
\t\t\t\t\t\t\t\t\t{% set rating = restaurant.rating|split('.') %}
\t\t\t\t\t\t\t\t\t{% for i in 1..rating[0] %}
\t\t\t\t\t\t\t\t\t\t<i class=\"text-warning fa fa-star\"></i>
\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t\t{% if rating[1] is defined %}
\t\t\t\t\t\t\t\t\t\t<i class=\"text-warning fa fa-star-half\"></i>
\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t{{ restaurant.rating }}
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t<div class=\"col-12 text-center fw-lighter fst-italic\">Sin puntuar</div>
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class=\"card-footer d-flex justify-content-between align-items-center text-center\">
\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\">
\t\t\t\t\t\t\t\t<i class=\"fas fa-file mx-3\"></i>
\t\t\t\t\t\t\t</a>
\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\">
\t\t\t\t\t\t\t\t<i class=\"fas fa-share-alt mx-3\"></i>
\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t{% if restaurant.telefono %}
\t\t\t\t\t\t\t\t<a href=\"tel:{{ restaurant.telefono }}\" title=\"{{ restaurant.telefono }}\">
\t\t\t\t\t\t\t\t\t<i class=\"fa fa-phone mx-3\"></i>
\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t{% if restaurant.lat and restaurant.lng %}
\t\t\t\t\t\t\t\t<a href=\"https://www.google.es/maps/dir//{{ restaurant.lat }}+{{ restaurant.lng }}\" target=\"_blank\">
\t\t\t\t\t\t\t\t\t<i class=\"fa fa-map-marker m-3\" aria-hidden=\"true\"></i>
\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t{% endfor %}
\t\t</div>
\t</div>\t
{% endblock %}
{% block postjavascripts %}
\t{{ parent() }}
\t<!-- parse-ignore-start -->
\t<script>
\t\t\$(document).ready(function () {
\t\t\tconst tooltipTriggerList = document.querySelectorAll('[data-bs-toggle=\"tooltip\"]')
\t\t\tconst tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
\t\t\tif (!\$(\"input[name='latActual']\").val() && !\$(\"input[name='lngActual']\").val()) {
\t\t\t\tif (navigator.geolocation) {
\t\t\t\t\tnavigator.geolocation.getCurrentPosition(showPosition);
\t\t\t\t} else {
\t\t\t\t\tconsole.log(\"Geolocation is not supported by this browser.\");
\t\t\t\t}
\t\t\t}
\t\t\t
\t\t\t\$(\".js-range-precio\").ionRangeSlider({
\t\t\t\tskin: \"round\",
\t\t\t\tstep: 5,
\t\t\t\tgrid: true,
\t\t\t\tmin: 0,
\t\t\t\tmax: 50,
\t\t\t\tfrom: {{ precioMax }},
\t\t\t\tprefix: \"€\",
\t\t\t\tonFinish: function (data) {
\t\t\t\t\t\$(\"form\").submit();
\t\t\t\t}
});
\t\t\t\$(\".js-range-distancia\").ionRangeSlider({
\t\t\t\tskin: \"round\",
\t\tstep: 5,
\t\t\t\tgrid: true,
\t\t\t\tmin: 0,
\t\t\t\tmax: 50,
\t\t\t\tfrom: {{ distanciaMax }},
\t\t\t\tprefix: \"Km\",
\t\t\t\tonFinish: function (data) {
\t\t\t\t\t\$(\"form\").submit();
\t\t\t\t}
\t\t\t});
\t\t\tfunction showPosition(position) {
\t\t\t\t\$(\"input[name='latActual']\").val(position.coords.latitude);
\t\t\t\t\$(\"input[name='lngActual']\").val(position.coords.longitude);
\t\t\t\t\$(\"form\").submit();
\t\t\t}
\t\t});
\t</script>
<!-- parse-ignore-end -->
{% endblock %}
", "default/restaurants.html.twig", "/var/www/vhosts/menusdeldia.com/httpdocs/templates/default/restaurants.html.twig");
}
}