Добавление количества страниц книгам

This commit is contained in:
2026-01-23 01:31:50 +03:00
parent 1e0c3478a1
commit 7c3074e8fe
15 changed files with 152 additions and 21 deletions
+6
View File
@@ -234,6 +234,12 @@ $(document).ready(() => {
function renderBook(book) {
$("#book-title").text(book.title);
$("#book-id").text(`ID: ${book.id}`);
if (book.page_count && book.page_count > 0) {
$("#book-page-count-value").text(book.page_count);
$("#book-page-count-text").removeClass("hidden");
} else {
$("#book-page-count-text").addClass("hidden");
}
$("#book-authors-text").text(
book.authors.map((a) => a.name).join(", ") || "Автор неизвестен",
);