-Ajout des colonnes catégories et edition
This commit is contained in:
@ -47,6 +47,9 @@ class APISearchController extends AbstractController
|
||||
$description = $data['description'] ?? '';
|
||||
$date = $data['date'] ?? '';
|
||||
$pages = $data['pages'] ?? '';
|
||||
$edition = $data['edition'] ?? '';
|
||||
$categorie = $data['categorie'] ?? '';
|
||||
|
||||
|
||||
$favoris = new Favoris();
|
||||
$user = $this->getUser();
|
||||
@ -59,6 +62,8 @@ class APISearchController extends AbstractController
|
||||
$favoris->setPublication($date);
|
||||
$favoris->setPages($pages);
|
||||
$favoris->setPublication($date);
|
||||
$favoris->setEdition($edition);
|
||||
$favoris->setCategorie($categorie);
|
||||
|
||||
|
||||
$favorisRepository->addFavoris($favoris);
|
||||
|
@ -79,11 +79,13 @@
|
||||
class="like-button absolute top-2 right-2 w-6 h-6 cursor-pointer transition-colors duration-300"
|
||||
data-id-google="{{ book.id }}"
|
||||
data-liked="{{ isLiked ? 'true' : 'false' }}"
|
||||
data-edition="{{ book.volumeInfo.publisher | default('') }}"
|
||||
data-categorie="{{ book.volumeInfo.categories is defined ? book.volumeInfo.categories | join(', ') : '' }}"
|
||||
data-title="{{ book.volumeInfo.title | default('Titre non disponible') }}"
|
||||
data-authors="{{ book.volumeInfo.authors is defined ? book.volumeInfo.authors | join(', ') : '' }}"
|
||||
data-images="{{ book.volumeInfo.imageLinks.smallThumbnail is defined ? book.volumeInfo.imageLinks.smallThumbnail : '' }}"
|
||||
data-description="{{ book.volumeInfo.description | raw | default('Description non disponible') }}"
|
||||
data-date="{{ book.volumeInfo.publishedDate | default('Date non disponible') }}"
|
||||
data-description="{{ book.volumeInfo.description is defined and book.volumeInfo.description is not empty ? book.volumeInfo.description | raw : '' }}"
|
||||
data-date="{{ book.volumeInfo.publishedDate | default('') }}"
|
||||
data-pages="{{ book.volumeInfo.pageCount | default('0') }}">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z"/>
|
||||
</svg>
|
||||
@ -227,7 +229,9 @@ document.querySelectorAll('.like-button').forEach(button => {
|
||||
images: this.dataset.images,
|
||||
description: this.dataset.description,
|
||||
date: this.dataset.date,
|
||||
pages: this.dataset.pages
|
||||
pages: this.dataset.pages,
|
||||
edition: this.dataset.edition,
|
||||
categorie: this.dataset.categorie
|
||||
};
|
||||
|
||||
toggleLike(idGoogle, liked, this, bookDetails);
|
||||
|
Reference in New Issue
Block a user