From eda1c7a532643bb6f7bac0cd79606d0c272d34d2 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Mon, 12 Dec 2022 13:09:17 +0100 Subject: [PATCH] Public report enhancements * adds toggling of scrollable box table views * deactivates scrolling for public report view (so all entries can be seen if page is printed) --- .../compensation/detail/compensation/includes/actions.html | 2 +- .../compensation/detail/compensation/includes/deadlines.html | 2 +- .../compensation/detail/compensation/includes/documents.html | 2 +- .../compensation/detail/compensation/includes/states-after.html | 2 +- .../detail/compensation/includes/states-before.html | 2 +- .../compensation/detail/eco_account/includes/actions.html | 2 +- .../compensation/detail/eco_account/includes/deadlines.html | 2 +- .../compensation/detail/eco_account/includes/deductions.html | 2 +- .../compensation/detail/eco_account/includes/documents.html | 2 +- .../compensation/detail/eco_account/includes/states-after.html | 2 +- .../compensation/detail/eco_account/includes/states-before.html | 2 +- compensation/views/compensation/report.py | 1 + compensation/views/eco_account/report.py | 1 + ema/templates/ema/detail/includes/actions.html | 2 +- ema/templates/ema/detail/includes/deadlines.html | 2 +- ema/templates/ema/detail/includes/documents.html | 2 +- ema/templates/ema/detail/includes/states-after.html | 2 +- ema/templates/ema/detail/includes/states-before.html | 2 +- ema/views/report.py | 1 + .../templates/intervention/detail/includes/compensations.html | 2 +- .../templates/intervention/detail/includes/deductions.html | 2 +- .../templates/intervention/detail/includes/documents.html | 2 +- .../templates/intervention/detail/includes/payments.html | 2 +- .../templates/intervention/detail/includes/revocation.html | 2 +- intervention/templates/intervention/report/report.html | 2 +- intervention/views/report.py | 1 + konova/contexts.py | 1 + konova/static/css/konova.css | 2 +- templates/form/table/generic_table_form_body.html | 2 +- 29 files changed, 29 insertions(+), 24 deletions(-) diff --git a/compensation/templates/compensation/detail/compensation/includes/actions.html b/compensation/templates/compensation/detail/compensation/includes/actions.html index 3fa4769b..e4ec5b60 100644 --- a/compensation/templates/compensation/detail/compensation/includes/actions.html +++ b/compensation/templates/compensation/detail/compensation/includes/actions.html @@ -21,7 +21,7 @@ -
+
diff --git a/compensation/templates/compensation/detail/compensation/includes/deadlines.html b/compensation/templates/compensation/detail/compensation/includes/deadlines.html index bc54e95a..7f328802 100644 --- a/compensation/templates/compensation/detail/compensation/includes/deadlines.html +++ b/compensation/templates/compensation/detail/compensation/includes/deadlines.html @@ -25,7 +25,7 @@ {% trans 'Missing finished deadline ' %} {% endif %} -
+
diff --git a/compensation/templates/compensation/detail/compensation/includes/documents.html b/compensation/templates/compensation/detail/compensation/includes/documents.html index 573fd865..17338271 100644 --- a/compensation/templates/compensation/detail/compensation/includes/documents.html +++ b/compensation/templates/compensation/detail/compensation/includes/documents.html @@ -20,7 +20,7 @@ -
+
diff --git a/compensation/templates/compensation/detail/compensation/includes/states-after.html b/compensation/templates/compensation/detail/compensation/includes/states-after.html index 9c02978b..dfda6aee 100644 --- a/compensation/templates/compensation/detail/compensation/includes/states-after.html +++ b/compensation/templates/compensation/detail/compensation/includes/states-after.html @@ -25,7 +25,7 @@ {% trans 'Missing surfaces according to states before: ' %}{{ diff_states|floatformat:2 }} m² {% endif %} -
+
diff --git a/compensation/templates/compensation/detail/compensation/includes/states-before.html b/compensation/templates/compensation/detail/compensation/includes/states-before.html index 95917389..ff3d2673 100644 --- a/compensation/templates/compensation/detail/compensation/includes/states-before.html +++ b/compensation/templates/compensation/detail/compensation/includes/states-before.html @@ -25,7 +25,7 @@ {% trans 'Missing surfaces according to states after: ' %}{{ diff_states|floatformat:2 }} m² {% endif %} -
+
diff --git a/compensation/templates/compensation/detail/eco_account/includes/actions.html b/compensation/templates/compensation/detail/eco_account/includes/actions.html index 7a986535..52f86486 100644 --- a/compensation/templates/compensation/detail/eco_account/includes/actions.html +++ b/compensation/templates/compensation/detail/eco_account/includes/actions.html @@ -20,7 +20,7 @@ -
+
diff --git a/compensation/templates/compensation/detail/eco_account/includes/deadlines.html b/compensation/templates/compensation/detail/eco_account/includes/deadlines.html index c0b4daf9..4a88b88c 100644 --- a/compensation/templates/compensation/detail/eco_account/includes/deadlines.html +++ b/compensation/templates/compensation/detail/eco_account/includes/deadlines.html @@ -25,7 +25,7 @@ {% trans 'Missing finished deadline ' %} {% endif %} -
+
diff --git a/compensation/templates/compensation/detail/eco_account/includes/deductions.html b/compensation/templates/compensation/detail/eco_account/includes/deductions.html index b91fb21f..03f6bf34 100644 --- a/compensation/templates/compensation/detail/eco_account/includes/deductions.html +++ b/compensation/templates/compensation/detail/eco_account/includes/deductions.html @@ -20,7 +20,7 @@ -
+
diff --git a/compensation/templates/compensation/detail/eco_account/includes/documents.html b/compensation/templates/compensation/detail/eco_account/includes/documents.html index 67881c90..bf61f13c 100644 --- a/compensation/templates/compensation/detail/eco_account/includes/documents.html +++ b/compensation/templates/compensation/detail/eco_account/includes/documents.html @@ -20,7 +20,7 @@ -
+
diff --git a/compensation/templates/compensation/detail/eco_account/includes/states-after.html b/compensation/templates/compensation/detail/eco_account/includes/states-after.html index 05a05e31..d188f081 100644 --- a/compensation/templates/compensation/detail/eco_account/includes/states-after.html +++ b/compensation/templates/compensation/detail/eco_account/includes/states-after.html @@ -25,7 +25,7 @@ {% trans 'Missing surfaces according to states before: ' %}{{ diff_states|floatformat:2 }} m² {% endif %} -
+
diff --git a/compensation/templates/compensation/detail/eco_account/includes/states-before.html b/compensation/templates/compensation/detail/eco_account/includes/states-before.html index 10b3f63b..56fe0b07 100644 --- a/compensation/templates/compensation/detail/eco_account/includes/states-before.html +++ b/compensation/templates/compensation/detail/eco_account/includes/states-before.html @@ -25,7 +25,7 @@ {% trans 'Missing surfaces according to states after: ' %}{{ diff_states|floatformat:2 }} m² {% endif %} -
+
diff --git a/compensation/views/compensation/report.py b/compensation/views/compensation/report.py index 28d563e9..e81cb1dc 100644 --- a/compensation/views/compensation/report.py +++ b/compensation/views/compensation/report.py @@ -73,6 +73,7 @@ def report_view(request: HttpRequest, id: str): "geom_form": geom_form, "parcels": parcels, "actions": actions, + "tables_scrollable": False, TAB_TITLE_IDENTIFIER: tab_title, } context = BaseContext(request, context).context diff --git a/compensation/views/eco_account/report.py b/compensation/views/eco_account/report.py index 9bbf32b1..47b2a109 100644 --- a/compensation/views/eco_account/report.py +++ b/compensation/views/eco_account/report.py @@ -80,6 +80,7 @@ def report_view(request: HttpRequest, id: str): "parcels": parcels, "actions": actions, "deductions": deductions, + "tables_scrollable": False, TAB_TITLE_IDENTIFIER: tab_title, } context = BaseContext(request, context).context diff --git a/ema/templates/ema/detail/includes/actions.html b/ema/templates/ema/detail/includes/actions.html index 91110701..8a77c79d 100644 --- a/ema/templates/ema/detail/includes/actions.html +++ b/ema/templates/ema/detail/includes/actions.html @@ -20,7 +20,7 @@ -
+
diff --git a/ema/templates/ema/detail/includes/deadlines.html b/ema/templates/ema/detail/includes/deadlines.html index 0c25b390..bc267dd3 100644 --- a/ema/templates/ema/detail/includes/deadlines.html +++ b/ema/templates/ema/detail/includes/deadlines.html @@ -25,7 +25,7 @@ {% trans 'Missing finished deadline ' %} {% endif %} -
+
diff --git a/ema/templates/ema/detail/includes/documents.html b/ema/templates/ema/detail/includes/documents.html index b38d5499..d1f60a01 100644 --- a/ema/templates/ema/detail/includes/documents.html +++ b/ema/templates/ema/detail/includes/documents.html @@ -20,7 +20,7 @@ -
+
diff --git a/ema/templates/ema/detail/includes/states-after.html b/ema/templates/ema/detail/includes/states-after.html index 78cbee0a..0277e021 100644 --- a/ema/templates/ema/detail/includes/states-after.html +++ b/ema/templates/ema/detail/includes/states-after.html @@ -25,7 +25,7 @@ {% trans 'Missing surfaces according to states before: ' %}{{ diff_states|floatformat:2 }} m² {% endif %} -
+
diff --git a/ema/templates/ema/detail/includes/states-before.html b/ema/templates/ema/detail/includes/states-before.html index fb29024a..f0d4eddd 100644 --- a/ema/templates/ema/detail/includes/states-before.html +++ b/ema/templates/ema/detail/includes/states-before.html @@ -25,7 +25,7 @@ {% trans 'Missing surfaces according to states after: ' %}{{ diff_states|floatformat:2 }} m² {% endif %} -
+
diff --git a/ema/views/report.py b/ema/views/report.py index daea0b44..6b7840f2 100644 --- a/ema/views/report.py +++ b/ema/views/report.py @@ -73,6 +73,7 @@ def report_view(request:HttpRequest, id: str): "geom_form": geom_form, "parcels": parcels, "actions": actions, + "tables_scrollable": False, TAB_TITLE_IDENTIFIER: tab_title, } context = BaseContext(request, context).context diff --git a/intervention/templates/intervention/detail/includes/compensations.html b/intervention/templates/intervention/detail/includes/compensations.html index c572a344..758d0a89 100644 --- a/intervention/templates/intervention/detail/includes/compensations.html +++ b/intervention/templates/intervention/detail/includes/compensations.html @@ -22,7 +22,7 @@ -
+
diff --git a/intervention/templates/intervention/detail/includes/deductions.html b/intervention/templates/intervention/detail/includes/deductions.html index 04110b8b..66a55047 100644 --- a/intervention/templates/intervention/detail/includes/deductions.html +++ b/intervention/templates/intervention/detail/includes/deductions.html @@ -20,7 +20,7 @@ -
+
diff --git a/intervention/templates/intervention/detail/includes/documents.html b/intervention/templates/intervention/detail/includes/documents.html index 5037ff8a..23746946 100644 --- a/intervention/templates/intervention/detail/includes/documents.html +++ b/intervention/templates/intervention/detail/includes/documents.html @@ -25,7 +25,7 @@ {% trans 'You entered a payment. Please upload the legal document which defines the payment`s amount.' %} {% endif %} -
+
diff --git a/intervention/templates/intervention/detail/includes/payments.html b/intervention/templates/intervention/detail/includes/payments.html index 65408e47..5dde0098 100644 --- a/intervention/templates/intervention/detail/includes/payments.html +++ b/intervention/templates/intervention/detail/includes/payments.html @@ -20,7 +20,7 @@ -
+
diff --git a/intervention/templates/intervention/detail/includes/revocation.html b/intervention/templates/intervention/detail/includes/revocation.html index 39738d24..60cedfc6 100644 --- a/intervention/templates/intervention/detail/includes/revocation.html +++ b/intervention/templates/intervention/detail/includes/revocation.html @@ -23,7 +23,7 @@ -
+
diff --git a/intervention/templates/intervention/report/report.html b/intervention/templates/intervention/report/report.html index 9ab9a7b9..6c14c22d 100644 --- a/intervention/templates/intervention/report/report.html +++ b/intervention/templates/intervention/report/report.html @@ -103,7 +103,7 @@
{% include 'konova/includes/parcels/parcels.html' %}
-
+
{% include 'konova/includes/report/qrcodes.html' %}
diff --git a/intervention/views/report.py b/intervention/views/report.py index fa4798d0..663c293e 100644 --- a/intervention/views/report.py +++ b/intervention/views/report.py @@ -67,6 +67,7 @@ def report_view(request:HttpRequest, id: str): }, "geom_form": geom_form, "parcels": parcels, + "tables_scrollable": False, TAB_TITLE_IDENTIFIER: tab_title, } context = BaseContext(request, context).context diff --git a/konova/contexts.py b/konova/contexts.py index 70cb1aac..23faedb8 100644 --- a/konova/contexts.py +++ b/konova/contexts.py @@ -28,6 +28,7 @@ class BaseContext: "help_link": HELP_LINK, "impressum_link": IMPRESSUM_LINK, "CONTACT_MAIL": EMAIL_REPLY_TO, + "tables_scrollable": True, # tables in boxes } # Add additional context, derived from given parameters diff --git a/konova/static/css/konova.css b/konova/static/css/konova.css index 0092fe9e..eb727894 100644 --- a/konova/static/css/konova.css +++ b/konova/static/css/konova.css @@ -60,7 +60,7 @@ a { color: var(--rlp-red); } -label { +.form-label { width: 100%; } diff --git a/templates/form/table/generic_table_form_body.html b/templates/form/table/generic_table_form_body.html index 6fae2744..aac55633 100644 --- a/templates/form/table/generic_table_form_body.html +++ b/templates/form/table/generic_table_form_body.html @@ -6,7 +6,7 @@
{{form.small_label_column}}
-