<?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;
/* search/index.html.twig */
class __TwigTemplate_001dda0766b1f85f76c944e9c202fb95 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'stylesheets' => [$this, 'block_stylesheets'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 3
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", "search/index.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "search/index.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "search/index.html.twig", 3);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 5
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, (isset($context["search"]) || array_key_exists("search", $context) ? $context["search"] : (function () { throw new RuntimeError('Variable "search" does not exist.', 5, $this->source); })()), "html", null, true);
echo " | Recherche ";
$this->displayParentBlock("title", $context, $blocks);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 7
public function block_stylesheets($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", "stylesheets"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 8
echo " ";
echo $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("app");
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 11
public function block_content($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", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 13
echo "<div id = \"secondDiv\">
<form class=\"d-flex\" method=\"get\" action=\"/search\">
<div id=\"rechercheInput\">
";
// line 17
echo " ";
// line 18
echo " <input class=\"form-control\" id=\"searchbar2\" type=\"text\" style=\"\" placeholder=\"Recherche\" name=\"q\" value=\"";
echo twig_escape_filter($this->env, (isset($context["search"]) || array_key_exists("search", $context) ? $context["search"] : (function () { throw new RuntimeError('Variable "search" does not exist.', 18, $this->source); })()), "html", null, true);
echo "\" required>
";
// line 20
echo " <button id=\"search-button\" class=\"Btn_primary\" type=\"submit\" >Rechercher</button>
</div>
</form>
";
// line 24
echo " <div class=\"input-field selectWrapper\" id=\"filtreSelect\">
<select name=\"filtres\" id=\"sorts\" class=\"select\">
<option value=\"0\">Filtrer la recherche</option>
<option value=\"1\">Les moins vus</option>
<option value=\"2\">Les plus vus</option>
<option value=\"3\">Les plus récents</option>
<option value=\"4\">Les moins récents</option>
</select>
<span class=\"focus\"></span>
</div>
";
// line 35
echo "
<div id=\"articlesContainer\" class=\"container\">
</div>
<div class=\"container\" id=\"recoContainer\">
<h2 class=\"section_title h2\">Parcours recommandé ! </h2>
";
// line 41
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\RecoController::index"));
echo "
</div>
";
// line 45
$this->loadTemplate("footer/index.html.twig", "search/index.html.twig", 45)->display($context);
// line 46
echo "
</div>
";
// line 48
$this->loadTemplate("includes/volet.html.twig", "search/index.html.twig", 48)->display($context);
// line 88
echo "
";
// line 90
echo "
<script type=\"module\">
import ui_search from \"/assets/js/ui/ui_search.js\";
import gestionVue from \"/assets/js/gestionVue.js\";
//Id de l'utilisateur
";
// line 96
echo " //recherche effectué dans le moteur de recherche
var request = \"";
// line 97
echo twig_escape_filter($this->env, (isset($context["search"]) || array_key_exists("search", $context) ? $context["search"] : (function () { throw new RuntimeError('Variable "search" does not exist.', 97, $this->source); })()), "html", null, true);
echo "\";
// Onload
\$(document).ready(function()
{
// Si l'utilisateur est connectée
";
// line 102
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
// line 103
echo " let user_id = parseInt(";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 103, $this->source); })()), "user", [], "any", false, false, false, 103), "id", [], "any", false, false, false, 103), "html", null, true);
echo ");
ui_search.init_is_granted(user_id , request);
";
} else {
// line 106
echo " ui_search.init(request);
//ui_search.init(user_id, request);
";
}
// line 109
echo " gestionVue.initialisation();
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "search/index.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 201 => 109, 196 => 106, 189 => 103, 187 => 102, 179 => 97, 176 => 96, 169 => 90, 166 => 88, 164 => 48, 160 => 46, 158 => 45, 151 => 41, 143 => 35, 131 => 24, 126 => 20, 121 => 18, 119 => 17, 114 => 13, 104 => 11, 91 => 8, 81 => 7, 60 => 5, 37 => 3,);
}
public function getSourceContext()
{
return new Source("{# templates/search/index.html.twig #}
{% extends \"base.html.twig\" %}
{% block title %}{{ search }} | Recherche {{ parent() }}{% endblock %}
{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}
{% block content %}
{# <div id = \"mainDiv\"> #}
<div id = \"secondDiv\">
<form class=\"d-flex\" method=\"get\" action=\"/search\">
<div id=\"rechercheInput\">
{# <div class=\"input-field\" id=\"input-field-search\"> #}
{# <i class=\"material-icons prefix\">search</i> #}
<input class=\"form-control\" id=\"searchbar2\" type=\"text\" style=\"\" placeholder=\"Recherche\" name=\"q\" value=\"{{ search }}\" required>
{# </div> #}
<button id=\"search-button\" class=\"Btn_primary\" type=\"submit\" >Rechercher</button>
</div>
</form>
{# <div id=\"filtreSelect\"> #}
<div class=\"input-field selectWrapper\" id=\"filtreSelect\">
<select name=\"filtres\" id=\"sorts\" class=\"select\">
<option value=\"0\">Filtrer la recherche</option>
<option value=\"1\">Les moins vus</option>
<option value=\"2\">Les plus vus</option>
<option value=\"3\">Les plus récents</option>
<option value=\"4\">Les moins récents</option>
</select>
<span class=\"focus\"></span>
</div>
{# </div> #}
<div id=\"articlesContainer\" class=\"container\">
</div>
<div class=\"container\" id=\"recoContainer\">
<h2 class=\"section_title h2\">Parcours recommandé ! </h2>
{{ render(controller('App\\\\Controller\\\\RecoController::index')) }}
</div>
{% include \"footer/index.html.twig\" %}
</div>
{% include \"includes/volet.html.twig\" %}
{#
<div id = \"containerVolet\" class=\"fermer\">
<div id =\"voletIcon\" class = \"volet\">
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-arrow-bar-left\" viewBox=\"0 0 16 16\">
<path fill-rule=\"evenodd\" d=\"M12.5 15a.5.5 0 0 1-.5-.5v-13a.5.5 0 0 1 1 0v13a.5.5 0 0 1-.5.5zM10 8a.5.5 0 0 1-.5.5H3.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L3.707 7.5H9.5a.5.5 0 0 1 .5.5z\"/>
</svg>
</div>
<div id =\"previewIcon\" class = \"volet\">
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"25\" height=\"25\" fill=\"currentColor\" class=\"bi bi-justify\" viewBox=\"0 0 25 25\">
<path fill-rule=\"evenodd\" d=\"M2 12.5a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z\"/>
</svg>
</div>
<div id =\"chatIcon\" class = \"volet\">
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-chat-left\" viewBox=\"0 0 16 16\">
<path d=\"M14 1a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4.414A2 2 0 0 0 3 11.586l-2 2V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12.793a.5.5 0 0 0 .854.353l2.853-2.853A1 1 0 0 1 4.414 12H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z\"/>
</svg>
</div>
<div id =\"paperclipIcon\" class = \"volet\">
<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-paperclip\" viewBox=\"0 0 16 16\">
<path d=\"M4.5 3a2.5 2.5 0 0 1 5 0v9a1.5 1.5 0 0 1-3 0V5a.5.5 0 0 1 1 0v7a.5.5 0 0 0 1 0V3a1.5 1.5 0 1 0-3 0v9a2.5 2.5 0 0 0 5 0V5a.5.5 0 0 1 1 0v7a3.5 3.5 0 1 1-7 0V3z\"/>
</svg>
</div>
</div>
<div id =\"mainVolet\" class = \"volet_clos mainVolet\">
<div id = \"articleContainer\" >
<div class = \"containerMessageArticle\"> <p class =\"messageArticle\">Cliquez sur un article pour pouvoir accéder à une prévisualisation</p></div>
</div>
<div id = \"commentaireContainer\" class =\"container_hidden\">
<div class = \"containerMessageArticle\"> <p class =\"messageArticle\">Cliquez sur un article pour pouvoir accéder à une prévisualisation</p></div>
</div>
<div id = \"attachmentWallContainer\" class =\"container_hidden\">
<div class = \"containerMessageArticle\"> <p class =\"messageArticle\">Cliquez sur un article pour pouvoir accéder à une prévisualisation</p></div>
</div>
</div> #}
{# </div> #}
<script type=\"module\">
import ui_search from \"/assets/js/ui/ui_search.js\";
import gestionVue from \"/assets/js/gestionVue.js\";
//Id de l'utilisateur
{# var user_id = parseInt({{ app.user.id }}); #}
//recherche effectué dans le moteur de recherche
var request = \"{{ search }}\";
// Onload
\$(document).ready(function()
{
// Si l'utilisateur est connectée
{% if is_granted(\"ROLE_USER\") %}
let user_id = parseInt({{ app.user.id }});
ui_search.init_is_granted(user_id , request);
{% else %}
ui_search.init(request);
//ui_search.init(user_id, request);
{% endif %}
gestionVue.initialisation();
});
</script>
{% endblock %}", "search/index.html.twig", "/var/www/dev.portail-lune.fr/PortailLune/templates/search/index.html.twig");
}
}