|
|
@ -111,14 +111,14 @@ def annotations():
|
|
|
|
# id = book.id
|
|
|
|
# id = book.id
|
|
|
|
annot = get_annotations()
|
|
|
|
annot = get_annotations()
|
|
|
|
print(annot)
|
|
|
|
print(annot)
|
|
|
|
return render_template('annotations.html', annot=annot, books=books)
|
|
|
|
return render_template('annotations.html', annot=annot, books=books, light=light)
|
|
|
|
|
|
|
|
|
|
|
|
# PDF from annotations
|
|
|
|
# PDF from annotations
|
|
|
|
@app.route('/annotations.pdf')
|
|
|
|
@app.route('/annotations.pdf')
|
|
|
|
def annotations_pdf():
|
|
|
|
def annotations_pdf():
|
|
|
|
annot = get_annotations()
|
|
|
|
annot = get_annotations()
|
|
|
|
# Make a PDF straight from HTML in a string.
|
|
|
|
# Make a PDF straight from HTML in a string.
|
|
|
|
html = render_template(('annotations.html'), annot=annot)
|
|
|
|
html = render_template(('annotations.html'), annot=annot, light=light)
|
|
|
|
return render_pdf(HTML(string=html))
|
|
|
|
return render_pdf(HTML(string=html))
|
|
|
|
|
|
|
|
|
|
|
|
@app.route('/viewpdf/<filename>')
|
|
|
|
@app.route('/viewpdf/<filename>')
|
|
|
@ -204,7 +204,7 @@ def show_book_by_id(id):
|
|
|
|
if not book:
|
|
|
|
if not book:
|
|
|
|
return render_template('red_link.html', id=id, light=light)
|
|
|
|
return render_template('red_link.html', id=id, light=light)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
return render_template('show_book_detail.html', book=book, previousbook = previousbook, nextbook = nextbook, all_instances=all_instances, name=name, annot=annot, res=res)
|
|
|
|
return render_template('show_book_detail.html', book=book, previousbook = previousbook, nextbook = nextbook, all_instances=all_instances, name=name, annot=annot, res=res, light=light)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|