<?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;
/* front/blog/list-articles.html.twig */
class __TwigTemplate_6c9c81591f4c872b3420e748de3857bd extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "front/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", "front/blog/list-articles.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/blog/list-articles.html.twig"));
$this->parent = $this->loadTemplate("front/base.html.twig", "front/blog/list-articles.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 twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("blog.title"), "html", null, true);
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 6
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 7
echo "
\t<section class=\"mt-0 first-section\" id=\"blog-search\">
\t\t<div class=\"container\">
\t\t\t<div class=\"row justify-content-center\">\t
\t\t\t\t<div class=\"col-lg-8\">
\t\t\t\t\t";
// line 12
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 12, $this->source); })()), 'form_start', ["attr" => ["class" => "blog-main-search"]]);
echo "
\t\t\t\t\t\t<div class=\"form-inline\">
\t\t\t\t\t\t\t";
// line 14
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 14, $this->source); })()), "title", [], "any", false, false, false, 14), 'widget', ["attr" => ["class" => "input-main-search"]]);
echo "
\t\t\t\t\t\t\t<button class=\"btn btn-main-search\" type=\"submit\">
\t\t\t\t\t\t\t\t<span class=\"hide-mobile\">";
// line 16
echo twig_escape_filter($this->env, twig_capitalize_string_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("global.search")), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t<i class=\"far fa-search hide-desktop\"></i>
\t\t\t\t\t\t\t</button>
\t\t\t\t\t\t</div>
\t\t\t\t\t";
// line 20
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 20, $this->source); })()), 'form_end');
echo "
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</section>
\t<section id=\"blog\" class=\"pt-0\">
\t\t<div class=\"container\">
\t\t\t<h2 class=\"section-title-underline\">";
// line 28
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans((isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 28, $this->source); })())), "html", null, true);
echo "</h2>
\t\t\t<div class=\"row\">
\t\t\t\t";
// line 30
if ((twig_get_attribute($this->env, $this->source, (isset($context["articles"]) || array_key_exists("articles", $context) ? $context["articles"] : (function () { throw new RuntimeError('Variable "articles" does not exist.', 30, $this->source); })()), "getTotalItemCount", [], "any", false, false, false, 30) > 0)) {
// line 31
echo "\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["articles"]) || array_key_exists("articles", $context) ? $context["articles"] : (function () { throw new RuntimeError('Variable "articles" does not exist.', 31, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["article"]) {
// line 32
echo "\t\t\t\t\t\t<div class=\"col-xl-3 col-lg-4 col-md-6 col-sm-12 blog-col\">
\t\t\t\t\t\t\t";
// line 33
$this->loadTemplate("front/blog/_blog-card.html.twig", "front/blog/list-articles.html.twig", 33)->display($context);
// line 34
echo "\t\t\t\t\t\t</div>
\t\t\t\t\t";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['article'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 36
echo "
\t\t\t\t";
} else {
// line 38
echo "\t\t\t\t\t<div class=\"col-lg-12\">
\t\t\t\t\t\t<div class=\"blog-box\">
\t\t\t\t\t\t\t<p class=\"empty-blog\">";
// line 40
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("blog.no_articles_found"), "html", null, true);
echo "</p>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t";
}
// line 44
echo "\t\t\t</div>
\t\t\t<div class=\"row d-flex justify-content-center\">
\t\t\t\t";
// line 47
echo $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->render($this->env, (isset($context["articles"]) || array_key_exists("articles", $context) ? $context["articles"] : (function () { throw new RuntimeError('Variable "articles" does not exist.', 47, $this->source); })()), "front/_partials/availabilities-pagination.html.twig");
echo "
\t\t\t</div>
\t\t</div>
\t</section>
\t";
// line 53
$this->loadTemplate("front/blog/_blog-cta.html.twig", "front/blog/list-articles.html.twig", 53)->display($context);
// line 54
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "front/blog/list-articles.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 201 => 54, 199 => 53, 190 => 47, 185 => 44, 178 => 40, 174 => 38, 170 => 36, 155 => 34, 153 => 33, 150 => 32, 132 => 31, 130 => 30, 125 => 28, 114 => 20, 107 => 16, 102 => 14, 97 => 12, 90 => 7, 80 => 6, 59 => 3, 36 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends \"front/base.html.twig\" %}
{% block title %}{{ 'blog.title' | trans }}
{% endblock %}
{% block body %}
\t<section class=\"mt-0 first-section\" id=\"blog-search\">
\t\t<div class=\"container\">
\t\t\t<div class=\"row justify-content-center\">\t
\t\t\t\t<div class=\"col-lg-8\">
\t\t\t\t\t{{ form_start(form, {'attr': {'class': 'blog-main-search'}}) }}
\t\t\t\t\t\t<div class=\"form-inline\">
\t\t\t\t\t\t\t{{ form_widget(form.title, {'attr': {'class': 'input-main-search'}}) }}
\t\t\t\t\t\t\t<button class=\"btn btn-main-search\" type=\"submit\">
\t\t\t\t\t\t\t\t<span class=\"hide-mobile\">{{ 'global.search' | trans | capitalize }}</span>
\t\t\t\t\t\t\t\t<i class=\"far fa-search hide-desktop\"></i>
\t\t\t\t\t\t\t</button>
\t\t\t\t\t\t</div>
\t\t\t\t\t{{ form_end(form) }}
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</section>
\t<section id=\"blog\" class=\"pt-0\">
\t\t<div class=\"container\">
\t\t\t<h2 class=\"section-title-underline\">{{ title | trans }}</h2>
\t\t\t<div class=\"row\">
\t\t\t\t{% if articles.getTotalItemCount > 0 %}
\t\t\t\t\t{% for article in articles %}
\t\t\t\t\t\t<div class=\"col-xl-3 col-lg-4 col-md-6 col-sm-12 blog-col\">
\t\t\t\t\t\t\t{% include \"front/blog/_blog-card.html.twig\" %}
\t\t\t\t\t\t</div>
\t\t\t\t\t{% endfor %}
\t\t\t\t{% else %}
\t\t\t\t\t<div class=\"col-lg-12\">
\t\t\t\t\t\t<div class=\"blog-box\">
\t\t\t\t\t\t\t<p class=\"empty-blog\">{{ \"blog.no_articles_found\" | trans }}</p>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t{% endif %}
\t\t\t</div>
\t\t\t<div class=\"row d-flex justify-content-center\">
\t\t\t\t{{ knp_pagination_render(articles, 'front/_partials/availabilities-pagination.html.twig') }}
\t\t\t</div>
\t\t</div>
\t</section>
\t{% include \"front/blog/_blog-cta.html.twig\" %}
{% endblock %}
", "front/blog/list-articles.html.twig", "/var/www/preprod/racket-trip/templates/front/blog/list-articles.html.twig");
}
}