diff --git a/resources/content_server/gui.js b/resources/content_server/gui.js index f5bf478e0c..e63a711880 100644 --- a/resources/content_server/gui.js +++ b/resources/content_server/gui.js @@ -40,7 +40,7 @@ function create_table_headers() { function format_url(format, id, title) { - return 'get/'+format.toLowerCase() + '/'+encodeURIComponent(title) + '_' + id+'.'+format.toLowerCase(); + return url_prefix + '/get/'+format.toLowerCase() + '/'+encodeURIComponent(title) + '_' + id+'.'+format.toLowerCase(); } function render_book(book) { @@ -101,7 +101,7 @@ function render_book(book) { } } title += '' - title += ''.format(id); + title += ''.format(id, url_prefix); title += '
{0}
'.format(comments) // Render authors cell var _authors = new Array(); diff --git a/resources/content_server/index.html b/resources/content_server/index.html index cf9c6e6356..310d23f9c7 100644 --- a/resources/content_server/index.html +++ b/resources/content_server/index.html @@ -3,26 +3,27 @@ calibre library - - - - + + + + +
- Show first set of books Show previous set of books              Show next set of books Show last set of books + Show first set of books Show previous set of books              Show next set of books Show last set of books
@@ -38,7 +39,7 @@
- Loading... Loading… + Loading... Loading…
diff --git a/src/calibre/library/server/content.py b/src/calibre/library/server/content.py index 8cbb323fef..670c31b9df 100644 --- a/src/calibre/library/server/content.py +++ b/src/calibre/library/server/content.py @@ -131,7 +131,8 @@ class ContentServer(object): return self.browse_toplevel() def old(self, **kwargs): - return self.static('index.html') + return self.static('index.html').replace('{prefix}', + self.opts.url_prefix) # Actually get content from the database {{{ def get_cover(self, id, thumbnail=False, thumb_width=60, thumb_height=80):