From 52ee8690eb336480a226ea0968e35ba27a9740cb Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Tue, 6 Dec 2022 07:19:39 +0100 Subject: [PATCH 1/5] #257 Missing geometry message red * changes message colour from blue to red (indicating 'blocking' message) * only renders message on read_only form e.g. on detail view --- templates/map/geom_form.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/map/geom_form.html b/templates/map/geom_form.html index 5cc5bdd..58e21b8 100644 --- a/templates/map/geom_form.html +++ b/templates/map/geom_form.html @@ -4,9 +4,9 @@ Encapsules the rendering and initializing of a geometry view component, e.g. used in the detail views. {% endcomment %} -{% if geom_form.empty %} +{% if geom_form.empty and geom_form.read_only %}
-
+
{% fa5_icon 'search-location' %} {% trans 'No geometry added, yet.' %}
From cdda43615aebee3861f8c2229896be62e9ed5b5e Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Tue, 6 Dec 2022 07:22:11 +0100 Subject: [PATCH 2/5] #262 Public report missing entry placeholder * adds empty value rendering on public intervention report --- intervention/templates/intervention/report/report.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/intervention/templates/intervention/report/report.html b/intervention/templates/intervention/report/report.html index 1c1016d..9ab9a7b 100644 --- a/intervention/templates/intervention/report/report.html +++ b/intervention/templates/intervention/report/report.html @@ -62,6 +62,8 @@ {{deduction.account.identifier}} - {{deduction.account.title}}
+ {% empty %} + {% trans 'None' %} {% endfor %} From e2e91a4df91bed8443bb1d42d426a35650b812a8 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Tue, 6 Dec 2022 08:30:43 +0100 Subject: [PATCH 3/5] #255 Filter by created user * adds new checkbox filter for all major data types wich shows only entries, where the performing user has been the initial creator of * adds help texts for checkbox filters * adds translations --- konova/filters/mixins/record.py | 1 + konova/filters/mixins/self_created.py | 53 ++++++++++ konova/filters/mixins/share.py | 1 + konova/filters/table_filters.py | 7 +- locale/de/LC_MESSAGES/django.mo | Bin 45704 -> 46328 bytes locale/de/LC_MESSAGES/django.po | 142 ++++++++++++++++---------- 6 files changed, 146 insertions(+), 58 deletions(-) create mode 100644 konova/filters/mixins/self_created.py diff --git a/konova/filters/mixins/record.py b/konova/filters/mixins/record.py index 4547607..f9d8b09 100644 --- a/konova/filters/mixins/record.py +++ b/konova/filters/mixins/record.py @@ -24,6 +24,7 @@ class RecordableTableFilterMixin(django_filters.FilterSet): widget=forms.CheckboxInput( attrs={ "class": "form-check-input", + "title": _("If activated also shows entries which have been already recorded"), } ) ) diff --git a/konova/filters/mixins/self_created.py b/konova/filters/mixins/self_created.py new file mode 100644 index 0000000..43c4d60 --- /dev/null +++ b/konova/filters/mixins/self_created.py @@ -0,0 +1,53 @@ +""" +Author: Michel Peltriaux +Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany +Contact: ksp-servicestelle@sgdnord.rlp.de +Created on: 06.12.22 + +""" +import django_filters +from django import forms +from django.db.models import QuerySet + +from django.utils.translation import gettext_lazy as _ + + +class SelfCreatedTableFilterMixin(django_filters.FilterSet): + """ A mixin for AbstractTableFilter + + Specialized on filtering recordable model types + + """ + sc = django_filters.BooleanFilter( + method='filter_show_self_created', + label=_("Show only self created"), + label_suffix=_(""), + widget=forms.CheckboxInput( + attrs={ + "class": "form-check-input", + "title": _("If activated only shows entries which have been created by you"), + } + ), + ) + + class Meta: + abstract = True + + def filter_show_self_created(self, queryset, name, value) -> QuerySet: + """ Filters queryset depending on value of 'self_created' setting + + Args: + queryset (): + name (): + value (): + + Returns: + + """ + if value: + return queryset.filter( + created__user=self.user, + ) + else: + return queryset + diff --git a/konova/filters/mixins/share.py b/konova/filters/mixins/share.py index 562263c..0c94bdc 100644 --- a/konova/filters/mixins/share.py +++ b/konova/filters/mixins/share.py @@ -24,6 +24,7 @@ class ShareableTableFilterMixin(django_filters.FilterSet): widget=forms.CheckboxInput( attrs={ "class": "form-check-input", + "title": _("If activated also shows entries which are not shared with you"), } ) ) diff --git a/konova/filters/table_filters.py b/konova/filters/table_filters.py index 5b8a4cc..323bf1e 100644 --- a/konova/filters/table_filters.py +++ b/konova/filters/table_filters.py @@ -12,6 +12,7 @@ from konova.filters.mixins.geo_reference import GeoReferencedTableFilterMixin from konova.filters.mixins.keyword import KeywordTableFilterMixin from konova.filters.mixins.office import ConservationOfficeTableFilterMixin, RegistrationOfficeTableFilterMixin from konova.filters.mixins.record import RecordableTableFilterMixin +from konova.filters.mixins.self_created import SelfCreatedTableFilterMixin from konova.filters.mixins.share import ShareableTableFilterMixin @@ -46,8 +47,10 @@ class QueryTableFilter(KeywordTableFilterMixin, pass -class CheckboxTableFilter(ShareableTableFilterMixin, RecordableTableFilterMixin): +class CheckboxTableFilter(ShareableTableFilterMixin, + RecordableTableFilterMixin, + SelfCreatedTableFilterMixin): """ TableFilter holding different filter options for checkbox related filtering """ - pass \ No newline at end of file + pass diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index b87493bc78dc6505adb6b03dd72ed2545d8d3e0b..0f9cea97302ea81b741cb62a859ae1234625a566 100644 GIT binary patch delta 13074 zcmb8#dwh@e|Htw7*qCi*=6sru!^Uie%`s<2&T=Sc8vBf8w%KNka#4g3kz+aJ5K@#= zIix~Kjun-1EPV?pIYjlv@A3Rx@AdV^?|Zxbe%I~y+WmdH-q-tdU0c4t=|2{@d%1vf zF5G{C;c8dFn2MMfZcK@S#-vqOsWI=>HKv%KF*|WS`9t-LDN24&yfG)pk4!M;32av1 zm~@J4F6}^^CQF<$2>z~8U-&P&o<$WcmPJC@(EZ7+hZ_x zwdMVg4on*6Vjk+g>lljntwkHV_f^Ddl-ESncfpc8-wYrTMnNVP$H_K7AB&M+gC%eq zmc&m{4?c_P=n9s`KdoU+j44OH2A0LvsCNCWsi=vK!zi9_W|D}*EvT7ZMBVT+vJ>VG z*1^AReas`qY#<+x8rT`sfUcuf;2vr~!A*@Rf>p5$#@c)$YNFlH(Tz`%kfTr?j>jN; z(Uvbkb?~~)??nytFjmDcP%CvC3u8btW{*X&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4kbMz{*F|`wn6CJqg>Z;gZs}it y$%9`hrV?DE@Gi-dc;1Qu!8^Yx-z#|MlLniEcJA%iD`sbbsjUj{oU~?8-v0rBiv4E* diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index fb26103..99a9b37 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -28,8 +28,8 @@ #: konova/filters/mixins/geo_reference.py:79 konova/filters/mixins/office.py:24 #: konova/filters/mixins/office.py:25 konova/filters/mixins/office.py:56 #: konova/filters/mixins/office.py:57 konova/filters/mixins/record.py:23 -#: konova/filters/mixins/share.py:23 konova/forms/geometry_form.py:30 -#: konova/forms/modals/document_form.py:25 +#: konova/filters/mixins/self_created.py:24 konova/filters/mixins/share.py:23 +#: konova/forms/geometry_form.py:31 konova/forms/modals/document_form.py:25 #: konova/forms/modals/document_form.py:35 #: konova/forms/modals/document_form.py:48 #: konova/forms/modals/document_form.py:60 @@ -43,7 +43,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-16 13:36+0100\n" +"POT-Creation-Date: 2022-12-06 08:23+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -77,7 +77,7 @@ msgstr "Einträge erstellt bis..." #: intervention/forms/intervention.py:103 #: intervention/templates/intervention/detail/view.html:56 #: intervention/templates/intervention/report/report.html:37 -#: intervention/utils/quality.py:49 konova/filters/mixins/office.py:34 +#: intervention/utils/quality.py:62 konova/filters/mixins/office.py:34 msgid "Conservation office" msgstr "Eintragungsstelle" @@ -392,7 +392,7 @@ msgstr "Bezeichnung" msgid "An explanatory name" msgstr "Aussagekräftiger Titel" -#: compensation/forms/compensation.py:48 ema/forms.py:51 ema/forms.py:111 +#: compensation/forms/compensation.py:48 ema/forms.py:51 ema/forms.py:114 msgid "Compensation XY; Location ABC" msgstr "Kompensation XY; Flur ABC" @@ -438,11 +438,11 @@ msgid "Select the intervention for which this compensation compensates" msgstr "Wählen Sie den Eingriff, für den diese Kompensation bestimmt ist" #: compensation/forms/compensation.py:113 -#: compensation/views/compensation/compensation.py:113 +#: compensation/views/compensation/compensation.py:115 msgid "New compensation" msgstr "Neue Kompensation" -#: compensation/forms/compensation.py:186 +#: compensation/forms/compensation.py:189 msgid "Edit compensation" msgstr "Bearbeite Kompensation" @@ -465,7 +465,7 @@ msgid "When did the parties agree on this?" msgstr "Wann wurde dieses Ökokonto offiziell vereinbart?" #: compensation/forms/eco_account.py:70 -#: compensation/views/eco_account/eco_account.py:94 +#: compensation/views/eco_account/eco_account.py:96 msgid "New Eco-Account" msgstr "Neues Ökokonto" @@ -473,11 +473,11 @@ msgstr "Neues Ökokonto" msgid "Eco-Account XY; Location ABC" msgstr "Ökokonto XY; Flur ABC" -#: compensation/forms/eco_account.py:143 +#: compensation/forms/eco_account.py:145 msgid "Edit Eco-Account" msgstr "Ökokonto bearbeiten" -#: compensation/forms/eco_account.py:228 +#: compensation/forms/eco_account.py:230 msgid "The account can not be removed, since there are still deductions." msgstr "" "Das Ökokonto kann nicht entfernt werden, da hierzu noch Abbuchungen " @@ -491,7 +491,7 @@ msgstr "" #: intervention/forms/intervention.py:131 #: intervention/templates/intervention/detail/view.html:60 #: intervention/templates/intervention/report/report.html:41 -#: intervention/utils/quality.py:42 +#: intervention/utils/quality.py:55 msgid "Conservation office file number" msgstr "Aktenzeichen Eintragungsstelle" @@ -725,18 +725,22 @@ msgid "m" msgstr "" #: compensation/models/action.py:22 -msgid "km" +msgid "m²" msgstr "" #: compensation/models/action.py:23 -msgid "m²" +msgid "m³" msgstr "" #: compensation/models/action.py:24 -msgid "ha" +msgid "km" msgstr "" #: compensation/models/action.py:25 +msgid "ha" +msgstr "" + +#: compensation/models/action.py:26 msgid "Pieces" msgstr "Stück" @@ -971,6 +975,7 @@ msgstr "Frist löschen" #: compensation/templates/compensation/detail/eco_account/includes/documents.html:8 #: ema/templates/ema/detail/includes/documents.html:8 #: intervention/templates/intervention/detail/includes/documents.html:8 +#: intervention/utils/quality.py:37 msgid "Documents" msgstr "Dokumente" @@ -1135,7 +1140,7 @@ msgstr "Verzeichnet am" #: ema/templates/ema/detail/view.html:71 #: ema/templates/ema/report/report.html:34 #: intervention/templates/intervention/detail/view.html:113 -#: intervention/templates/intervention/report/report.html:87 +#: intervention/templates/intervention/report/report.html:89 msgid "Last modified" msgstr "Zuletzt bearbeitet" @@ -1240,7 +1245,8 @@ msgstr "Abbuchungen für" #: compensation/templates/compensation/report/eco_account/report.html:42 #: intervention/templates/intervention/report/report.html:53 -#: intervention/templates/intervention/report/report.html:74 +#: intervention/templates/intervention/report/report.html:66 +#: intervention/templates/intervention/report/report.html:76 msgid "None" msgstr "-" @@ -1252,7 +1258,7 @@ msgstr "Ungleiche Zustandsflächenmengen" msgid "Finished deadlines" msgstr "Umsetzungstermin" -#: compensation/utils/quality.py:85 intervention/utils/quality.py:84 +#: compensation/utils/quality.py:85 intervention/utils/quality.py:97 msgid "Legal data" msgstr "Rechtliche Daten" @@ -1263,22 +1269,22 @@ msgstr "" "überschreiten" #: compensation/utils/quality.py:115 ema/utils/quality.py:30 -#: intervention/utils/quality.py:55 +#: intervention/utils/quality.py:68 msgid "Responsible data" msgstr "Daten zu den verantwortlichen Stellen" -#: compensation/views/compensation/compensation.py:56 +#: compensation/views/compensation/compensation.py:58 msgid "Compensations - Overview" msgstr "Kompensationen - Übersicht" -#: compensation/views/compensation/compensation.py:175 +#: compensation/views/compensation/compensation.py:177 #: konova/utils/message_templates.py:37 msgid "Compensation {} edited" msgstr "Kompensation {} bearbeitet" -#: compensation/views/compensation/compensation.py:185 -#: compensation/views/eco_account/eco_account.py:159 ema/views/ema.py:210 -#: intervention/views/intervention.py:228 +#: compensation/views/compensation/compensation.py:187 +#: compensation/views/eco_account/eco_account.py:161 ema/views/ema.py:212 +#: intervention/views/intervention.py:230 msgid "Edit {}" msgstr "Bearbeite {}" @@ -1288,27 +1294,27 @@ msgstr "Bearbeite {}" msgid "Report {}" msgstr "Bericht {}" -#: compensation/views/eco_account/eco_account.py:51 +#: compensation/views/eco_account/eco_account.py:53 msgid "Eco-account - Overview" msgstr "Ökokonten - Übersicht" -#: compensation/views/eco_account/eco_account.py:84 +#: compensation/views/eco_account/eco_account.py:86 msgid "Eco-Account {} added" msgstr "Ökokonto {} hinzugefügt" -#: compensation/views/eco_account/eco_account.py:149 +#: compensation/views/eco_account/eco_account.py:151 msgid "Eco-Account {} edited" msgstr "Ökokonto {} bearbeitet" -#: compensation/views/eco_account/eco_account.py:265 +#: compensation/views/eco_account/eco_account.py:267 msgid "Eco-account removed" msgstr "Ökokonto entfernt" -#: ema/forms.py:42 ema/views/ema.py:93 +#: ema/forms.py:42 ema/views/ema.py:95 msgid "New EMA" msgstr "Neue EMA hinzufügen" -#: ema/forms.py:105 +#: ema/forms.py:108 msgid "Edit EMA" msgstr "Bearbeite EMA" @@ -1332,19 +1338,19 @@ msgstr "" msgid "Payment funded compensation" msgstr "Ersatzzahlungsmaßnahme" -#: ema/views/ema.py:50 +#: ema/views/ema.py:52 msgid "EMAs - Overview" msgstr "EMAs - Übersicht" -#: ema/views/ema.py:83 +#: ema/views/ema.py:85 msgid "EMA {} added" msgstr "EMA {} hinzugefügt" -#: ema/views/ema.py:200 +#: ema/views/ema.py:202 msgid "EMA {} edited" msgstr "EMA {} bearbeitet" -#: ema/views/ema.py:234 +#: ema/views/ema.py:236 msgid "EMA removed" msgstr "EMA entfernt" @@ -1355,7 +1361,7 @@ msgstr "Bauvorhaben XY; Flur ABC" #: intervention/forms/intervention.py:53 #: intervention/templates/intervention/detail/view.html:35 #: intervention/templates/intervention/report/report.html:16 -#: intervention/utils/quality.py:82 +#: intervention/utils/quality.py:95 msgid "Process type" msgstr "Verfahrenstyp" @@ -1366,14 +1372,14 @@ msgstr "Mehrfachauswahl möglich" #: intervention/forms/intervention.py:87 #: intervention/templates/intervention/detail/view.html:48 #: intervention/templates/intervention/report/report.html:29 -#: intervention/utils/quality.py:46 konova/filters/mixins/office.py:66 +#: intervention/utils/quality.py:59 konova/filters/mixins/office.py:66 msgid "Registration office" msgstr "Zulassungsbehörde" #: intervention/forms/intervention.py:119 #: intervention/templates/intervention/detail/view.html:52 #: intervention/templates/intervention/report/report.html:33 -#: intervention/utils/quality.py:39 +#: intervention/utils/quality.py:52 msgid "Registration office file number" msgstr "Aktenzeichen Zulassungsbehörde" @@ -1395,22 +1401,23 @@ msgstr "Detailangabe zum Eingriffsverursacher" #: intervention/forms/intervention.py:174 #: intervention/templates/intervention/detail/view.html:101 -#: intervention/templates/intervention/report/report.html:79 -#: intervention/utils/quality.py:73 +#: intervention/templates/intervention/report/report.html:81 +#: intervention/utils/quality.py:86 msgid "Registration date" msgstr "Datum Zulassung bzw. Satzungsbeschluss" #: intervention/forms/intervention.py:186 #: intervention/templates/intervention/detail/view.html:105 -#: intervention/templates/intervention/report/report.html:83 +#: intervention/templates/intervention/report/report.html:85 msgid "Binding on" msgstr "Datum Bestandskraft bzw. Rechtskraft" -#: intervention/forms/intervention.py:212 intervention/views/intervention.py:98 +#: intervention/forms/intervention.py:212 +#: intervention/views/intervention.py:100 msgid "New intervention" msgstr "Neuer Eingriff" -#: intervention/forms/intervention.py:299 +#: intervention/forms/intervention.py:302 msgid "Edit intervention" msgstr "Eingriff bearbeiten" @@ -1559,10 +1566,11 @@ msgid "" "You entered a payment. Please upload the legal document which defines the " "payment`s amount." msgstr "" -"Sie haben Ersatzzahlungen angegeben. Laden Sie bitte den Zahlungsbescheid als Dokument hoch." +"Sie haben Ersatzzahlungen angegeben. Laden Sie bitte den Zahlungsbescheid " +"als Dokument hoch." #: intervention/templates/intervention/detail/includes/payments.html:8 -#: intervention/templates/intervention/report/report.html:69 +#: intervention/templates/intervention/report/report.html:71 msgid "Payments" msgstr "Ersatzzahlungen" @@ -1598,7 +1606,7 @@ msgid "Remove revocation" msgstr "Widerspruch entfernen" #: intervention/templates/intervention/detail/view.html:64 -#: intervention/utils/quality.py:52 +#: intervention/utils/quality.py:65 msgid "Intervention handler" msgstr "Eingriffsverursacher" @@ -1610,24 +1618,24 @@ msgstr "vorhanden" msgid "Deductions of eco-accounts" msgstr "Abbuchungen von Ökokonten" -#: intervention/templates/intervention/report/report.html:72 +#: intervention/templates/intervention/report/report.html:74 msgid "Exist" msgstr "Vorhanden" -#: intervention/utils/quality.py:70 +#: intervention/utils/quality.py:83 #: templates/table/revocation_warning_col.html:5 msgid "Revocations exists" msgstr "Widersprüche liegen vor" -#: intervention/utils/quality.py:76 +#: intervention/utils/quality.py:89 msgid "Binding date" msgstr "Datum Bestandskraft bzw. Rechtskraft" -#: intervention/utils/quality.py:79 +#: intervention/utils/quality.py:92 msgid "Laws" msgstr "Gesetze" -#: intervention/utils/quality.py:101 +#: intervention/utils/quality.py:114 msgid "No compensation of any type found (Compensation, Payment, Deduction)" msgstr "" "Kein Ausgleich jeglicher Art gefunden (Kompensation, Ersatzzahlung, " @@ -1637,19 +1645,19 @@ msgstr "" msgid "Check performed" msgstr "Prüfung durchgeführt" -#: intervention/views/intervention.py:55 +#: intervention/views/intervention.py:57 msgid "Interventions - Overview" msgstr "Eingriffe - Übersicht" -#: intervention/views/intervention.py:88 +#: intervention/views/intervention.py:90 msgid "Intervention {} added" msgstr "Eingriff {} hinzugefügt" -#: intervention/views/intervention.py:216 +#: intervention/views/intervention.py:218 msgid "Intervention {} edited" msgstr "Eingriff {} bearbeitet" -#: intervention/views/intervention.py:253 +#: intervention/views/intervention.py:255 msgid "{} removed" msgstr "{} entfernt" @@ -1734,10 +1742,26 @@ msgstr "Nach Zulassungsbehörde suchen" msgid "Show recorded" msgstr "Verzeichnete anzeigen" +#: konova/filters/mixins/record.py:27 +msgid "If activated also shows entries which have been already recorded" +msgstr "Wenn aktiviert werden auch Einträge angezeigt, die bereits verzeichnet wurden" + +#: konova/filters/mixins/self_created.py:23 +msgid "Show only self created" +msgstr "Nur selbst erstellte anzeigen" + +#: konova/filters/mixins/self_created.py:28 +msgid "If activated only shows entries which have been created by you" +msgstr "Wenn aktiviert werden nur Einträge angezeigt, die von Ihnen erstellt worden sind" + #: konova/filters/mixins/share.py:22 msgid "Show unshared" msgstr "Nicht freigegebene anzeigen" +#: konova/filters/mixins/share.py:27 +msgid "If activated also shows entries which are not shared with you" +msgstr "Wenn aktiviert werden auch Einträge angezeigt, die nicht für Sie freigegeben sind" + #: konova/forms/base_form.py:23 templates/form/collapsable/form.html:62 msgid "Save" msgstr "Speichern" @@ -1746,12 +1770,12 @@ msgstr "Speichern" msgid "Not editable" msgstr "Nicht editierbar" -#: konova/forms/geometry_form.py:29 konova/utils/quality.py:44 +#: konova/forms/geometry_form.py:30 konova/utils/quality.py:44 #: konova/utils/quality.py:46 templates/form/collapsable/form.html:45 msgid "Geometry" msgstr "Geometrie" -#: konova/forms/geometry_form.py:80 +#: konova/forms/geometry_form.py:99 msgid "Only surfaces allowed. Points or lines must be buffered." msgstr "" "Nur Flächen erlaubt. Punkte oder Linien müssen zu Flächen gepuffert werden." @@ -1904,6 +1928,10 @@ msgstr "Gemarkungsschlüssel" msgid "Spatial reference" msgstr "Raumreferenz" +#: konova/templates/konova/includes/parcels/parcels.html:28 +msgid "No geometry entry found on database. Please contact an admin!" +msgstr "" + #: konova/templates/konova/includes/quickstart/compensations.html:20 #: konova/templates/konova/includes/quickstart/ecoaccounts.html:20 #: konova/templates/konova/includes/quickstart/interventions.html:20 @@ -2308,7 +2336,9 @@ msgstr "" #: templates/500.html:10 msgid "Something happened. Admins have been informed. We are working on it!" -msgstr "Irgendetwas ist passiert. Die Administratoren wurden informiert. Wir arbeiten daran!" +msgstr "" +"Irgendetwas ist passiert. Die Administratoren wurden informiert. Wir " +"arbeiten daran!" #: templates/email/api/verify_token.html:7 msgid "Hello support" From 0901bb8d765a2785032eb033729e869bd9160ef6 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Thu, 8 Dec 2022 09:48:01 +0100 Subject: [PATCH 4/5] Template enhancements * adds configurable label-input ratio setting for forms and specializes for RemoveModalForm * enhances form body html structure for better UX and usage of label-input ratio --- konova/forms/base_form.py | 15 +++++++++++++++ konova/forms/modals/remove_form.py | 1 + konova/static/css/konova.css | 4 ++++ .../form/table/generic_table_form_body.html | 16 +++++++++++----- 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/konova/forms/base_form.py b/konova/forms/base_form.py index 6b71c21..98eaa41 100644 --- a/konova/forms/base_form.py +++ b/konova/forms/base_form.py @@ -29,6 +29,7 @@ class BaseForm(forms.Form): form_attrs = {} # Holds additional attributes, that can be used in the template has_required_fields = False # Automatically set. Triggers hint rendering in templates show_cancel_btn = True + label_input_ratio = (3, 9) # used for col-sm-xy in the template. Must sum up to 12. Specify on inheriting forms def __init__(self, *args, **kwargs): self.instance = kwargs.pop("instance", None) @@ -42,12 +43,26 @@ class BaseForm(forms.Form): break self.check_for_recorded_instance() + self.__check_valid_label_input_ratio() @abstractmethod def save(self): # To be implemented in subclasses! pass + def __check_valid_label_input_ratio(self): + """ Checks whether the configured label-input ratio is valid + + If not valid an AssertionError will be raised. + The valid sum of label-input ratio is defined by bootstrap's column layout system. + + Returns: + + """ + ratio = self.label_input_ratio[0] + self.label_input_ratio[1] + if ratio != 12: + raise AssertionError(f"Label-input ratio on form must sum up to 12! It's {self.label_input_ratio}") + def disable_form_field(self, field: str): """ Disables a form field for user editing diff --git a/konova/forms/modals/remove_form.py b/konova/forms/modals/remove_form.py index 7a14626..f09af99 100644 --- a/konova/forms/modals/remove_form.py +++ b/konova/forms/modals/remove_form.py @@ -24,6 +24,7 @@ class RemoveModalForm(BaseModalForm): widget=forms.CheckboxInput(), required=True, ) + label_input_ratio = (2, 10) def __init__(self, *args, **kwargs): self.template = "modal/modal_form.html" diff --git a/konova/static/css/konova.css b/konova/static/css/konova.css index ed79704..0092fe9 100644 --- a/konova/static/css/konova.css +++ b/konova/static/css/konova.css @@ -60,6 +60,10 @@ a { color: var(--rlp-red); } +label { + width: 100%; +} + .form-control:focus{ outline: none; border-color: var(--rlp-red); diff --git a/templates/form/table/generic_table_form_body.html b/templates/form/table/generic_table_form_body.html index 0f9b790..6fae274 100644 --- a/templates/form/table/generic_table_form_body.html +++ b/templates/form/table/generic_table_form_body.html @@ -4,12 +4,18 @@ {% for field in form %} - - -
- {{ field.help_text }} + {{form.small_label_column}} + + - + {{ field }} {% for error in field.errors %}
From a06b96043520f926307255640d760e56f0b658c3 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Thu, 8 Dec 2022 10:14:39 +0100 Subject: [PATCH 5/5] #268 Filter multiple parcelgroups * adds filter support for multiple parcelgroup and district names, separated by ',' --- konova/filters/mixins/geo_reference.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/konova/filters/mixins/geo_reference.py b/konova/filters/mixins/geo_reference.py index 71fa41f..6d77f6b 100644 --- a/konova/filters/mixins/geo_reference.py +++ b/konova/filters/mixins/geo_reference.py @@ -19,7 +19,7 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet): Specialized on filtering GeoReferenced model types """ - # Parcel gmrkng + # District di = django_filters.CharFilter( method="filter_district", label=_(""), @@ -72,7 +72,7 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet): ), ) - # Parcel counter + # Parcel number pn = django_filters.NumberFilter( method="filter_parcel_number", label=_(""), @@ -112,7 +112,7 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet): return queryset def filter_district(self, queryset, name, value) -> QuerySet: - """ Filters queryset depending on value for 'Gemarkung' + """ Filters queryset depending on value for 'Kreis' Args: queryset (): @@ -122,10 +122,13 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet): Returns: """ - matching_districts = District.objects.filter( - Q(name__icontains=value) | - Q(key__icontains=value) - ).distinct() + values = value.split(",") + q = Q() + for val in values: + val = val.strip() + q |= Q(name__icontains=val) | Q(key__icontains=val) + + matching_districts = District.objects.filter(q).distinct() matching_parcels = Parcel.objects.filter( district__in=matching_districts ) @@ -148,9 +151,14 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet): Returns: """ + values = value.split(",") + q = Q() + for val in values: + val = val.strip() + q |= Q(parcel_group__name__icontains=val) | Q(parcel_group__key__icontains=val) queryset = self._filter_parcel_reference( queryset, - Q(parcel_group__name__icontains=value) | Q(parcel_group__key__icontains=value), + q, ) return queryset