From addb7b9a3660367284d70909958cf8537f911aae Mon Sep 17 00:00:00 2001 From: Agnibho Mondal Date: Thu, 14 Mar 2024 20:24:46 +0530 Subject: [PATCH] Report formatting updated --- librevax.py | 1 - static/style.css | 10 +++++++++- templates/report.html | 13 +++++++++++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/librevax.py b/librevax.py index 91fd266..fb0f0f9 100644 --- a/librevax.py +++ b/librevax.py @@ -820,7 +820,6 @@ def report(mid): raise(e) return render_template("error.html", data=e) - def get_db(): db=getattr(g, "_database", None) if db is None: diff --git a/static/style.css b/static/style.css index d95c46d..262b3ed 100644 --- a/static/style.css +++ b/static/style.css @@ -15,8 +15,16 @@ a { padding: 20px; } -@media print{ +@media print { form, .navbar, .btn { display: none; } + .report { + font-size:8px; + line-height:1; + } + a { + color: inherit; + text-decoration: none; + } } diff --git a/templates/report.html b/templates/report.html index 4c0ca4d..df345b5 100644 --- a/templates/report.html +++ b/templates/report.html @@ -11,7 +11,7 @@ You should have received a copy of the GNU General Public License along with Lib {% extends "base.html" %} {% block content %} -
+
@@ -28,18 +28,27 @@ You should have received a copy of the GNU General Public License along with Lib {% for i in data %} - + {% endfor %} -- 2.39.5
{{loop.index}} + + {{loop.index}}
+ {%if not i["given"]%}[PENDING]{%endif%} +
+
+ {{i["name"]}}({{i["cid"]}})
{{i["sex"]}}/{{i["dob"]}} +
{{i["contact"]}}
{{i["address"]}}
+ {{i["vaccine"]}}{% if i["dosage"]>0 %}×{{i["dosage"]}}{% endif %}
{{i["batch"]}} {{i["doe"]}} +