added option to download pdf
This commit is contained in:
parent
36090a402c
commit
e779a764b4
@ -17,6 +17,7 @@ FIELDNAMES = [
|
||||
"LicenseShort",
|
||||
"Highlights",
|
||||
"Comments",
|
||||
"Files",
|
||||
]
|
||||
|
||||
|
||||
@ -53,6 +54,7 @@ class CsvParser:
|
||||
"License": license,
|
||||
"Highlights": row["Highlights"],
|
||||
"Comments": row["Comments"],
|
||||
"Files": row["Files"],
|
||||
"Image": self._hasimage(row["Id"]),
|
||||
}
|
||||
return pubinfo
|
||||
|
@ -6,8 +6,7 @@ import json
|
||||
import os
|
||||
|
||||
import bcrypt
|
||||
import flask
|
||||
from flask import redirect, render_template, request
|
||||
from flask import redirect, render_template, request, Blueprint
|
||||
from flask_wtf.csrf import CSRFProtect
|
||||
from icalendar import Calendar
|
||||
from PIL import Image
|
||||
@ -23,6 +22,8 @@ from search import search
|
||||
APP = create_app()
|
||||
csrf = CSRFProtect()
|
||||
csrf.init_app(APP)
|
||||
files = Blueprint("files", __name__, static_folder="files")
|
||||
APP.register_blueprint(files)
|
||||
csvparser = CsvParser(
|
||||
APP.config["LIBRARY_FILENAME"], APP.config["IMAGE_FOLDER"]
|
||||
)
|
||||
|
@ -53,6 +53,10 @@
|
||||
<td>Comments</td>
|
||||
<td><p>{{ fullpublication["Comments"] }}</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>File</td>
|
||||
<td><a href='files/{{fullpublication["Files"]}}'><p>{{ fullpublication["Files"] }}</p></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user