123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- {% extends "videotheque/base.html.twig" %}
- {% block title %}
- {% if titre is defined %}{{ parent() }} - {{ titre }}{% else %}{{ parent() }}{% endif %}
- {% endblock %}
- {% block titre %}
- {% if titre is defined %}{{ titre }}{% else %}{{ parent() }}{% endif %}
- {% endblock %}
- {% block body %}
- {{ include ('videotheque/_liste_header.html.twig') }}
- <table
- class="table table-bordered table-hover table-sm align-middle">
- <thead class="">
- <tr>
- {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
- <th style="width:1em;"></th>
- <th style="width:1em;"></th>
- <th style="width:9em;">Ajouté par</th>
- {% endif %}
- <th>Titre</th>
- <th>Genre</th>
- <th>Réalisateur</th>
- <th style="width:5em;">Note</th>
- <th style="width:5em;">Année</th>
- <th style="width:6em;">Sortie</th>
- </tr>
- </thead>
- <tbody id="tableFilms">
- {% for film in listeFilms %}
- <tr data-auteur="{{ film.authered.nomComplet }}">
- {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
- <td>
- {% if app.user.wantToSee(film) %}
- {% set follow_icone = "fa fa-bookmark fa-lg" %}
- {% set follow_texte = "Supprimer ce film de votre liste à voir" %}
- {% else %}
- {% set follow_icone = "fa fa-bookmark-o text-secondary fa-lg" %}
- {% set follow_texte = "Ajouter ce film à votre liste à voir" %}
- {% endif %}
- <a href="#" type="button"
- data-fonction="switch"
- data-icone-actif="fa fa-bookmark fa-lg"
- data-icone-inactif="fa fa-bookmark-o text-secondary fa-lg"
- data-path="{{ path('maliste_modifier_a_voir') }}"
- data-bs-toggle="tooltip"
- title="{{ follow_texte }}"
- data-content="{{ film.id }}">
- <i class="{{ follow_icone }}"></i>
- </a>
- </td>
- <td>
- {% if app.user.haveSeen(film) %}
- {% set vu_icone = '<i class="fa fa-eye fa-lg text-success"></i>' %}
- {% else %}
- {% set vu_icone = '<i class="fa fa-eye-slash fa-lg text-secondary"></i>' %}
- {% endif %}
- <a href="#" type="button"
- data-fonction="switch"
- data-path="{{ path('maliste_modifier_vus') }}"
- data-content="{{ film.id }}"
- data-icone-actif = "fa fa-eye fa-lg text-success"
- data-icone-inactif = "fa fa-eye-slash fa-lg text-secondary">
- {{ vu_icone | raw }}
- </a>
- </td>
- <td>
- {% if film.authered is defined %}
- {% if film.authered.activeNow %}
- <i class="fa fa-user text-success" data-bs-toggle="tooltip" title="En ligne"></i>
- {% else %}
- <i class="fa fa-user-o text-secondary" data-bs-toggle="tooltip" title="Hors ligne"></i>
- {% endif %}
- {{ film.authered.username }}
- {% endif %}
- </td>
- {% endif %}
- <td>
- <a href="{{ path('videotheque_voirfilm', {'id': film.id}) }}"><span data-bs-toggle="tooltip" data-placement="right" title="{{ film.information }}">{{ film.titre }}</span></a>
- {% if film.new %}<span class="badge bg-secondary">New</span>{% endif %}
- {% if estEnSalle(film.dateSortie) %}<span class="badge text-bg-success">En salle</span>{% endif %}
- {% if bientotEnSalle(film.dateSortie) %}<span class="badge text-bg-info">Bientot</span>{% endif %}
- {% if film.nbComs %}<span class="badge text-bg-warning rounded-pill" data-bs-toggle="tooltip" title="{{ film.nbComs }} commentaire(s)">{{ film.nbComs }}</span>{% endif %}
- </td>
- <td>
- {% if film.genres is defined %}
- {% for genre in film.genres %}
- <a href="{{ path("videotheque_listepargenre", {"id": genre.id}) }}"><span class="badge bg-secondary">{{ genre.name }}</span></a>
- {% endfor %}
- {% endif %}
- </td>
- <td>
- {% if film.realisateurs is defined %}
- {% for realisateur in film.realisateurs %}
- <a href="{{ path('videotheque_listeparreal', {"id": realisateur.id}) }}"><span class="badge bg-info">{{ realisateur.nomComplet }}</span></a>
- {% endfor %}
- {% endif %}
- </td>
- <td>
- {% if film.note > 0 %}
- <input class="rating"
- data-disabled="true"
- data-show-clear="false"
- data-show-caption="false"
- data-theme="krajee-fa"
- style="display:none;"
- min=0
- max=5
- data-step=0.5
- data-size="xs"
- value="{{ film.note }}">
- {% endif %}
- </td>
- <td>{{ film.annee | date('Y') }}</td>
- <td>
- {% if film.dateSortie %}{{ film.dateSortie | date('d/m/y')}}{% endif %}
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- {% endblock %}
|