templates/Resources/list.html.twig line 1

Open in your IDE?
  1. <table>
  2.     <thead>
  3.     <tr>
  4.         <th>N°</th>
  5.         <th>Titre</th>
  6.         <th>Chiffres</th>
  7.         <th>Actions</th>
  8.     </tr>
  9.     </thead>
  10.     {% for o in list %}
  11.     <tr data-enabled="{{o.isEnabled is not same as (null) ? o.isEnabled == 1 ? 1 : 0 : ''}}">
  12.         <td>{{loop.revindex}}</td>
  13.         <td>
  14.             {{o.title}}
  15.             {% if o.category %}
  16.             <br><b>{{o.category.label}}</b>
  17.             {% endif %}
  18.         </td>
  19.         <td>
  20.             {{o.document.reading}} lect.
  21.             <br>{{o.document.downloads}} téléch.
  22.         </td>
  23.         <td>
  24.             <a href="{{url('resources-edit',{'id':o.id})}}" title="Modifier" class="action fas fa-edit btn-popup semi"></a>
  25.             {% if o.document %}<a data-target="{{asset(o.document.file)}}" title="Voir le document" class="action fas fa-eye os-read"></a>{%endif%}
  26.             <a href="{{path('resources-enable',{id:o.id})}}" class="action btn-flash fa {{ o.isEnabled ? 'fa-times' : 'fa-check' }}" title="{{ o.isEnabled ? 'Désactiver' : 'Activer' }}"></a>
  27.         </td>
  28.     </tr>
  29.     {% endfor %}
  30. </table>