var/cache/dev/twig/2d/2d665b3112a31ed0f7e6992322c4d575.php line 33

  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. /* Articles/list.html.twig */
  14. class __TwigTemplate_b90f2e5afb78ab96dd62ea33501efa99 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->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Articles/list.html.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Articles/list.html.twig"));
  33.         // line 1
  34.         echo "<table>
  35.     <thead>
  36.     <tr>
  37.         <th class=\"data-enabled-header\">N°</th>
  38.         <th>Titre</th>
  39. \t\t<th>Publication</th>
  40.         <th>Utilisateur</th>
  41.         <th>Actions</th>
  42.     </tr>
  43.     </thead>
  44. \t";
  45.         // line 11
  46.         $context['_parent'] = $context;
  47.         $context['_seq'] = twig_ensure_traversable((isset($context["list"]) || array_key_exists("list"$context) ? $context["list"] : (function () { throw new RuntimeError('Variable "list" does not exist.'11$this->source); })()));
  48.         $context['loop'] = [
  49.           'parent' => $context['_parent'],
  50.           'index0' => 0,
  51.           'index'  => 1,
  52.           'first'  => true,
  53.         ];
  54.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  55.             $length count($context['_seq']);
  56.             $context['loop']['revindex0'] = $length 1;
  57.             $context['loop']['revindex'] = $length;
  58.             $context['loop']['length'] = $length;
  59.             $context['loop']['last'] = === $length;
  60.         }
  61.         foreach ($context['_seq'] as $context["_key"] => $context["o"]) {
  62.             // line 12
  63.             echo "\t<tr data-enabled=\"";
  64.             echo (( !(twig_get_attribute($this->env$this->source$context["o"], "isEnabled", [], "any"falsefalsefalse12) === null)) ? ((((twig_get_attribute($this->env$this->source$context["o"], "isEnabled", [], "any"falsefalsefalse12) == 1)) ? (1) : (0))) : (""));
  65.             echo "\">
  66. \t\t<td>";
  67.             // line 13
  68.             echo twig_escape_filter($this->env, (twig_length_filter($this->env, (isset($context["list"]) || array_key_exists("list"$context) ? $context["list"] : (function () { throw new RuntimeError('Variable "list" does not exist.'13$this->source); })())) - twig_get_attribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsefalse13)), "html"nulltrue);
  69.             echo "</td>
  70. \t\t<td>
  71.             <div class=\"flex row middle\">
  72. \t\t\t\t";
  73.             // line 16
  74.             if (twig_get_attribute($this->env$this->source$context["o"], "banner", [], "any"falsefalsefalse16)) {
  75.                 // line 17
  76.                 echo "                <div class=\"relative icon big os-image\" data-image=\"";
  77.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["o"], "banner", [], "any"falsefalsefalse17), "file", [], "any"falsefalsefalse17)), "html"nulltrue);
  78.                 echo "\">
  79.                     <img src=\"";
  80.                 // line 18
  81.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["o"], "banner", [], "any"falsefalsefalse18), "thumbnail", [], "any"falsefalsefalse18)), "html"nulltrue);
  82.                 echo "\" class=\"cover\">
  83.                 </div>
  84. \t\t\t\t  ";
  85.             }
  86.             // line 21
  87.             echo "                <div class=\"left-20\">
  88.                     <b class=\"h4\">";
  89.             // line 22
  90.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["o"], "title", [], "any"falsefalsefalse22), "html"nulltrue);
  91.             echo "</b>
  92.                 </div>
  93.             </div>
  94.         </td>
  95. \t\t<td>
  96.             ";
  97.             // line 28
  98.             if (twig_get_attribute($this->env$this->source$context["o"], "category", [], "any"falsefalsefalse28)) {
  99.                 // line 29
  100.                 echo "            <span class=\"success upper\">";
  101.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["o"], "category", [], "any"falsefalsefalse29), "name", [], "any"falsefalsefalse29), "html"nulltrue);
  102.                 echo "</span>
  103.             ";
  104.             }
  105.             // line 31
  106.             echo "            <br>";
  107.             echo twig_escape_filter($this->env$this->env->getFilter('pretty_date')->getCallable()(twig_get_attribute($this->env$this->source$context["o"], "date", [], "any"falsefalsefalse31)), "html"nulltrue);
  108.             echo " à ";
  109.             echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["o"], "date", [], "any"falsefalsefalse31), "H:i"), "html"nulltrue);
  110.             echo "
  111.         </td>
  112. \t\t<td>
  113.             ";
  114.             // line 34
  115.             if (twig_get_attribute($this->env$this->source$context["o"], "user", [], "any"falsefalsefalse34)) {
  116.                 echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["o"], "user", [], "any"falsefalsefalse34), "lName", [], "any"falsefalsefalse34) . "  ") . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["o"], "user", [], "any"falsefalsefalse34), "fName", [], "any"falsefalsefalse34)), "html"nulltrue);
  117.             }
  118.             // line 35
  119.             echo "            <br>";
  120.             echo twig_escape_filter($this->env$this->env->getFilter('frdate')->getCallable()(twig_get_attribute($this->env$this->source$context["o"], "createdAt", [], "any"falsefalsefalse35)), "html"nulltrue);
  121.             echo " à ";
  122.             echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source$context["o"], "createdAt", [], "any"falsefalsefalse35), "H:i"), "html"nulltrue);
  123.             echo "
  124.         </td>
  125. \t\t<td>
  126. \t\t\t<a href=\"";
  127.             // line 38
  128.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("articles-edit", ["id" => twig_get_attribute($this->env$this->source$context["o"], "id", [], "any"falsefalsefalse38)]), "html"nulltrue);
  129.             echo "\" title=\"Modifier\" class=\"action fas fa-edit btn-popup semi\"></a>
  130. \t\t\t<a href=\"";
  131.             // line 39
  132.             echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source$context["o"], "URL", [], "any"falsefalsefalse39)) ? (twig_get_attribute($this->env$this->source$context["o"], "URL", [], "any"falsefalsefalse39)) : ($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("article", ["id" => twig_get_attribute($this->env$this->source$context["o"], "id", [], "any"falsefalsefalse39), "slug" => "preview"]))), "html"nulltrue);
  133.             echo "\" title=\"Lire l'article\" class=\"action fab fa-readme\" target=\"_blank\"></a>
  134. \t\t\t";
  135.             // line 40
  136.             if (twig_get_attribute($this->env$this->source$context["o"], "banner", [], "any"falsefalsefalse40)) {
  137.                 echo "<a data-target=\"";
  138.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["o"], "banner", [], "any"falsefalsefalse40), "file", [], "any"falsefalsefalse40)), "html"nulltrue);
  139.                 echo "\" title=\"Voir la bannière\" class=\"action fas fa-image os-image\"></a>";
  140.             }
  141.             // line 41
  142.             echo "\t\t\t<br>";
  143.             if (twig_get_attribute($this->env$this->source$context["o"], "generatedPdf", [], "any"falsefalsefalse41)) {
  144.                 echo "<a data-target=\"";
  145.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["o"], "generatedPdf", [], "any"falsefalsefalse41), "file", [], "any"falsefalsefalse41)), "html"nulltrue);
  146.                 echo "\" title=\"Voir le document généré\" class=\"action fas fa-eye os-read\"></a>";
  147.             }
  148.             // line 42
  149.             echo "\t\t\t<a href=\"";
  150.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("articles-enable", ["id" => twig_get_attribute($this->env$this->source$context["o"], "id", [], "any"falsefalsefalse42)]), "html"nulltrue);
  151.             echo "\" class=\"action btn-flash fa ";
  152.             echo ((twig_get_attribute($this->env$this->source$context["o"], "isEnabled", [], "any"falsefalsefalse42)) ? ("fa-times") : ("fa-check"));
  153.             echo "\" title=\"";
  154.             echo ((twig_get_attribute($this->env$this->source$context["o"], "isEnabled", [], "any"falsefalsefalse42)) ? ("Désactiver") : ("Activer"));
  155.             echo "\"></a>
  156. \t\t\t<a href=\"";
  157.             // line 43
  158.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("articles-onefrontpage", ["id" => twig_get_attribute($this->env$this->source$context["o"], "id", [], "any"falsefalsefalse43)]), "html"nulltrue);
  159.             echo "\" class=\"action fa fa-paper-plane\" title=\"Afficher cet article à la une (sur la page d\\'accueil)\"></a>
  160. \t\t</td>
  161. \t</tr>
  162. \t";
  163.             ++$context['loop']['index0'];
  164.             ++$context['loop']['index'];
  165.             $context['loop']['first'] = false;
  166.             if (isset($context['loop']['length'])) {
  167.                 --$context['loop']['revindex0'];
  168.                 --$context['loop']['revindex'];
  169.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  170.             }
  171.         }
  172.         $_parent $context['_parent'];
  173.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['o'], $context['_parent'], $context['loop']);
  174.         $context array_intersect_key($context$_parent) + $_parent;
  175.         // line 47
  176.         echo "</table>
  177. ";
  178.         
  179.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  180.         
  181.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  182.     }
  183.     public function getTemplateName()
  184.     {
  185.         return "Articles/list.html.twig";
  186.     }
  187.     public function isTraitable()
  188.     {
  189.         return false;
  190.     }
  191.     public function getDebugInfo()
  192.     {
  193.         return array (  186 => 47,  168 => 43,  159 => 42,  152 => 41,  146 => 40,  142 => 39,  138 => 38,  129 => 35,  125 => 34,  116 => 31,  110 => 29,  108 => 28,  99 => 22,  96 => 21,  90 => 18,  85 => 17,  83 => 16,  77 => 13,  72 => 12,  55 => 11,  43 => 1,);
  194.     }
  195.     public function getSourceContext()
  196.     {
  197.         return new Source("<table>
  198.     <thead>
  199.     <tr>
  200.         <th class=\"data-enabled-header\">N°</th>
  201.         <th>Titre</th>
  202. \t\t<th>Publication</th>
  203.         <th>Utilisateur</th>
  204.         <th>Actions</th>
  205.     </tr>
  206.     </thead>
  207. \t{% for o in list %}
  208. \t<tr data-enabled=\"{{o.isEnabled is not same as (null) ? o.isEnabled == 1 ? 1 : 0 : ''}}\">
  209. \t\t<td>{{list|length-loop.index0}}</td>
  210. \t\t<td>
  211.             <div class=\"flex row middle\">
  212. \t\t\t\t{% if o.banner %}
  213.                 <div class=\"relative icon big os-image\" data-image=\"{{asset(o.banner.file)}}\">
  214.                     <img src=\"{{asset(o.banner.thumbnail)}}\" class=\"cover\">
  215.                 </div>
  216. \t\t\t\t  {% endif %}
  217.                 <div class=\"left-20\">
  218.                     <b class=\"h4\">{{o.title}}</b>
  219.                 </div>
  220.             </div>
  221.         </td>
  222. \t\t<td>
  223.             {% if o.category %}
  224.             <span class=\"success upper\">{{o.category.name}}</span>
  225.             {% endif %}
  226.             <br>{{o.date|pretty_date}} à {{o.date|date('H:i')}}
  227.         </td>
  228. \t\t<td>
  229.             {% if o.user %}{{o.user.lName~\"  \"~o.user.fName}}{% endif %}
  230.             <br>{{o.createdAt|frdate}} à {{o.createdAt|date('H:i')}}
  231.         </td>
  232. \t\t<td>
  233. \t\t\t<a href=\"{{path('articles-edit',{'id':o.id})}}\" title=\"Modifier\" class=\"action fas fa-edit btn-popup semi\"></a>
  234. \t\t\t<a href=\"{{o.URL ? o.URL : path('article',{'id':o.id,'slug':'preview'})}}\" title=\"Lire l'article\" class=\"action fab fa-readme\" target=\"_blank\"></a>
  235. \t\t\t{% if o.banner %}<a data-target=\"{{asset(o.banner.file)}}\" title=\"Voir la bannière\" class=\"action fas fa-image os-image\"></a>{%endif%}
  236. \t\t\t<br>{% if o.generatedPdf %}<a data-target=\"{{asset(o.generatedPdf.file)}}\" title=\"Voir le document généré\" class=\"action fas fa-eye os-read\"></a>{%endif%}
  237. \t\t\t<a href=\"{{path('articles-enable',{id:o.id})}}\" class=\"action btn-flash fa {{ o.isEnabled ? 'fa-times' : 'fa-check' }}\" title=\"{{ o.isEnabled ? 'Désactiver' : 'Activer' }}\"></a>
  238. \t\t\t<a href=\"{{path('articles-onefrontpage',{id:o.id})}}\" class=\"action fa fa-paper-plane\" title=\"Afficher cet article à la une (sur la page d\\'accueil)\"></a>
  239. \t\t</td>
  240. \t</tr>
  241. \t{% endfor %}
  242. </table>
  243. ""Articles/list.html.twig""/home/olasoftnka/asin/templates/Articles/list.html.twig");
  244.     }
  245. }