mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fix #1954890 [[Feature Request] Content Server: Search results with number of items found](https://bugs.launchpad.net/calibre/+bug/1954890)
This commit is contained in:
parent
23fe52192b
commit
f689517d1a
@ -250,13 +250,14 @@ def show_top_message():
|
|||||||
if q.search:
|
if q.search:
|
||||||
container.appendChild(E.br())
|
container.appendChild(E.br())
|
||||||
if q.search:
|
if q.search:
|
||||||
text = _('Showing books matching: {} ')
|
c = E.span()
|
||||||
if not library_data.search_result.total_num:
|
if library_data.search_result.total_num:
|
||||||
text = _('No books matching: {} ')
|
c.appendChild(E.span(_('Showing books matching:'), ' ', E.i(library_data.search_result.query), ' ', _('(total matches: {}) ').format(library_data.search_result.total_num)))
|
||||||
container.appendChild(E.span(
|
c.appendChild(E.span(' ', E.a(_('Clear search'), class_='blue-link', onclick=def(): search();)))
|
||||||
E.span(text.format(library_data.search_result.query)),
|
else:
|
||||||
create_button(_('Clear'), 'close', def(): search();, _('Clear this search'))
|
c.appendChild(E.span(_('No books matching:'), ' ', E.i(library_data.search_result.query)))
|
||||||
))
|
|
||||||
|
container.appendChild(c)
|
||||||
|
|
||||||
def create_books_list(container):
|
def create_books_list(container):
|
||||||
book_list_data.container_id = ensure_id(container)
|
book_list_data.container_id = ensure_id(container)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user