<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
/* api/api_search.html.twig */
class __TwigTemplate_ed030dd1418b9de0f71d75f126ea9f962d92df76926600ac18328be3a6dcb170 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "api/api_search.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "api/api_search.html.twig"));
// line 1
$context["css"] = "dflex fwwrap jcc visible";
// line 2
if ((array_key_exists("structure", $context) && ((0 === CoreExtension::compare((isset($context["structure"]) || array_key_exists("structure", $context) ? $context["structure"] : (function () { throw new RuntimeError('Variable "structure" does not exist.', 2, $this->source); })()), "fiches_territoires")) || (0 === CoreExtension::compare((isset($context["structure"]) || array_key_exists("structure", $context) ? $context["structure"] : (function () { throw new RuntimeError('Variable "structure" does not exist.', 2, $this->source); })()), "experiences"))))) {
// line 3
yield " ";
$context["css"] = "";
}
// line 5
yield "
";
// line 6
if (((0 === CoreExtension::compare((isset($context["structure"]) || array_key_exists("structure", $context) ? $context["structure"] : (function () { throw new RuntimeError('Variable "structure" does not exist.', 6, $this->source); })()), "fiches_territoires")) || (0 === CoreExtension::compare((isset($context["structure"]) || array_key_exists("structure", $context) ? $context["structure"] : (function () { throw new RuntimeError('Variable "structure" does not exist.', 6, $this->source); })()), "experiences")))) {
// line 7
yield " <div class=\"map-articles-previews-header\">
";
// line 8
if ((0 === CoreExtension::compare((isset($context["structure"]) || array_key_exists("structure", $context) ? $context["structure"] : (function () { throw new RuntimeError('Variable "structure" does not exist.', 8, $this->source); })()), "fiches_territoires"))) {
// line 9
yield " Listes des territoires
";
} else {
// line 11
yield " Listes des expériences
";
}
// line 13
yield " </div>
";
}
// line 15
yield "<div class=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["css"]) || array_key_exists("css", $context) ? $context["css"] : (function () { throw new RuntimeError('Variable "css" does not exist.', 15, $this->source); })()), "html", null, true);
yield "\">
\t";
// line 16
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["hits"]) || array_key_exists("hits", $context) ? $context["hits"] : (function () { throw new RuntimeError('Variable "hits" does not exist.', 16, $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["i"] => $context["hit"]) {
// line 17
yield "\t\t";
$context["gt_first"] = "off";
// line 18
yield "\t\t";
if (CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 18)) {
// line 19
yield "\t\t\t";
$context["gt_first"] = "on";
// line 20
yield "\t\t";
}
// line 21
yield "\t\t";
yield from $this->loadTemplate("api/blocks/api_search_render.html.twig", "api/api_search.html.twig", 21)->unwrap()->yield(CoreExtension::merge($context, ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["hit"], "id", [], "any", false, false, false, 21), "gt_first" => (isset($context["gt_first"]) || array_key_exists("gt_first", $context) ? $context["gt_first"] : (function () { throw new RuntimeError('Variable "gt_first" does not exist.', 21, $this->source); })())]));
// line 22
yield "\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['i'], $context['hit'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 23
yield "</div>
";
// line 24
yield from $this->loadTemplate("blocks/sub-blocks/pagination.html.twig", "api/api_search.html.twig", 24)->unwrap()->yield($context);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "api/api_search.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 128 => 24, 125 => 23, 111 => 22, 108 => 21, 105 => 20, 102 => 19, 99 => 18, 96 => 17, 79 => 16, 74 => 15, 70 => 13, 66 => 11, 62 => 9, 60 => 8, 57 => 7, 55 => 6, 52 => 5, 48 => 3, 46 => 2, 44 => 1,);
}
public function getSourceContext()
{
return new Source("{% set css = 'dflex fwwrap jcc visible' %}
{% if structure is defined and (structure == 'fiches_territoires' or structure == 'experiences') %}
{% set css = '' %}
{% endif %}
{% if structure == 'fiches_territoires' or structure == 'experiences' %}
<div class=\"map-articles-previews-header\">
{% if structure == 'fiches_territoires' %}
Listes des territoires
{% else %}
Listes des expériences
{% endif %}
</div>
{% endif %}
<div class=\"{{ css }}\">
\t{% for i, hit in hits %}
\t\t{% set gt_first = \"off\" %}
\t\t{% if loop.first %}
\t\t\t{% set gt_first = \"on\" %}
\t\t{% endif %}
\t\t{% include \"api/blocks/api_search_render.html.twig\" with {id: hit.id, gt_first: gt_first} %}
\t{% endfor %}
</div>
{% include \"blocks/sub-blocks/pagination.html.twig\" %}
", "api/api_search.html.twig", "/var/www/html/templates/api/api_search.html.twig");
}
}