var/cache/dev/twig/fe/fe807910e70d694216564147012d2ce5fdc7c5f155719710d1a70d4c77f0f826.php line 49

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. /* home/home.html.twig */
  14. class __TwigTemplate_4714168958827dfa9fd33a536ad93c3aab99e1de6aa94b6cf9fb6f6dd1a3f4ce 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.             'body' => [$this'block_body'],
  24.             'javascripts' => [$this'block_javascripts'],
  25.         ];
  26.     }
  27.     protected function doGetParent(array $context)
  28.     {
  29.         // line 1
  30.         return "base.html.twig";
  31.     }
  32.     protected function doDisplay(array $context, array $blocks = [])
  33.     {
  34.         $macros $this->macros;
  35.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  36.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""home/home.html.twig"));
  37.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  38.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""home/home.html.twig"));
  39.         $this->parent $this->loadTemplate("base.html.twig""home/home.html.twig"1);
  40.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  41.         
  42.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  43.         
  44.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  45.     }
  46.     // line 3
  47.     public function block_body($context, array $blocks = [])
  48.     {
  49.         $macros $this->macros;
  50.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  51.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  52.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  53.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  54.         // line 4
  55.         echo "    <h1>Page d'accueil</h1>
  56.     ";
  57.         // line 5
  58.         if (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.'5$this->source); })()), "user", [], "any"falsefalsefalse5)) {
  59.             // line 6
  60.             echo "        <fieldset>
  61.         ";
  62.             // line 7
  63.             if ((isset($context["articles"]) || array_key_exists("articles"$context) ? $context["articles"] : (function () { throw new RuntimeError('Variable "articles" does not exist.'7$this->source); })())) {
  64.                 // line 8
  65.                 echo "            <legend>NEWS : </legend>
  66.             ";
  67.                 // line 11
  68.                 $context['_parent'] = $context;
  69.                 $context['_seq'] = twig_ensure_traversable((isset($context["articles"]) || array_key_exists("articles"$context) ? $context["articles"] : (function () { throw new RuntimeError('Variable "articles" does not exist.'11$this->source); })()));
  70.                 foreach ($context['_seq'] as $context["_key"] => $context["article"]) {
  71.                     // line 12
  72.                     echo "                <div style=\"border: thin solid black\">
  73.                     <h4>";
  74.                     // line 13
  75.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["article"], "nomArticle", [], "any"falsefalsefalse13), "html"nulltrue);
  76.                     echo "</h4>
  77.                     ";
  78.                     // line 14
  79.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["article"], "textArticle", [], "any"falsefalsefalse14), "html"nulltrue);
  80.                     echo "
  81.                     <br><br>
  82.                     Documents :
  83.                     <br>
  84.                     ";
  85.                     // line 19
  86.                     $context["exist"] = 0;
  87.                     // line 20
  88.                     echo "                    ";
  89.                     $context['_parent'] = $context;
  90.                     $context['_seq'] = twig_ensure_traversable((isset($context["docs"]) || array_key_exists("docs"$context) ? $context["docs"] : (function () { throw new RuntimeError('Variable "docs" does not exist.'20$this->source); })()));
  91.                     foreach ($context['_seq'] as $context["_key"] => $context["file"]) {
  92.                         // line 21
  93.                         echo "                        ";
  94.                         if ((twig_get_attribute($this->env$this->source$context["file"], "article", [], "any"falsefalsefalse21) == $context["article"])) {
  95.                             // line 22
  96.                             echo "                            ";
  97.                             $context["exist"] = 1;
  98.                             // line 23
  99.                             echo "                            <br>
  100.                             <a href=\"";
  101.                             // line 24
  102.                             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("openFileArticle", ["file" => twig_get_attribute($this->env$this->source$context["file"], "farId", [], "any"falsefalsefalse24)]), "html"nulltrue);
  103.                             echo "\">
  104.                                 ";
  105.                             // line 25
  106.                             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["file"], "farnomuser", [], "any"falsefalsefalse25), "html"nulltrue);
  107.                             echo "
  108.                             </a>
  109.                         ";
  110.                         }
  111.                         // line 28
  112.                         echo "                    ";
  113.                     }
  114.                     $_parent $context['_parent'];
  115.                     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['file'], $context['_parent'], $context['loop']);
  116.                     $context array_intersect_key($context$_parent) + $_parent;
  117.                     // line 29
  118.                     echo "                    ";
  119.                     if (((isset($context["exist"]) || array_key_exists("exist"$context) ? $context["exist"] : (function () { throw new RuntimeError('Variable "exist" does not exist.'29$this->source); })()) == 0)) {
  120.                         // line 30
  121.                         echo "                        Aucun document.
  122.                     ";
  123.                     }
  124.                     // line 32
  125.                     echo "                    <br><br>
  126.                     Date de création : ";
  127.                     // line 33
  128.                     echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["article"], "dateArticle", [], "any"falsefalsefalse33), "d/m/Y"), "html"nulltrue);
  129.                     echo "
  130.                     <br>
  131.                     ";
  132.                     // line 37
  133.                     $context['_parent'] = $context;
  134.                     $context['_seq'] = twig_ensure_traversable(twig_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.'37$this->source); })()), "user", [], "any"falsefalsefalse37), "roles", [], "method"falsefalsefalse37));
  135.                     foreach ($context['_seq'] as $context["_key"] => $context["role"]) {
  136.                         // line 38
  137.                         echo "                        ";
  138.                         if (($context["role"] == "ROLE_SUPER_ADMIN")) {
  139.                             // line 39
  140.                             echo "
  141.                             <br>
  142.                             <a href=\"";
  143.                             // line 41
  144.                             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("validationDeleteArticle", ["idArticle" => twig_get_attribute($this->env$this->source$context["article"], "idArticle", [], "any"falsefalsefalse41)]), "html"nulltrue);
  145.                             echo "\">Supprimer l'article </a>
  146.                         ";
  147.                         }
  148.                         // line 44
  149.                         echo "                    ";
  150.                     }
  151.                     $_parent $context['_parent'];
  152.                     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['role'], $context['_parent'], $context['loop']);
  153.                     $context array_intersect_key($context$_parent) + $_parent;
  154.                     // line 45
  155.                     echo "                </div><br><br>
  156.             ";
  157.                 }
  158.                 $_parent $context['_parent'];
  159.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['article'], $context['_parent'], $context['loop']);
  160.                 $context array_intersect_key($context$_parent) + $_parent;
  161.                 // line 47
  162.                 echo "        ";
  163.             }
  164.             // line 48
  165.             echo "            ";
  166.             $context['_parent'] = $context;
  167.             $context['_seq'] = twig_ensure_traversable(twig_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.'48$this->source); })()), "user", [], "any"falsefalsefalse48), "roles", [], "method"falsefalsefalse48));
  168.             foreach ($context['_seq'] as $context["_key"] => $context["role"]) {
  169.                 // line 49
  170.                 echo "
  171.                 ";
  172.                 // line 50
  173.                 if (($context["role"] == "ROLE_SUPER_ADMIN")) {
  174.                     // line 51
  175.                     echo "
  176.                     <form method=\"POST\" action=\"";
  177.                     // line 52
  178.                     echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("Ajout_Article");
  179.                     echo "\" enctype=\"multipart/form-data\">
  180.                         <button class=\"btn btn-sm btn-primary\">Ajouter une nouvelle news </button>
  181.                     </form><br><br>
  182.                 ";
  183.                 }
  184.                 // line 56
  185.                 echo "            ";
  186.             }
  187.             $_parent $context['_parent'];
  188.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['role'], $context['_parent'], $context['loop']);
  189.             $context array_intersect_key($context$_parent) + $_parent;
  190.             // line 57
  191.             echo "
  192.         </fieldset>
  193.     ";
  194.         }
  195.         
  196.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  197.         
  198.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  199.     }
  200.     // line 62
  201.     public function block_javascripts($context, array $blocks = [])
  202.     {
  203.         $macros $this->macros;
  204.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  205.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  206.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  207.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  208.         // line 63
  209.         echo "
  210. ";
  211.         
  212.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  213.         
  214.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  215.     }
  216.     public function getTemplateName()
  217.     {
  218.         return "home/home.html.twig";
  219.     }
  220.     public function isTraitable()
  221.     {
  222.         return false;
  223.     }
  224.     public function getDebugInfo()
  225.     {
  226.         return array (  234 => 63,  224 => 62,  211 => 57,  205 => 56,  198 => 52,  195 => 51,  193 => 50,  190 => 49,  185 => 48,  182 => 47,  175 => 45,  169 => 44,  163 => 41,  159 => 39,  156 => 38,  152 => 37,  145 => 33,  142 => 32,  138 => 30,  135 => 29,  129 => 28,  123 => 25,  119 => 24,  116 => 23,  113 => 22,  110 => 21,  105 => 20,  103 => 19,  95 => 14,  91 => 13,  88 => 12,  84 => 11,  79 => 8,  77 => 7,  74 => 6,  72 => 5,  69 => 4,  59 => 3,  36 => 1,);
  227.     }
  228.     public function getSourceContext()
  229.     {
  230.         return new Source("{% extends 'base.html.twig' %}
  231. {% block body %}
  232.     <h1>Page d'accueil</h1>
  233.     {% if app.user %}
  234.         <fieldset>
  235.         {% if articles %}
  236.             <legend>NEWS : </legend>
  237.             {% for article in articles %}
  238.                 <div style=\"border: thin solid black\">
  239.                     <h4>{{ article.nomArticle }}</h4>
  240.                     {{ article.textArticle }}
  241.                     <br><br>
  242.                     Documents :
  243.                     <br>
  244.                     {% set exist = 0 %}
  245.                     {% for file in docs %}
  246.                         {% if file.article == article %}
  247.                             {% set exist = 1 %}
  248.                             <br>
  249.                             <a href=\"{{path('openFileArticle',{ 'file': file.farId}) }}\">
  250.                                 {{ file.farnomuser }}
  251.                             </a>
  252.                         {% endif %}
  253.                     {% endfor %}
  254.                     {% if exist == 0 %}
  255.                         Aucun document.
  256.                     {% endif %}
  257.                     <br><br>
  258.                     Date de création : {{ article.dateArticle|date(\"d/m/Y\") }}
  259.                     <br>
  260.                     {% for role in app.user.roles() %}
  261.                         {% if role == 'ROLE_SUPER_ADMIN' %}
  262.                             <br>
  263.                             <a href=\"{{path('validationDeleteArticle',{ 'idArticle': article.idArticle}) }}\">Supprimer l'article </a>
  264.                         {% endif %}
  265.                     {% endfor %}
  266.                 </div><br><br>
  267.             {% endfor %}
  268.         {% endif %}
  269.             {% for role in app.user.roles() %}
  270.                 {% if role == 'ROLE_SUPER_ADMIN' %}
  271.                     <form method=\"POST\" action=\"{{path('Ajout_Article') }}\" enctype=\"multipart/form-data\">
  272.                         <button class=\"btn btn-sm btn-primary\">Ajouter une nouvelle news </button>
  273.                     </form><br><br>
  274.                 {% endif %}
  275.             {% endfor %}
  276.         </fieldset>
  277.     {% endif %}
  278. {% endblock %}
  279. {% block javascripts %}
  280. {% endblock %}""home/home.html.twig""/home/rlvchht/www/dev/templates/home/home.html.twig");
  281.     }
  282. }