templates/Articles/list.html.twig line 1

Open in your IDE?
  1. <table>
  2.     <thead>
  3.     <tr>
  4.         <th class="data-enabled-header">N°</th>
  5.         <th>Titre</th>
  6.         <th>Date et Heure</th>
  7.         <th>Utilisateur</th>
  8.         <th>Actions</th>
  9.     </tr>
  10.     </thead>
  11.     {% for o in list %}
  12.     <tr data-enabled="{{o.isEnabled is not same as (null) ? o.isEnabled == 1 ? 1 : 0 : ''}}">
  13.         <td>{{list|length-loop.index0}}</td>
  14.         <td>{{o.title}}</td>
  15.         <td>{{o.date|frdate}} à {{o.date|date('H:i')}}</td>
  16.         <td>{% if o.user %}{{o.user.lName~"  "~o.user.fName}}{% endif %}</td>
  17.         <td>
  18.             <a href="{{path('articles-edit',{'id':o.id})}}" title="Modifier" class="action fas fa-edit btn-popup semi"></a>
  19.             <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>
  20.             {% if o.banner %}<a data-target="{{asset(o.banner.file)}}" title="Voir la bannière" class="action fas fa-image os-image"></a>{%endif%}
  21.             {# {% if is_granted('ROLE_MODO') %} #}
  22.             <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>
  23.             <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>
  24.             {# {% endif %} #}
  25.         </td>
  26.     </tr>
  27.     {% endfor %}
  28. </table>