mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Content server: Popup a more useful error when clicking on the cover of a book that has no formats to view. Fixes #1260216 [Web content server error: 404 Not Found (The path '/browse/category/' was not found.)](https://bugs.launchpad.net/calibre/+bug/1260216)
This commit is contained in:
parent
0fcdd09d21
commit
7b1a1eb804
@ -814,7 +814,9 @@ class BrowseServer(object):
|
||||
(xml(href, True), rt, xml(_('Get')))
|
||||
args['get_url'] = xml(href, True)
|
||||
else:
|
||||
args['get_button'] = args['get_url'] = ''
|
||||
args['get_button'] = ''
|
||||
args['get_url'] = 'javascript:alert(\'%s\')' % xml(_(
|
||||
'This book has no available formats to view'), True)
|
||||
args['comments'] = comments_to_html(mi.comments)
|
||||
args['stars'] = ''
|
||||
if mi.rating:
|
||||
@ -848,7 +850,8 @@ class BrowseServer(object):
|
||||
args['get_url'] = xml(self.opts.url_prefix + '/get/%s/%s_%d.%s'%(
|
||||
fmt, fname, id_, fmt), True)
|
||||
else:
|
||||
args['get_url'] = ''
|
||||
args['get_url'] = 'javascript:alert(\'%s\')' % xml(_(
|
||||
'This book has no available formats to view'), True)
|
||||
args['formats'] = ''
|
||||
if fmts:
|
||||
ofmts = [u'<a href="{4}/get/{0}/{1}_{2}.{0}" title="{3}">{3}</a>'
|
||||
|
Loading…
x
Reference in New Issue
Block a user