var/cache/dev/twig/d7/d76ba97b9aecc9158e6c9b9d28cb9e4b.php line 151

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* search/index.html.twig */
  14. class __TwigTemplate_001dda0766b1f85f76c944e9c202fb95 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'title' => [$this'block_title'],
  24.             'stylesheets' => [$this'block_stylesheets'],
  25.             'content' => [$this'block_content'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 3
  31.         return "base.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""search/index.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""search/index.html.twig"));
  40.         $this->parent $this->loadTemplate("base.html.twig""search/index.html.twig"3);
  41.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  44.         
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  46.     }
  47.     // line 5
  48.     public function block_title($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  55.         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"nulltrue);
  56.         echo " | Recherche ";
  57.         $this->displayParentBlock("title"$context$blocks);
  58.         
  59.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  60.         
  61.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  62.     }
  63.     // line 7
  64.     public function block_stylesheets($context, array $blocks = [])
  65.     {
  66.         $macros $this->macros;
  67.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  68.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  69.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  70.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  71.         // line 8
  72.         echo "    ";
  73.         echo $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("app");
  74.         echo "
  75. ";
  76.         
  77.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  78.         
  79.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  80.     }
  81.     // line 11
  82.     public function block_content($context, array $blocks = [])
  83.     {
  84.         $macros $this->macros;
  85.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  86.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  87.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  88.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  89.         // line 13
  90.         echo "<div id = \"secondDiv\">
  91.     <form class=\"d-flex\" method=\"get\" action=\"/search\">
  92.         <div id=\"rechercheInput\">
  93.             ";
  94.         // line 17
  95.         echo "                ";
  96.         // line 18
  97.         echo "                <input class=\"form-control\" id=\"searchbar2\" type=\"text\" style=\"\" placeholder=\"Recherche\" name=\"q\" value=\"";
  98.         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"nulltrue);
  99.         echo "\" required>
  100.             ";
  101.         // line 20
  102.         echo "            <button id=\"search-button\" class=\"Btn_primary\" type=\"submit\" >Rechercher</button>
  103.         </div>
  104.     </form>
  105.     ";
  106.         // line 24
  107.         echo "        <div class=\"input-field selectWrapper\" id=\"filtreSelect\">
  108.             <select name=\"filtres\" id=\"sorts\" class=\"select\">
  109.                 <option value=\"0\">Filtrer la recherche</option>
  110.                 <option value=\"1\">Les moins vus</option>
  111.                 <option value=\"2\">Les plus vus</option>
  112.                 <option value=\"3\">Les plus récents</option>
  113.                 <option value=\"4\">Les moins récents</option>
  114.             </select>
  115.             <span class=\"focus\"></span>
  116.         </div>
  117.     ";
  118.         // line 35
  119.         echo "    
  120.     <div id=\"articlesContainer\" class=\"container\">
  121.     </div>
  122.     
  123.     <div class=\"container\" id=\"recoContainer\">
  124.         <h2 class=\"section_title h2\">Parcours recommandé ! </h2>
  125.         ";
  126.         // line 41
  127.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\RecoController::index"));
  128.         echo "
  129.     </div>
  130.     
  131.             ";
  132.         // line 45
  133.         $this->loadTemplate("footer/index.html.twig""search/index.html.twig"45)->display($context);
  134.         // line 46
  135.         echo "
  136. </div>
  137. ";
  138.         // line 48
  139.         $this->loadTemplate("includes/volet.html.twig""search/index.html.twig"48)->display($context);
  140.         // line 88
  141.         echo "
  142.     ";
  143.         // line 90
  144.         echo "
  145.     <script type=\"module\">
  146.         import ui_search from \"/assets/js/ui/ui_search.js\";
  147.         import gestionVue from \"/assets/js/gestionVue.js\";
  148.         //Id de l'utilisateur
  149.         ";
  150.         // line 96
  151.         echo "        //recherche effectué dans le moteur de recherche
  152.         var request = \"";
  153.         // line 97
  154.         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"nulltrue);
  155.         echo "\";
  156.         // Onload 
  157.         \$(document).ready(function()
  158.         {
  159.             // Si l'utilisateur est connectée
  160.             ";
  161.         // line 102
  162.         if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
  163.             // line 103
  164.             echo "            let user_id = parseInt(";
  165.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse103), "id", [], "any"falsefalsefalse103), "html"nulltrue);
  166.             echo ");
  167.             ui_search.init_is_granted(user_id , request);           
  168.             ";
  169.         } else {
  170.             // line 106
  171.             echo "            ui_search.init(request);
  172.             //ui_search.init(user_id, request);
  173.             ";
  174.         }
  175.         // line 109
  176.         echo "            gestionVue.initialisation();
  177.         });
  178.         
  179.     </script>
  180. ";
  181.         
  182.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  183.         
  184.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  185.     }
  186.     /**
  187.      * @codeCoverageIgnore
  188.      */
  189.     public function getTemplateName()
  190.     {
  191.         return "search/index.html.twig";
  192.     }
  193.     /**
  194.      * @codeCoverageIgnore
  195.      */
  196.     public function isTraitable()
  197.     {
  198.         return false;
  199.     }
  200.     /**
  201.      * @codeCoverageIgnore
  202.      */
  203.     public function getDebugInfo()
  204.     {
  205.         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,);
  206.     }
  207.     public function getSourceContext()
  208.     {
  209.         return new Source("{# templates/search/index.html.twig #}
  210. {% extends \"base.html.twig\" %}
  211. {% block title %}{{ search }} | Recherche {{ parent() }}{% endblock %}
  212. {% block stylesheets %}
  213.     {{ encore_entry_link_tags('app') }}
  214. {% endblock %}
  215. {% block content %}
  216. {# <div id = \"mainDiv\"> #}
  217. <div id = \"secondDiv\">
  218.     <form class=\"d-flex\" method=\"get\" action=\"/search\">
  219.         <div id=\"rechercheInput\">
  220.             {# <div class=\"input-field\" id=\"input-field-search\"> #}
  221.                 {# <i class=\"material-icons prefix\">search</i> #}
  222.                 <input class=\"form-control\" id=\"searchbar2\" type=\"text\" style=\"\" placeholder=\"Recherche\" name=\"q\" value=\"{{ search }}\" required>
  223.             {# </div> #}
  224.             <button id=\"search-button\" class=\"Btn_primary\" type=\"submit\" >Rechercher</button>
  225.         </div>
  226.     </form>
  227.     {# <div id=\"filtreSelect\"> #}
  228.         <div class=\"input-field selectWrapper\" id=\"filtreSelect\">
  229.             <select name=\"filtres\" id=\"sorts\" class=\"select\">
  230.                 <option value=\"0\">Filtrer la recherche</option>
  231.                 <option value=\"1\">Les moins vus</option>
  232.                 <option value=\"2\">Les plus vus</option>
  233.                 <option value=\"3\">Les plus récents</option>
  234.                 <option value=\"4\">Les moins récents</option>
  235.             </select>
  236.             <span class=\"focus\"></span>
  237.         </div>
  238.     {# </div> #}
  239.     
  240.     <div id=\"articlesContainer\" class=\"container\">
  241.     </div>
  242.     
  243.     <div class=\"container\" id=\"recoContainer\">
  244.         <h2 class=\"section_title h2\">Parcours recommandé ! </h2>
  245.         {{ render(controller('App\\\\Controller\\\\RecoController::index')) }}
  246.     </div>
  247.     
  248.             {% include \"footer/index.html.twig\" %}
  249. </div>
  250. {% include \"includes/volet.html.twig\" %}
  251. {# 
  252.     
  253.     <div id = \"containerVolet\" class=\"fermer\">
  254.         <div id =\"voletIcon\" class = \"volet\">
  255.             <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\">
  256.             <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\"/>
  257.             </svg>
  258.         </div>
  259.         <div id =\"previewIcon\" class = \"volet\">
  260.             <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"25\" height=\"25\" fill=\"currentColor\" class=\"bi bi-justify\" viewBox=\"0 0 25 25\">
  261.             <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\"/>
  262.             </svg>
  263.         </div>
  264.         <div id =\"chatIcon\" class = \"volet\">
  265.             <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-chat-left\" viewBox=\"0 0 16 16\">
  266.             <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\"/>
  267.             </svg>
  268.         </div>
  269.         <div id =\"paperclipIcon\" class = \"volet\">
  270.             <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-paperclip\" viewBox=\"0 0 16 16\">
  271.                 <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\"/>
  272.             </svg>
  273.         </div> 
  274.     </div>
  275.       
  276.     <div id =\"mainVolet\" class = \"volet_clos mainVolet\">
  277.       <div id = \"articleContainer\" >
  278.         <div class = \"containerMessageArticle\"> <p class =\"messageArticle\">Cliquez sur un article pour pouvoir accéder à une prévisualisation</p></div>
  279.       </div>
  280.       <div id = \"commentaireContainer\" class =\"container_hidden\">
  281.         <div class = \"containerMessageArticle\"> <p class =\"messageArticle\">Cliquez sur un article pour pouvoir accéder à une prévisualisation</p></div>
  282.       </div>
  283.       
  284.       <div id = \"attachmentWallContainer\" class =\"container_hidden\">
  285.         <div class = \"containerMessageArticle\"> <p class =\"messageArticle\">Cliquez sur un article pour pouvoir accéder à une prévisualisation</p></div>
  286.       </div>
  287.     </div> #}
  288.     {# </div> #}
  289.     <script type=\"module\">
  290.         import ui_search from \"/assets/js/ui/ui_search.js\";
  291.         import gestionVue from \"/assets/js/gestionVue.js\";
  292.         //Id de l'utilisateur
  293.         {# var user_id = parseInt({{ app.user.id }}); #}
  294.         //recherche effectué dans le moteur de recherche
  295.         var request = \"{{ search }}\";
  296.         // Onload 
  297.         \$(document).ready(function()
  298.         {
  299.             // Si l'utilisateur est connectée
  300.             {% if is_granted(\"ROLE_USER\") %}
  301.             let user_id = parseInt({{ app.user.id }});
  302.             ui_search.init_is_granted(user_id , request);           
  303.             {% else %}
  304.             ui_search.init(request);
  305.             //ui_search.init(user_id, request);
  306.             {% endif %}
  307.             gestionVue.initialisation();
  308.         });
  309.         
  310.     </script>
  311. {% endblock %}""search/index.html.twig""/var/www/dev.portail-lune.fr/PortailLune/templates/search/index.html.twig");
  312.     }
  313. }