<?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;
/* fiche/_includes/contexte-recherche.html.twig */
class __TwigTemplate_425cc135202ac3d6d6d4e7bfd82a94a3acfa0510ef17d726bcdde2780af88092 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", "fiche/_includes/contexte-recherche.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "fiche/_includes/contexte-recherche.html.twig"));
// line 1
if (((isset($context["precedent"]) || array_key_exists("precedent", $context) ? $context["precedent"] : (function () { throw new RuntimeError('Variable "precedent" does not exist.', 1, $this->source); })()) || (isset($context["suivant"]) || array_key_exists("suivant", $context) ? $context["suivant"] : (function () { throw new RuntimeError('Variable "suivant" does not exist.', 1, $this->source); })()))) {
// line 2
echo "<div class=\"recherche-contexte\" role=\"group\">
";
// line 4
if (((isset($context["precedent"]) || array_key_exists("precedent", $context) ? $context["precedent"] : (function () { throw new RuntimeError('Variable "precedent" does not exist.', 4, $this->source); })()) && !twig_in_filter(twig_get_attribute($this->env, $this->source, (isset($context["etablissement"]) || array_key_exists("etablissement", $context) ? $context["etablissement"] : (function () { throw new RuntimeError('Variable "etablissement" does not exist.', 4, $this->source); })()), "typeClient", [], "any", false, false, false, 4), [0 => "organisme", 1 => "fournisseur"]))) {
// line 5
echo " <a href=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["pathBuilder"]) || array_key_exists("pathBuilder", $context) ? $context["pathBuilder"] : (function () { throw new RuntimeError('Variable "pathBuilder" does not exist.', 5, $this->source); })()), "buildFiche", [0 => (isset($context["precedent"]) || array_key_exists("precedent", $context) ? $context["precedent"] : (function () { throw new RuntimeError('Variable "precedent" does not exist.', 5, $this->source); })())], "method", false, false, false, 5), "html", null, true);
echo "\" class=\"precedent\">";
echo "</a>
";
} else {
// line 7
echo " <a href=\"#\" class=\"precedent no-view\">";
echo "</a>
";
}
// line 9
echo "
";
// line 10
if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, (isset($context["etablissement"]) || array_key_exists("etablissement", $context) ? $context["etablissement"] : (function () { throw new RuntimeError('Variable "etablissement" does not exist.', 10, $this->source); })()), "typeClient", [], "any", false, false, false, 10), "organisme"))) {
// line 11
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("organisme");
echo "\" class=\"liste ";
echo (( !(isset($context["precedent"]) || array_key_exists("precedent", $context) ? $context["precedent"] : (function () { throw new RuntimeError('Variable "precedent" does not exist.', 11, $this->source); })())) ? ("pas-precedent") : (""));
echo "\">
Liste de résultats
</a>
";
} elseif ((0 === twig_compare(twig_get_attribute($this->env, $this->source, // line 14
(isset($context["etablissement"]) || array_key_exists("etablissement", $context) ? $context["etablissement"] : (function () { throw new RuntimeError('Variable "etablissement" does not exist.', 14, $this->source); })()), "typeClient", [], "any", false, false, false, 14), "fournisseur"))) {
// line 15
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fournisseur");
echo "\" class=\"liste ";
echo (( !(isset($context["precedent"]) || array_key_exists("precedent", $context) ? $context["precedent"] : (function () { throw new RuntimeError('Variable "precedent" does not exist.', 15, $this->source); })())) ? ("pas-precedent") : (""));
echo "\">
Liste de résultats
</a>
";
} elseif (( // line 18
(isset($context["quoi"]) || array_key_exists("quoi", $context) ? $context["quoi"] : (function () { throw new RuntimeError('Variable "quoi" does not exist.', 18, $this->source); })()) && (isset($context["lieu"]) || array_key_exists("lieu", $context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.', 18, $this->source); })()))) {
// line 19
echo " ";
$context["quoi"] = twig_get_attribute($this->env, $this->source, (isset($context["slugify"]) || array_key_exists("slugify", $context) ? $context["slugify"] : (function () { throw new RuntimeError('Variable "slugify" does not exist.', 19, $this->source); })()), "revealQuoi", [0 => (isset($context["quoi"]) || array_key_exists("quoi", $context) ? $context["quoi"] : (function () { throw new RuntimeError('Variable "quoi" does not exist.', 19, $this->source); })())], "method", false, false, false, 19);
// line 20
echo " ";
$context["lieu"] = twig_get_attribute($this->env, $this->source, (isset($context["slugify"]) || array_key_exists("slugify", $context) ? $context["slugify"] : (function () { throw new RuntimeError('Variable "slugify" does not exist.', 20, $this->source); })()), "revealLieu", [0 => (isset($context["lieu"]) || array_key_exists("lieu", $context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.', 20, $this->source); })())], "method", false, false, false, 20);
// line 21
echo " ";
if (((isset($context["quoi"]) || array_key_exists("quoi", $context) ? $context["quoi"] : (function () { throw new RuntimeError('Variable "quoi" does not exist.', 21, $this->source); })()) && (isset($context["lieu"]) || array_key_exists("lieu", $context) ? $context["lieu"] : (function () { throw new RuntimeError('Variable "lieu" does not exist.', 21, $this->source); })()))) {
// line 22
echo " <a href=\"";
echo twig_escape_filter($this->env, (isset($context["urlPagePrecedente"]) || array_key_exists("urlPagePrecedente", $context) ? $context["urlPagePrecedente"] : (function () { throw new RuntimeError('Variable "urlPagePrecedente" does not exist.', 22, $this->source); })()), "html", null, true);
echo "\" class=\"liste ";
echo (( !(isset($context["precedent"]) || array_key_exists("precedent", $context) ? $context["precedent"] : (function () { throw new RuntimeError('Variable "precedent" does not exist.', 22, $this->source); })())) ? ("pas-precedent") : (""));
echo "\">
Liste de résultats
</a>
";
}
// line 26
echo " ";
}
// line 27
echo "
";
// line 28
if (!twig_in_filter(twig_get_attribute($this->env, $this->source, (isset($context["etablissement"]) || array_key_exists("etablissement", $context) ? $context["etablissement"] : (function () { throw new RuntimeError('Variable "etablissement" does not exist.', 28, $this->source); })()), "typeClient", [], "any", false, false, false, 28), [0 => "organisme", 1 => "fournisseur"])) {
// line 29
echo " ";
if ((isset($context["suivant"]) || array_key_exists("suivant", $context) ? $context["suivant"] : (function () { throw new RuntimeError('Variable "suivant" does not exist.', 29, $this->source); })())) {
// line 30
echo " <a href=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["pathBuilder"]) || array_key_exists("pathBuilder", $context) ? $context["pathBuilder"] : (function () { throw new RuntimeError('Variable "pathBuilder" does not exist.', 30, $this->source); })()), "buildFiche", [0 => (isset($context["suivant"]) || array_key_exists("suivant", $context) ? $context["suivant"] : (function () { throw new RuntimeError('Variable "suivant" does not exist.', 30, $this->source); })())], "method", false, false, false, 30), "html", null, true);
echo "\" class=\"suivant\">";
echo "</a>
";
} else {
// line 32
echo " <button type=\"button\" class=\"suivant\" disabled>
";
// line 34
echo " </button>
";
}
// line 36
echo " ";
}
// line 37
echo "
</div>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "fiche/_includes/contexte-recherche.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 137 => 37, 134 => 36, 130 => 34, 127 => 32, 120 => 30, 117 => 29, 115 => 28, 112 => 27, 109 => 26, 99 => 22, 96 => 21, 93 => 20, 90 => 19, 88 => 18, 79 => 15, 77 => 14, 68 => 11, 66 => 10, 63 => 9, 58 => 7, 51 => 5, 49 => 4, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% if precedent or suivant %}
<div class=\"recherche-contexte\" role=\"group\">
{% if precedent and etablissement.typeClient not in ['organisme', 'fournisseur'] %}
<a href=\"{{ pathBuilder.buildFiche(precedent) }}\" class=\"precedent\">{#Précedent#}</a>
{% else %}
<a href=\"#\" class=\"precedent no-view\">{#Précedent#}</a>
{% endif %}
{% if etablissement.typeClient == 'organisme' %}
<a href=\"{{path ('organisme')}}\" class=\"liste {{ not precedent ? 'pas-precedent' }}\">
Liste de résultats
</a>
{% elseif etablissement.typeClient == 'fournisseur' %}
<a href=\"{{path ('fournisseur')}}\" class=\"liste {{ not precedent ? 'pas-precedent' }}\">
Liste de résultats
</a>
{% elseif quoi and lieu %}
{% set quoi = slugify.revealQuoi(quoi) %}
{% set lieu = slugify.revealLieu(lieu) %}
{% if quoi and lieu %}
<a href=\"{{urlPagePrecedente}}\" class=\"liste {{ not precedent ? 'pas-precedent' }}\">
Liste de résultats
</a>
{% endif %}
{% endif %}
{% if etablissement.typeClient not in ['organisme', 'fournisseur'] %}
{% if suivant %}
<a href=\"{{ pathBuilder.buildFiche(suivant) }}\" class=\"suivant\">{#Suivant#}</a>
{% else %}
<button type=\"button\" class=\"suivant\" disabled>
{#Suivant#}
</button>
{% endif %}
{% endif %}
</div>
{% endif %}
", "fiche/_includes/contexte-recherche.html.twig", "/app/templates/fiche/_includes/contexte-recherche.html.twig");
}
}