Browse Source

changes in annotations again

ansible-setup-and-deploy
ange 6 years ago
parent
commit
1acf4cc157
  1. 2
      app/templates/results_annot.html
  2. 18
      app/views.py

2
app/templates/results_annot.html

@ -11,7 +11,7 @@
<input style="background-color: grey; color:white; font-family: archivo narrow; font-size: 18px; border: none;padding: 8px 24px;" type="submit" value="browse annotations"></input>
</form>
<br><br><br>
<a href="{{ url_for('myannotations_pdf') }}" style="color:#ff3300;">Get as PDF</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="annotations" style="color:#ff3300;"> All annotations</a><br><br>
<a href="annotations" style="color:#ff3300;"> All annotations</a><br><br>
<h1 class="header">Annotations/ Extracts with:&nbsp;&nbsp;<i>{{name}}</i></h1>

18
app/views.py

@ -123,15 +123,15 @@ def annotations_pdf():
html = render_template(('annotations.html'), annot=annot, light=light)
return render_pdf(HTML(string=html))
@app.route('/myannotations.pdf')
def myannotations_pdf():
books = db.session.query(Book).all()
name=str(request.args.get('query'))
annot = get_annotations()
res = get_annot_results(annot,name)
# Make a PDF straight from HTML in a string.
html = render_template('results_annot.html', name=name, annot=annot, res=res, books=books)
return render_pdf(HTML(string=html))
# @app.route('/myannotations.pdf')
# def myannotations_pdf():
# books = db.session.query(Book).all()
# name=str(request.args.get('query'))
# annot = get_annotations()
# res = get_annot_results(annot,name)
# # Make a PDF straight from HTML in a string.
# html = render_template('results_annot.html', name=name, annot=annot, res=res, books=books)
# return render_pdf(HTML(string=html))
@app.route('/viewpdf/<filename>')

Loading…
Cancel
Save