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