mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Content server: Allow opening the book details page for a matches book from the Full text search results page. Fixes #2025333 [Link to Book Details in FTS - Content Server](https://bugs.launchpad.net/calibre/+bug/2025333)
This commit is contained in:
parent
2a409302cd
commit
877dd2da1d
@ -10,7 +10,7 @@ from book_list.globals import get_current_query, get_session_data
|
||||
from book_list.library_data import current_library_id, download_url
|
||||
from book_list.router import back, home, open_book_url, push_state
|
||||
from book_list.top_bar import create_top_bar
|
||||
from book_list.ui import set_panel_handler
|
||||
from book_list.ui import query_as_href, set_panel_handler
|
||||
from book_list.views import create_image
|
||||
from complete import create_search_bar
|
||||
from dom import add_extra_css, clear, set_css, svgicon
|
||||
@ -274,7 +274,6 @@ def disable_fts():
|
||||
)
|
||||
|
||||
|
||||
|
||||
def book_result_tile_clicked(ev):
|
||||
result_tile = ev.currentTarget
|
||||
bid = int(result_tile.dataset.bookId)
|
||||
@ -303,6 +302,10 @@ def book_result_tile_clicked(ev):
|
||||
_('Click one of the formats below to open the book at this search result (except PDF which will open at the start):'),
|
||||
fmc
|
||||
))
|
||||
parent.appendChild(E.div(
|
||||
style='margin-top: 1ex',
|
||||
E.a(_('Open the details page for this book'), class_='blue-link', target="_blank", href=query_as_href({'book_id':str(bid)}, 'book_details'))
|
||||
))
|
||||
parent.appendChild(E.div(
|
||||
style='margin-top: 1ex',
|
||||
E.a(_('Re-index this book'), class_='blue-link', href='javascript: void(0)', onclick=reindex.bind(None, bid))
|
||||
|
Loading…
x
Reference in New Issue
Block a user