From a22ec367a513e1131a5996f67b81c22eaaedc28e Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sun, 4 Dec 2022 19:42:29 +0700 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BB=D0=B8=D1=87=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D0=B2=D0=B0=20=D0=BA=D0=BD=D0=B8=D0=B3=20=D0=B2=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B8=D1=81=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/core/opds/SearchPage.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/server/core/opds/SearchPage.js b/server/core/opds/SearchPage.js index 239069d..589ae4b 100644 --- a/server/core/opds/SearchPage.js +++ b/server/core/opds/SearchPage.js @@ -1,4 +1,5 @@ const BasePage = require('./BasePage'); +const utils = require('../utils'); class SearchPage extends BasePage { constructor(config) { @@ -38,8 +39,12 @@ class SearchPage extends BasePage { entry.push( this.makeEntry({ id: row.id, - title: row[from], + title: `${(from === 'series' ? 'Серия: ': '')}${row[from]}`, link: this.navLink({href: `/${from}?${from}==${encodeURIComponent(row[from])}`}), + content: { + '*ATTRS': {type: 'text'}, + '*TEXT': `${row.bookCount} книг${utils.wordEnding(row.bookCount, 8)}`, + }, }), ); } @@ -61,16 +66,28 @@ class SearchPage extends BasePage { id: 'search_author', title: 'Поиск авторов', link: this.navLink({href: `/${this.id}?type=author&term=${encodeURIComponent(query.term)}`}), + content: { + '*ATTRS': {type: 'text'}, + '*TEXT': `Поиск по авторам книг`, + }, }), this.makeEntry({ id: 'search_series', title: 'Поиск серий', link: this.navLink({href: `/${this.id}?type=series&term=${encodeURIComponent(query.term)}`}), + content: { + '*ATTRS': {type: 'text'}, + '*TEXT': `Поиск по сериям книг`, + }, }), this.makeEntry({ id: 'search_title', title: 'Поиск книг', link: this.navLink({href: `/${this.id}?type=title&term=${encodeURIComponent(query.term)}`}), + content: { + '*ATTRS': {type: 'text'}, + '*TEXT': `Поиск по названиям книг`, + }, }), ] }