diff --git a/templates/apiSearch/index.html.twig b/templates/apiSearch/index.html.twig index d4e8674..722d5b9 100644 --- a/templates/apiSearch/index.html.twig +++ b/templates/apiSearch/index.html.twig @@ -34,6 +34,7 @@

Aux éditions : {{ book.volumeInfo.publisher }}

+ {% endif %} {% if book.volumeInfo.publishedDate is defined %}

Date de publication : {{ book.volumeInfo.publishedDate }} @@ -55,7 +56,7 @@ {{ book.searchInfo.textSnippet | raw }} {% endif %}

- {% endif %} +
@@ -67,25 +68,75 @@ {% if app.user %} - {% for favori in favoris %} - {% if favori.getIdGoogle() == book.id %} - - - - {% endif %} - {% if favori.getIdGoogle() != book.id %} - - - + {% set isLiked = book.id in favoris|map(f => f.getIdGoogle()) %} + + + + {% endif %} + + + + + + +
{% endfor %} {% set nb_items = datas.totalItems %} @@ -130,67 +181,73 @@ diff --git a/templates/components/navbar.html.twig b/templates/components/navbar.html.twig index adccdfe..9465235 100644 --- a/templates/components/navbar.html.twig +++ b/templates/components/navbar.html.twig @@ -63,7 +63,7 @@
- +