index.html.twig 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Films{% endblock %}
  3. {% block body %}
  4. {{ include('form/_form.film.html.twig') }}
  5. <table>
  6. <thead>
  7. <tr>
  8. <th>Nom</th>
  9. <th>Realisateur</th>
  10. <th>Genre</th>
  11. <th>Ajouté par</th>
  12. {#<th>Date d'ajout</th>#}
  13. <th></th>
  14. </tr>
  15. </thead>
  16. <tbody>
  17. <tr>
  18. <th colspan="6" class="title">Ma liste</th>
  19. </tr>
  20. </tbody>
  21. <tbody class="user-list" data-sortable-sortable="true" data-controller="sortable" data-sortable-group="shared" data-sortable-url="{{ path('update_list') }}">
  22. {% for film in mesFilms %}
  23. <tr data-id="{{ film.id }}">
  24. <td>{{ film.name }}</td>
  25. <td>{{ film.realisateur }}</td>
  26. <td>{{ film.genre }}</td>
  27. <td>{{ (film.commonLists | first).addedBy.pseudo }}</td>
  28. {#<td>{{ (film.commonLists | first).dateAdded | date('d/m/Y') }}</td>#}
  29. <td>
  30. <a href="{{ path('app_index', {'id': film.id} ) }}"><i class="fa fa-edit"></i></a>
  31. </td>
  32. </tr>
  33. {% endfor %}
  34. </tbody>
  35. <tbody>
  36. <tr>
  37. <th colspan="6" class="title">Liste complète</th>
  38. </tr>
  39. </tbody>
  40. <tbody class="common-list" data-controller="sortable" data-sortable-group="shared" data-sortable-url="{{ path('update_list') }}">
  41. {% for entry in listeFilms %}
  42. {% set film = entry.film %}
  43. {% if film not in mesFilms %}
  44. <tr data-id="{{ film.id }}">
  45. <td>{{ film.name }}</td>
  46. <td>{{ film.realisateur }}</td>
  47. <td>{{ film.genre }}</td>
  48. <td>{{ entry.addedBy.pseudo }}</td>
  49. {#<td>{{ entry.dateAdded | date('d/m/Y') }}</td>#}
  50. <td>
  51. <a href="{{ path('app_index', {'id': film.id} ) }}"><i class="fa fa-edit"></i></a>
  52. </td>
  53. </tr>
  54. {% endif %}
  55. {% endfor %}
  56. </tbody>
  57. </table>
  58. {% endblock %}