liste.html.twig 895 B

123456789101112131415161718192021222324252627282930
  1. {% extends "videotheque/base.html.twig" %}
  2. {% block title %}{{ parent() }} - Liste des genres{% endblock %}
  3. {% block titre %}Liste des genres{% endblock %}
  4. {% block body %}
  5. <p><a href="{{ path('genre_ajouter') }}" class="btn btn-primary" role="button">Ajouter un Genre</a></p>
  6. <table class="table table-bordered table-hover table-sm">
  7. <thead class="thead-dark">
  8. <tr>
  9. <th>Genre</th>
  10. {#<th>Films</th>#}
  11. <th>Actions</th>
  12. </tr>
  13. </thead>
  14. <tbody>
  15. {% for genre in genres %}
  16. <tr>
  17. <td>{{ genre.name }}</td>
  18. <td>
  19. {% if is_granted('ROLE_MODERATEUR') %}
  20. <a href="{{ path('genre_supprimer', {'id': genre.id}) }}"><i class="fa fa-trash", style="color:Tomato;"></i></a>
  21. {% endif %}
  22. <a href="{{ path('genre_modifier', {'id': genre.id}) }}"><i class="fa fa-edit", style="color:DodgerBlue;"></i></a>
  23. </td>
  24. </tr>
  25. {% endfor %}
  26. </tbody>
  27. </table>
  28. {% endblock %}