<?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;
/* homesearch.html.twig */
class __TwigTemplate_9833509c5f763bfd5cee0541107229ba extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'headersection' => [$this, 'block_headersection'],
'body' => [$this, 'block_body'],
];
}
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", "homesearch.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "homesearch.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "homesearch.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_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 "- Recherche";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 5
public function block_headersection($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", "headersection"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "headersection"));
// line 6
echo "<div class=\"fixed-top\">
";
// line 7
echo twig_include($this->env, $context, "flashmessages/flashmessages.html.twig");
echo "
</div>
<section class=\"section section-xl bg-primary overlay-dark text-white rounded covernorepeat\" data-background=\"";
// line 9
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/cards-3662554_1920.jpg"), "html", null, true);
echo "\">
<div class=\"container\">
<div class=\"row justify-content-center\">
<div class=\"col-12\">
<nav aria-label=\"breadcrumb\">
<ol class=\"breadcrumb breadcrumb-transparent\">
<li class=\"breadcrumb-item\"><a href=\"";
// line 15
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("home", [], false);
echo "\">Accueil</a></li>
<li class=\"breadcrumb-item active\">Recherche</li>
</ol>
</nav>
<!-- Heading -->
<h1 class=\"display-2\">
<i class=\"fab fa-searchengin mr-2\"></i><span class=\"font-weight-light\">Trouvez votre</span> tournoi ou festival
</h1>
<!-- Text -->
<p class=\"lead text-muted mt-4\">
Recherchez parmi tous les tournois et festivals de notre site.
</p>
</div>
</div>
</div>
</section>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 33
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 34
echo "<main>
<div class=\"section pt-5 pt-lg-6\" style=\"min-height: 50vh;\">
<div id=\"spaces-container\" class=\"container\">
<div class=\"row justify-content-center mb-3\">
<div class=\"col-12\">
";
// line 39
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["formsearch"]) || array_key_exists("formsearch", $context) ? $context["formsearch"] : (function () { throw new RuntimeError('Variable "formsearch" does not exist.', 39, $this->source); })()), 'form_start', ["attr" => ["class" => "row justify-content-center"]]);
echo "
<div class=\"col-12 col-lg-4\">
<div class=\"form-group mb-lg-0\">
<div class=\"input-group input-group-lg mb-lg-0\">
<div class=\"input-group-prepend\">
<span class=\"input-group-text\"><i class=\"fas fa-search-location\"></i></span>
</div>
";
// line 46
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["formsearch"]) || array_key_exists("formsearch", $context) ? $context["formsearch"] : (function () { throw new RuntimeError('Variable "formsearch" does not exist.', 46, $this->source); })()), "location", [], "any", false, false, false, 46), 'widget', ["attr" => ["class" => "form-control autocomplete", "placeholder" => "Ville", "onFocus" => "geolocate()"]]);
echo "
</div>
";
// line 49
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["formsearch"]) || array_key_exists("formsearch", $context) ? $context["formsearch"] : (function () { throw new RuntimeError('Variable "formsearch" does not exist.', 49, $this->source); })()), "locationhidden", [], "any", false, false, false, 49), 'widget');
echo "
";
// line 50
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["formsearch"]) || array_key_exists("formsearch", $context) ? $context["formsearch"] : (function () { throw new RuntimeError('Variable "formsearch" does not exist.', 50, $this->source); })()), "placeid", [], "any", false, false, false, 50), 'widget');
echo "
</div>
</div>
<div class=\"col-12 col-lg-3\">
<div class=\"input-group input-group-lg mb-3 mb-lg-0\">
<div class=\"input-group-prepend\">
<span class=\"input-group-text\"><i class=\"far fa-calendar-alt\"></i></span>
</div>
";
// line 58
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["formsearch"]) || array_key_exists("formsearch", $context) ? $context["formsearch"] : (function () { throw new RuntimeError('Variable "formsearch" does not exist.', 58, $this->source); })()), "date", [], "any", false, false, false, 58), 'widget', ["attr" => ["class" => "form-control datepicker", "placeholder" => "Date", "data-date-format" => "dd/mm/yyyy"]]);
echo "
<!--<input class=\"form-control datepicker\" placeholder=\"Select date\" type=\"text\" required>-->
</div>
</div>
<div class=\"col-12 col-lg-2\">
";
// line 63
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["formsearch"]) || array_key_exists("formsearch", $context) ? $context["formsearch"] : (function () { throw new RuntimeError('Variable "formsearch" does not exist.', 63, $this->source); })()), "search", [], "any", false, false, false, 63), 'widget', ["attr" => ["class" => "btn btn-lg btn-primary btn-block mt-3 mt-md-0 animate-up-2"]]);
echo "
<!--<button class=\"btn btn-lg btn-primary btn-block mt-3 mt-md-0 animate-up-2\" type=\"submit\">Find a desk</button>-->
</div>
</div>
</div>
<div class=\"row justify-content-center\">
<div class=\"col-12 col-lg-9 order-lg-1\">
<div class=\"justify-content-between align-items-center d-flex\">
<div class=\"mr-3\">
<p class=\"mb-0 font-small\">
Nombre de résultats : ";
// line 74
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 74, $this->source); })()), "getTotalItemCount", [], "any", false, false, false, 74), "html", null, true);
echo "
</p>
</div>
<div class=\"\">
<div class=\"input-group input-group-sm\">
<div class=\"input-group-prepend form-control-sm\">
<span class=\"input-group-text form-control-sm\"><i class=\"fas fa-route\"></i></span>
";
// line 81
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["formsearch"]) || array_key_exists("formsearch", $context) ? $context["formsearch"] : (function () { throw new RuntimeError('Variable "formsearch" does not exist.', 81, $this->source); })()), "distance", [], "any", false, false, false, 81), 'widget', ["attr" => ["class" => "form-control-sm font-small", "onchange" => "this.form.submit()"]]);
echo "
</div>
</div>
</div>
</div>
";
// line 86
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["formsearch"]) || array_key_exists("formsearch", $context) ? $context["formsearch"] : (function () { throw new RuntimeError('Variable "formsearch" does not exist.', 86, $this->source); })()), 'form_end');
echo "
<div class=\"tab-content mt-4 mt-lg-4 \" id=\"tabcontentexample-5\">
<div class=\"tab-pane fade show active\" id=\"link-example-13\" role=\"tabpanel\" aria-labelledby=\"tab-link-example-13\">
";
// line 89
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 89, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["bfedition"]) {
// line 90
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\BFEditionController::ShowListView", ["id" => twig_get_attribute($this->env, $this->source, $context["bfedition"], "id", [], "any", false, false, false, 90)]));
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['bfedition'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 92
echo " </div>
</div>
";
// line 94
echo $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->render($this->env, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 94, $this->source); })()));
echo "
</div>
</div>
</div>
</div>
</main>
<script>
var placeSearch, autocompleteinput;
var input = document.getElementById('festival_search_with_distance_location');
var componentForm = {
street_number: 'short_name',
route: 'long_name',
locality: 'long_name',
administrative_area_level_1: 'short_name',
country: 'long_name',
postal_code: 'short_name'
};
function initAutocomplete() {
google.maps.event.addDomListener(input, 'blur', function() {
if (jQuery('.pac-item:hover').length === 0) {
google.maps.event.trigger(this, 'focus', {});
google.maps.event.trigger(this, 'keydown', {
keyCode: 13
});
}
})
// Create the autocomplete object, restricting the search to geographical
// location types.
autocompleteinput = new google.maps.places.Autocomplete(
/** @type {!HTMLInputElement} */
(input), {
types: ['geocode']
});
// When the user selects an address from the dropdown, populate the address
// fields in the form.
autocompleteinput.addListener('place_changed', fillInAddress);
}
function fillInAddress() {
// Get the place details from the autocomplete object.
var place = autocompleteinput.getPlace();
if (place != null && place.place_id) {
//fill the hidden data
document.getElementById('festival_search_with_distance_locationhidden').setAttribute('value', document.getElementById('festival_search_with_distance_location').value)
document.getElementById('festival_search_with_distance_placeid').setAttribute('value', place.place_id)
}
}
</script>
<script src=\"https://maps.googleapis.com/maps/api/js?key=AIzaSyArRqV6iNkruffZtVT2G0iX4kfemd1SQD4&libraries=places&callback=initAutocomplete&sessiontoken=";
// line 156
echo twig_escape_filter($this->env, (isset($context["uuid"]) || array_key_exists("uuid", $context) ? $context["uuid"] : (function () { throw new RuntimeError('Variable "uuid" does not exist.', 156, $this->source); })()), "html", null, true);
echo "\" async defer></script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "homesearch.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 309 => 156, 244 => 94, 240 => 92, 231 => 90, 227 => 89, 221 => 86, 213 => 81, 203 => 74, 189 => 63, 181 => 58, 170 => 50, 166 => 49, 160 => 46, 150 => 39, 143 => 34, 133 => 33, 106 => 15, 97 => 9, 92 => 7, 89 => 6, 79 => 5, 60 => 3, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block title %}- Recherche{% endblock %}
{% block headersection %}
<div class=\"fixed-top\">
{{ include('flashmessages/flashmessages.html.twig') }}
</div>
<section class=\"section section-xl bg-primary overlay-dark text-white rounded covernorepeat\" data-background=\"{{ asset('assets/img/cards-3662554_1920.jpg') }}\">
<div class=\"container\">
<div class=\"row justify-content-center\">
<div class=\"col-12\">
<nav aria-label=\"breadcrumb\">
<ol class=\"breadcrumb breadcrumb-transparent\">
<li class=\"breadcrumb-item\"><a href=\"{{ path('home', {}, relative = false) }}\">Accueil</a></li>
<li class=\"breadcrumb-item active\">Recherche</li>
</ol>
</nav>
<!-- Heading -->
<h1 class=\"display-2\">
<i class=\"fab fa-searchengin mr-2\"></i><span class=\"font-weight-light\">Trouvez votre</span> tournoi ou festival
</h1>
<!-- Text -->
<p class=\"lead text-muted mt-4\">
Recherchez parmi tous les tournois et festivals de notre site.
</p>
</div>
</div>
</div>
</section>
{%endblock%}
{%block body%}
<main>
<div class=\"section pt-5 pt-lg-6\" style=\"min-height: 50vh;\">
<div id=\"spaces-container\" class=\"container\">
<div class=\"row justify-content-center mb-3\">
<div class=\"col-12\">
{{ form_start(formsearch, { 'attr': {'class': 'row justify-content-center'} }) }}
<div class=\"col-12 col-lg-4\">
<div class=\"form-group mb-lg-0\">
<div class=\"input-group input-group-lg mb-lg-0\">
<div class=\"input-group-prepend\">
<span class=\"input-group-text\"><i class=\"fas fa-search-location\"></i></span>
</div>
{{ form_widget(formsearch.location, {'attr': {'class': 'form-control autocomplete', 'placeholder': 'Ville', 'onFocus' : 'geolocate()' }}) }}
</div>
{{ form_widget(formsearch.locationhidden)}}
{{ form_widget(formsearch.placeid)}}
</div>
</div>
<div class=\"col-12 col-lg-3\">
<div class=\"input-group input-group-lg mb-3 mb-lg-0\">
<div class=\"input-group-prepend\">
<span class=\"input-group-text\"><i class=\"far fa-calendar-alt\"></i></span>
</div>
{{ form_widget(formsearch.date, {'attr': {'class': 'form-control datepicker', 'placeholder': 'Date', 'data-date-format':'dd/mm/yyyy'}}) }}
<!--<input class=\"form-control datepicker\" placeholder=\"Select date\" type=\"text\" required>-->
</div>
</div>
<div class=\"col-12 col-lg-2\">
{{ form_widget(formsearch.search, {'attr': {'class': 'btn btn-lg btn-primary btn-block mt-3 mt-md-0 animate-up-2' }} ) }}
<!--<button class=\"btn btn-lg btn-primary btn-block mt-3 mt-md-0 animate-up-2\" type=\"submit\">Find a desk</button>-->
</div>
</div>
</div>
<div class=\"row justify-content-center\">
<div class=\"col-12 col-lg-9 order-lg-1\">
<div class=\"justify-content-between align-items-center d-flex\">
<div class=\"mr-3\">
<p class=\"mb-0 font-small\">
Nombre de résultats : {{ pagination.getTotalItemCount }}
</p>
</div>
<div class=\"\">
<div class=\"input-group input-group-sm\">
<div class=\"input-group-prepend form-control-sm\">
<span class=\"input-group-text form-control-sm\"><i class=\"fas fa-route\"></i></span>
{{ form_widget(formsearch.distance, {'attr': {'class': 'form-control-sm font-small', 'onchange':'this.form.submit()'}}) }}
</div>
</div>
</div>
</div>
{{form_end(formsearch)}}
<div class=\"tab-content mt-4 mt-lg-4 \" id=\"tabcontentexample-5\">
<div class=\"tab-pane fade show active\" id=\"link-example-13\" role=\"tabpanel\" aria-labelledby=\"tab-link-example-13\">
{% for bfedition in pagination %}
{{ render(controller('App\\\\Controller\\\\BFEditionController::ShowListView', {id:bfedition.id})) }}
{%endfor%}
</div>
</div>
{{ knp_pagination_render(pagination) }}
</div>
</div>
</div>
</div>
</main>
<script>
var placeSearch, autocompleteinput;
var input = document.getElementById('festival_search_with_distance_location');
var componentForm = {
street_number: 'short_name',
route: 'long_name',
locality: 'long_name',
administrative_area_level_1: 'short_name',
country: 'long_name',
postal_code: 'short_name'
};
function initAutocomplete() {
google.maps.event.addDomListener(input, 'blur', function() {
if (jQuery('.pac-item:hover').length === 0) {
google.maps.event.trigger(this, 'focus', {});
google.maps.event.trigger(this, 'keydown', {
keyCode: 13
});
}
})
// Create the autocomplete object, restricting the search to geographical
// location types.
autocompleteinput = new google.maps.places.Autocomplete(
/** @type {!HTMLInputElement} */
(input), {
types: ['geocode']
});
// When the user selects an address from the dropdown, populate the address
// fields in the form.
autocompleteinput.addListener('place_changed', fillInAddress);
}
function fillInAddress() {
// Get the place details from the autocomplete object.
var place = autocompleteinput.getPlace();
if (place != null && place.place_id) {
//fill the hidden data
document.getElementById('festival_search_with_distance_locationhidden').setAttribute('value', document.getElementById('festival_search_with_distance_location').value)
document.getElementById('festival_search_with_distance_placeid').setAttribute('value', place.place_id)
}
}
</script>
<script src=\"https://maps.googleapis.com/maps/api/js?key=AIzaSyArRqV6iNkruffZtVT2G0iX4kfemd1SQD4&libraries=places&callback=initAutocomplete&sessiontoken={{uuid}}\" async defer></script>
{%endblock%}
", "homesearch.html.twig", "/home/maixmebouz/www/dev/bridgefestival/templates/homesearch.html.twig");
}
}