Browse Source

Couleur du bouton en cas de doublon

Sangfroid 2 months ago
parent
commit
1ae2a2d6d8
1 changed files with 5 additions and 1 deletions
  1. 5 1
      templates/videotheque/add_tmdb.html.twig

+ 5 - 1
templates/videotheque/add_tmdb.html.twig

@@ -66,7 +66,11 @@
                 </tr>
                 {% endif %}
                 <tr class="{{ film['data'].information ? '' : 'border-bottom' }}">
-                    <td><a type="button" class="btn btn-primary" href="{{ path('videotheque_ajouter', {'idtmdb': idtmdb }) }}">Créér</a></td>
+                    <td>
+                        <a type="button" class="btn btn-{{ film['filmBdd'] is defined ? 'warning' : 'primary' }}" href="{{ path('videotheque_ajouter', {'idtmdb': idtmdb }) }}">
+                            Créér{{ film['filmBdd'] is defined ? ' quand même' : '' }}
+                        </a>
+                    </td>
                     <td>{{ film['data'].titre }}</td>
                     <td>{% if film['data'].dateSortie %}{{ film['data'].dateSortie | date ('d/m/Y')}}{% endif %}</td>
                     <td>{% for genre in film['data'].genres %}<span class="badge bg-info me-1">{{ genre.name }}</span>{% endfor %}</td>