<?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;
/* common/searchResult.html.twig */
class __TwigTemplate_5fa203a16ead76def8e47e0fe5ab2d47 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_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "common/searchResult.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "common/searchResult.html.twig"));
// line 12
echo "
";
// line 13
$macros["selfm"] = $this->macros["selfm"] = $this;
// line 14
if ( !array_key_exists("listWithThumbnails", $context)) {
// line 15
echo " ";
$context["listWithThumbnails"] = false;
}
// line 17
echo "<h1>
\t";
// line 18
if ( !array_key_exists("title", $context)) {
// line 19
echo "\t\tRecherche : ";
echo twig_escape_filter($this->env, (isset($context["term"]) || array_key_exists("term", $context) ? $context["term"] : (function () { throw new RuntimeError('Variable "term" does not exist.', 19, $this->source); })()), "html", null, true);
echo "
\t";
} else {
// line 21
echo "\t\t";
echo (isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 21, $this->source); })());
echo "
\t";
}
// line 23
echo "</h1>
";
// line 27
if (((( !(isset($context["articles"]) || array_key_exists("articles", $context) ? $context["articles"] : (function () { throw new RuntimeError('Variable "articles" does not exist.', 27, $this->source); })()) && !(isset($context["events"]) || array_key_exists("events", $context) ? $context["events"] : (function () { throw new RuntimeError('Variable "events" does not exist.', 27, $this->source); })())) && !(isset($context["questionAnswers"]) || array_key_exists("questionAnswers", $context) ? $context["questionAnswers"] : (function () { throw new RuntimeError('Variable "questionAnswers" does not exist.', 27, $this->source); })())) && !(isset($context["structures"]) || array_key_exists("structures", $context) ? $context["structures"] : (function () { throw new RuntimeError('Variable "structures" does not exist.', 27, $this->source); })()))) {
// line 28
echo "\t
\t<p>Votre recherche <strong>";
// line 29
echo twig_escape_filter($this->env, (isset($context["term"]) || array_key_exists("term", $context) ? $context["term"] : (function () { throw new RuntimeError('Variable "term" does not exist.', 29, $this->source); })()), "html", null, true);
echo "</strong> ne donne aucun résultat.</p>
";
} else {
// line 32
echo "\t<p>
\t\tVoici les résultats de votre recherche : <strong>";
// line 33
echo twig_escape_filter($this->env, (isset($context["term"]) || array_key_exists("term", $context) ? $context["term"] : (function () { throw new RuntimeError('Variable "term" does not exist.', 33, $this->source); })()), "html", null, true);
echo "</strong><br/>
\t\t";
// line 34
if ((((array_key_exists("theme", $context) && !(null === (isset($context["theme"]) || array_key_exists("theme", $context) ? $context["theme"] : (function () { throw new RuntimeError('Variable "theme" does not exist.', 34, $this->source); })()))) && !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["theme"]) || array_key_exists("theme", $context) ? $context["theme"] : (function () { throw new RuntimeError('Variable "theme" does not exist.', 34, $this->source); })()), "tags", [], "any", false, false, false, 34))) && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_EDITOR"))) {
// line 35
echo "\t\t\tLe thème est défini par ces mots-clés : ";
echo twig_escape_filter($this->env, twig_join_filter(twig_get_attribute($this->env, $this->source, (isset($context["theme"]) || array_key_exists("theme", $context) ? $context["theme"] : (function () { throw new RuntimeError('Variable "theme" does not exist.', 35, $this->source); })()), "tags", [], "any", false, false, false, 35), ", "), "html", null, true);
echo "
\t\t";
}
// line 37
echo "\t</p>
\t<div class=\"resultats-recherche-wrapper\">
\t\t";
// line 46
echo "\t\t";
if ((isset($context["questionAnswers"]) || array_key_exists("questionAnswers", $context) ? $context["questionAnswers"] : (function () { throw new RuntimeError('Variable "questionAnswers" does not exist.', 46, $this->source); })())) {
// line 47
echo "\t\t\t";
echo twig_call_macro($macros["selfm"], "macro_renderTeasersList", ["App\\Controller\\QuestionAnswerController::showSearchResult", (isset($context["questionAnswers"]) || array_key_exists("questionAnswers", $context) ? $context["questionAnswers"] : (function () { throw new RuntimeError('Variable "questionAnswers" does not exist.', 47, $this->source); })()), (isset($context["listWithThumbnails"]) || array_key_exists("listWithThumbnails", $context) ? $context["listWithThumbnails"] : (function () { throw new RuntimeError('Variable "listWithThumbnails" does not exist.', 47, $this->source); })())], 47, $context, $this->getSourceContext());
echo "
\t\t";
}
// line 49
echo "\t\t";
if ((isset($context["structures"]) || array_key_exists("structures", $context) ? $context["structures"] : (function () { throw new RuntimeError('Variable "structures" does not exist.', 49, $this->source); })())) {
// line 50
echo "\t\t\t";
echo twig_call_macro($macros["selfm"], "macro_renderTeasersList", ["App\\Controller\\StructureController::showSearchResult", (isset($context["structures"]) || array_key_exists("structures", $context) ? $context["structures"] : (function () { throw new RuntimeError('Variable "structures" does not exist.', 50, $this->source); })()), (isset($context["listWithThumbnails"]) || array_key_exists("listWithThumbnails", $context) ? $context["listWithThumbnails"] : (function () { throw new RuntimeError('Variable "listWithThumbnails" does not exist.', 50, $this->source); })())], 50, $context, $this->getSourceContext());
echo "
\t\t";
}
// line 51
echo "
\t\t";
// line 52
if ((isset($context["articles"]) || array_key_exists("articles", $context) ? $context["articles"] : (function () { throw new RuntimeError('Variable "articles" does not exist.', 52, $this->source); })())) {
echo "\t
\t\t\t";
// line 53
echo twig_call_macro($macros["selfm"], "macro_renderTeasersList", ["App\\Controller\\ArticleController::showSearchResult", (isset($context["articles"]) || array_key_exists("articles", $context) ? $context["articles"] : (function () { throw new RuntimeError('Variable "articles" does not exist.', 53, $this->source); })()), (isset($context["listWithThumbnails"]) || array_key_exists("listWithThumbnails", $context) ? $context["listWithThumbnails"] : (function () { throw new RuntimeError('Variable "listWithThumbnails" does not exist.', 53, $this->source); })())], 53, $context, $this->getSourceContext());
echo "
\t\t";
}
// line 55
echo "\t\t";
if ((isset($context["events"]) || array_key_exists("events", $context) ? $context["events"] : (function () { throw new RuntimeError('Variable "events" does not exist.', 55, $this->source); })())) {
// line 56
echo "\t\t\t";
echo twig_call_macro($macros["selfm"], "macro_renderTeasersList", ["App\\Controller\\EventController::showSearchResult", (isset($context["events"]) || array_key_exists("events", $context) ? $context["events"] : (function () { throw new RuntimeError('Variable "events" does not exist.', 56, $this->source); })()), (isset($context["listWithThumbnails"]) || array_key_exists("listWithThumbnails", $context) ? $context["listWithThumbnails"] : (function () { throw new RuntimeError('Variable "listWithThumbnails" does not exist.', 56, $this->source); })())], 56, $context, $this->getSourceContext());
echo "
\t\t";
}
// line 58
echo "\t</div>
";
}
// line 61
echo "
<p>
\tUne erreur ? Un complément à ajouter ? <a href=\"";
// line 63
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("contact");
echo "\"><strong>Signalez-le nous !</strong></a>
</p>
<h2>Vous souhaitez faire une autre recherche ?</h2>
<div class=\"mt-3 mb-4 themes-search\">
\t<p>Faites une <strong>recherche par thème</strong></p>
\t<div class=\"row row-cols-lg-6 row-cols-md-4 row-cols-sm-3 row-cols-3 themes\">
\t\t";
// line 70
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\ThemeController:showThemes"));
echo "
\t</div>
</div>
<div class=\"recherche\">
\t<p>Ou <strong>tapez un mot-clé</strong></p>
\t";
// line 77
echo "\t";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\TagController:showTagForm"));
echo "
\t<p>
\t\t<a href=\"";
// line 79
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tagsList");
echo "\">Voir la liste des tags</a>
\t</p>
</div>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 1
public function macro_renderTeasersList($__method__ = null, $__entities__ = null, $__listWithThumbnails__ = false, ...$__varargs__)
{
$macros = $this->macros;
$context = $this->env->mergeGlobals([
"method" => $__method__,
"entities" => $__entities__,
"listWithThumbnails" => $__listWithThumbnails__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "renderTeasersList"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "renderTeasersList"));
// line 2
echo " ";
$context["ids"] = "";
// line 3
echo "\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["entities"]) || array_key_exists("entities", $context) ? $context["entities"] : (function () { throw new RuntimeError('Variable "entities" does not exist.', 3, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["entity"]) {
// line 4
echo "\t\t";
if (((isset($context["ids"]) || array_key_exists("ids", $context) ? $context["ids"] : (function () { throw new RuntimeError('Variable "ids" does not exist.', 4, $this->source); })()) == "")) {
// line 5
echo "\t\t\t";
$context["ids"] = ((isset($context["ids"]) || array_key_exists("ids", $context) ? $context["ids"] : (function () { throw new RuntimeError('Variable "ids" does not exist.', 5, $this->source); })()) . twig_get_attribute($this->env, $this->source, $context["entity"], "id", [], "any", false, false, false, 5));
// line 6
echo "\t\t";
} else {
// line 7
echo "\t\t\t";
$context["ids"] = (((isset($context["ids"]) || array_key_exists("ids", $context) ? $context["ids"] : (function () { throw new RuntimeError('Variable "ids" does not exist.', 7, $this->source); })()) . "-") . twig_get_attribute($this->env, $this->source, $context["entity"], "id", [], "any", false, false, false, 7));
// line 8
echo "\t\t";
}
// line 9
echo "\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['entity'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 10
echo "\t";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller((isset($context["method"]) || array_key_exists("method", $context) ? $context["method"] : (function () { throw new RuntimeError('Variable "method" does not exist.', 10, $this->source); })()), ["ids" => (isset($context["ids"]) || array_key_exists("ids", $context) ? $context["ids"] : (function () { throw new RuntimeError('Variable "ids" does not exist.', 10, $this->source); })()), "listWithThumbnails" => (isset($context["listWithThumbnails"]) || array_key_exists("listWithThumbnails", $context) ? $context["listWithThumbnails"] : (function () { throw new RuntimeError('Variable "listWithThumbnails" does not exist.', 10, $this->source); })())]));
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
} finally {
ob_end_clean();
}
}
public function getTemplateName()
{
return "common/searchResult.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 244 => 10, 238 => 9, 235 => 8, 232 => 7, 229 => 6, 226 => 5, 223 => 4, 218 => 3, 215 => 2, 194 => 1, 181 => 79, 175 => 77, 166 => 70, 156 => 63, 152 => 61, 147 => 58, 141 => 56, 138 => 55, 133 => 53, 129 => 52, 126 => 51, 120 => 50, 117 => 49, 111 => 47, 108 => 46, 103 => 37, 97 => 35, 95 => 34, 91 => 33, 88 => 32, 82 => 29, 79 => 28, 77 => 27, 71 => 23, 65 => 21, 59 => 19, 57 => 18, 54 => 17, 50 => 15, 48 => 14, 46 => 13, 43 => 12,);
}
public function getSourceContext()
{
return new Source("{% macro renderTeasersList(method, entities, listWithThumbnails = false) %}
{% set ids = \"\" %}
\t{% for entity in entities %}
\t\t{% if ids == \"\" %}
\t\t\t{% set ids = ids ~ entity.id %}
\t\t{% else %}
\t\t\t{% set ids = ids ~ \"-\" ~ entity.id %}
\t\t{% endif %}
\t{% endfor %}
\t{{ render(controller(method, {'ids': ids, 'listWithThumbnails': listWithThumbnails})) }}
{% endmacro %}
{% import _self as selfm %}
{% if listWithThumbnails is not defined %}
{% set listWithThumbnails = false %}
{% endif %}
<h1>
\t{% if title is not defined %}
\t\tRecherche : {{term}}
\t{% else %}
\t\t{{ title|raw }}
\t{% endif %}
</h1>
{% if not articles and not events and not questionAnswers and not structures %}
\t
\t<p>Votre recherche <strong>{{term}}</strong> ne donne aucun résultat.</p>
{% else %}
\t<p>
\t\tVoici les résultats de votre recherche : <strong>{{term}}</strong><br/>
\t\t{% if theme is defined and theme is not null and theme.tags is not empty and is_granted('ROLE_EDITOR') %}
\t\t\tLe thème est défini par ces mots-clés : {{ theme.tags|join(\", \") }}
\t\t{% endif %}
\t</p>
\t<div class=\"resultats-recherche-wrapper\">
\t\t{#
\t\t{{ dump(articles) }}
\t\t{{ dump(events) }}
\t\t{{ dump(questionAnswers) }}
\t\t{{ dump(structures) }}
\t\t#}
\t\t{% if questionAnswers %}
\t\t\t{{ selfm.renderTeasersList('App\\\\Controller\\\\QuestionAnswerController::showSearchResult', questionAnswers, listWithThumbnails) }}
\t\t{% endif %}
\t\t{% if structures %}
\t\t\t{{ selfm.renderTeasersList('App\\\\Controller\\\\StructureController::showSearchResult', structures, listWithThumbnails) }}
\t\t{% endif %}
\t\t{% if articles %}\t
\t\t\t{{ selfm.renderTeasersList('App\\\\Controller\\\\ArticleController::showSearchResult', articles, listWithThumbnails) }}
\t\t{% endif %}
\t\t{% if events %}
\t\t\t{{ selfm.renderTeasersList('App\\\\Controller\\\\EventController::showSearchResult', events, listWithThumbnails) }}
\t\t{% endif %}
\t</div>
{% endif %}
<p>
\tUne erreur ? Un complément à ajouter ? <a href=\"{{ path('contact') }}\"><strong>Signalez-le nous !</strong></a>
</p>
<h2>Vous souhaitez faire une autre recherche ?</h2>
<div class=\"mt-3 mb-4 themes-search\">
\t<p>Faites une <strong>recherche par thème</strong></p>
\t<div class=\"row row-cols-lg-6 row-cols-md-4 row-cols-sm-3 row-cols-3 themes\">
\t\t{{ render(controller('App\\\\Controller\\\\ThemeController:showThemes')) }}
\t</div>
</div>
<div class=\"recherche\">
\t<p>Ou <strong>tapez un mot-clé</strong></p>
\t{# {{ form(searchForm) }} #}
\t{{ render(controller('App\\\\Controller\\\\TagController:showTagForm')) }}
\t<p>
\t\t<a href=\"{{ path('tagsList') }}\">Voir la liste des tags</a>
\t</p>
</div>", "common/searchResult.html.twig", "/home/ovow2306/public_html/ici-grenoble/ici-gre-back-dev/templates/common/searchResult.html.twig");
}
}