From 766d38bcbfcc073f24a8279dd6547ac9490df5c1 Mon Sep 17 00:00:00 2001 From: mipel Date: Tue, 10 Aug 2021 13:12:15 +0200 Subject: [PATCH] HTML improvements * refactors initializing and rendering of a map view into map/geom_form.html, which leads to simple includes on the detail views instead of redundant html * refactors django-autocomplete-light form media links and scripts into dal/scripts.html, which can be included on the header blocks of detail views to support form modals using dal easier without the need for form.media * changes filter behaviour on eco account index: instead of hiding recorded accounts (like in interventions), the filter option there has been replaced with "Show only unrecorded" which can be used to hide all recorded ones * background: eco accounts shall be visible when recorded, since they can only be used for withdrawing if they are recorded. Hiding the recorded ones does not make any sense, just like in interventions * updates some code documentation * adds/updates translations --- compensation/filters.py | 13 +- compensation/forms.py | 4 + .../detail/compensation/view.html | 6 +- .../compensation/detail/eco_account/view.html | 14 +- .../templates/intervention/detail/view.html | 16 +- locale/de/LC_MESSAGES/django.mo | Bin 16955 -> 17020 bytes locale/de/LC_MESSAGES/django.po | 138 +++++++++--------- templates/dal/scripts.html | 15 ++ templates/map/geom_form.html | 12 ++ 9 files changed, 131 insertions(+), 87 deletions(-) create mode 100644 templates/dal/scripts.html create mode 100644 templates/map/geom_form.html diff --git a/compensation/filters.py b/compensation/filters.py index f96cbb9..8bf0c23 100644 --- a/compensation/filters.py +++ b/compensation/filters.py @@ -5,6 +5,9 @@ Contact: michel.peltriaux@sgdnord.rlp.de Created on: 29.07.21 """ +import django_filters +from django.utils.translation import gettext_lazy as _ +from django import forms from django.db.models import QuerySet from intervention.filters import InterventionTableFilter @@ -62,6 +65,12 @@ class EcoAccountTableFilter(InterventionTableFilter): Just some minor changes for EcoAccount model. """ + sr = django_filters.BooleanFilter( + method='_filter_only_show_unrecorded', + label=_("Show only unrecorded"), + label_suffix=_(""), + widget=forms.CheckboxInput() + ) def _filter_show_all(self, queryset, name, value) -> QuerySet: """ Filters queryset depending on value of 'show_all' setting @@ -81,7 +90,7 @@ class EcoAccountTableFilter(InterventionTableFilter): else: return queryset - def _filter_show_recorded(self, queryset, name, value) -> QuerySet: + def _filter_only_show_unrecorded(self, queryset, name, value) -> QuerySet: """ Filters queryset depending on value of 'show_recorded' setting Args: @@ -92,7 +101,7 @@ class EcoAccountTableFilter(InterventionTableFilter): Returns: """ - if not value: + if value: return queryset.filter( recorded=None, ) diff --git a/compensation/forms.py b/compensation/forms.py index c2a225b..8a7737e 100644 --- a/compensation/forms.py +++ b/compensation/forms.py @@ -135,6 +135,10 @@ class NewStateModalForm(BaseModalForm): Wraps the request processing logic, so we don't need the same code everywhere a RemoveModalForm is being used + +++ + The generic method from super class can not be used, since we need to do some request parameter check in here. + +++ + Args: request (HttpRequest): The incoming request msg_success (str): The message in case of successful removing diff --git a/compensation/templates/compensation/detail/compensation/view.html b/compensation/templates/compensation/detail/compensation/view.html index 310e7eb..16084e2 100644 --- a/compensation/templates/compensation/detail/compensation/view.html +++ b/compensation/templates/compensation/detail/compensation/view.html @@ -80,11 +80,7 @@
- {% if geom_form.area == 0 %} -
{% trans 'No geometry added, yet.' %}
- {% endif %} - {{geom_form.media}} - {{geom_form.geom}} + {% include 'map/geom_form.html' %}

diff --git a/compensation/templates/compensation/detail/eco_account/view.html b/compensation/templates/compensation/detail/eco_account/view.html index 098d7a3..51d0645 100644 --- a/compensation/templates/compensation/detail/eco_account/view.html +++ b/compensation/templates/compensation/detail/eco_account/view.html @@ -2,7 +2,13 @@ {% load i18n l10n static fontawesome_5 humanize %} {% block head %} - + {% comment %} + dal documentation (django-autocomplete-light) states using form.media for adding needed scripts. + This does not work properly with modal forms, as the scripts are not loaded properly inside the modal. + Therefore the script linkages from form.media have been extracted and put inside dal/scripts.html to ensure + these scripts are loaded when needed. + {% endcomment %} + {% include 'dal/scripts.html' %} {% endblock %} {% block body %} @@ -66,11 +72,7 @@
- {% if geom_form.area == 0 %} -
{% trans 'No geometry added, yet.' %}
- {% endif %} - {{geom_form.media}} - {{geom_form.geom}} + {% include 'map/geom_form.html' %}

diff --git a/intervention/templates/intervention/detail/view.html b/intervention/templates/intervention/detail/view.html index 57edb2e..57bf6ba 100644 --- a/intervention/templates/intervention/detail/view.html +++ b/intervention/templates/intervention/detail/view.html @@ -2,7 +2,13 @@ {% load i18n l10n static fontawesome_5 humanize %} {% block head %} - + {% comment %} + dal documentation (django-autocomplete-light) states using form.media for adding needed scripts. + This does not work properly with modal forms, as the scripts are not loaded properly inside the modal. + Therefore the script linkages from form.media have been extracted and put inside dal/scripts.html to ensure + these scripts are loaded when needed. + {% endcomment %} + {% include 'dal/scripts.html' %} {% endblock %} {% block body %} @@ -44,7 +50,7 @@ {% trans 'Conservation office' %} {{intervention.responsible.conservation_office|default_if_none:""}} - + {% trans 'Conversation office file number' %} {{intervention.responsible.conservation_file_number|default_if_none:""}} @@ -112,11 +118,7 @@
- {% if geom_form.area == 0 %} -
{% trans 'No geometry added, yet.' %}
- {% endif %} - {{geom_form.media}} - {{geom_form.geom}} + {% include 'map/geom_form.html' %}

diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index 0c0691763d1770b8e72b21b6d6c011864d795d69..cc0dc4d6c9f7c7f6ac0edd03d53e60cb201b6a98 100644 GIT binary patch delta 4689 zcmXZf3s6Gp|MpHwQ8#U{y2Ll>t}b*IlKS; z@1CPMvdQ^olN0*P7ygRj7w#C7j3p7qETsNSta^<(6)?ud)3^y2J!FgzFIjKmAleZL z#tgw29EwRe46|&15ssog)%HJ&@y3MAYATv*tM!){L;E25@hEbm>9W^*Q3KybO*AOc zYx}JaV>JEwsDK{B46MKb*oX>vH4bBbv!03u+J<_t6(jKgYNhQMg&(5sJ7c|o8t4nm z#cTL5jvVeSpbQ7ouEI=w8u`y`9zjjeiCXcex&eD^`wl9=VI#cz zlTp`4+jcRsduEDl&%{*PRjB)xV;pWq1^z0AH1RGfTH$`w1ntOnoA)ss&!RGM&R)NY z+Jbwit&2+XGM0oIFC8^OuI(?d{iUb?r&%kL$iF6Ro`wpn02M$9YWydX$$vSOS+-+4GKSfS8t4!X#CK5- z9z{)b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9R7;(;di-Hx-Rj)Ca>vZxC1&f_iUTP@AIpXyQ zRX7K|+E7K;7Vg$>j*qFuMU?+~AA}-l?bLQtHc|FdzM!1;&W5s_GhSSHg!7m8K)BlZ zpSK|#iEHJWegUs3Tvl+I+6Kxa6qiy(IZio1nN9hPa^5RR8{#y3v(h4o*Jk&>;&Y_ diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index 5c3ad1c..f61eefb 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -3,12 +3,12 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -#: compensation/forms.py:42 compensation/forms.py:47 compensation/forms.py:60 -#: compensation/forms.py:203 compensation/forms.py:271 +#: compensation/filters.py:71 compensation/forms.py:42 compensation/forms.py:47 +#: compensation/forms.py:60 compensation/forms.py:203 compensation/forms.py:271 #: intervention/filters.py:26 intervention/filters.py:40 #: intervention/filters.py:47 intervention/filters.py:48 -#: intervention/forms.py:321 intervention/forms.py:333 -#: intervention/forms.py:345 konova/forms.py:91 konova/forms.py:227 +#: intervention/forms.py:319 intervention/forms.py:331 +#: intervention/forms.py:343 konova/forms.py:91 konova/forms.py:227 #: konova/forms.py:260 konova/forms.py:265 konova/forms.py:277 #: konova/forms.py:289 konova/forms.py:302 user/forms.py:38 #, fuzzy @@ -16,7 +16,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-08-10 10:30+0200\n" +"POT-Creation-Date: 2021-08-10 12:35+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -26,6 +26,10 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: compensation/filters.py:70 +msgid "Show only unrecorded" +msgstr "Nur unverzeichnete anzeigen" + #: compensation/forms.py:41 compensation/forms.py:260 #: compensation/templates/compensation/detail/eco_account/includes/withdraws.html:31 #: intervention/templates/intervention/detail/includes/withdraws.html:31 @@ -78,11 +82,11 @@ msgstr "Biotoptyp wählen" #: compensation/templates/compensation/detail/compensation/includes/states-before.html:36 #: compensation/templates/compensation/detail/eco_account/includes/states-after.html:36 #: compensation/templates/compensation/detail/eco_account/includes/states-before.html:36 -#: intervention/forms.py:449 +#: intervention/forms.py:455 msgid "Surface" msgstr "Fläche" -#: compensation/forms.py:106 intervention/forms.py:451 +#: compensation/forms.py:106 intervention/forms.py:457 msgid "in m²" msgstr "" @@ -113,7 +117,7 @@ msgstr "Fristart wählen" #: compensation/forms.py:187 #: compensation/templates/compensation/detail/compensation/includes/deadlines.html:31 #: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:31 -#: intervention/forms.py:320 +#: intervention/forms.py:318 msgid "Date" msgstr "Datum" @@ -128,7 +132,7 @@ msgstr "Datum wählen" #: compensation/templates/compensation/detail/eco_account/includes/actions.html:34 #: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:34 #: compensation/templates/compensation/detail/eco_account/includes/documents.html:31 -#: intervention/forms.py:344 +#: intervention/forms.py:342 #: intervention/templates/intervention/detail/includes/documents.html:31 #: intervention/templates/intervention/detail/includes/revocation.html:35 #: konova/forms.py:288 @@ -136,7 +140,7 @@ msgid "Comment" msgstr "Kommentar" #: compensation/forms.py:204 compensation/forms.py:272 -#: intervention/forms.py:346 konova/forms.py:290 +#: intervention/forms.py:344 konova/forms.py:290 msgid "Additional comment, maximum {} letters" msgstr "Zusätzlicher Kommentar, maximal {} Zeichen" @@ -184,32 +188,32 @@ msgstr "Geben Sie die Daten der neuen Maßnahme ein" msgid "Added action" msgstr "Maßnahme hinzugefügt" -#: compensation/models.py:60 +#: compensation/models.py:58 msgid "cm" msgstr "" -#: compensation/models.py:61 +#: compensation/models.py:59 msgid "m" msgstr "" -#: compensation/models.py:62 +#: compensation/models.py:60 msgid "km" msgstr "" -#: compensation/models.py:63 +#: compensation/models.py:61 msgid "m²" msgstr "" -#: compensation/models.py:64 +#: compensation/models.py:62 msgid "ha" msgstr "" -#: compensation/models.py:65 +#: compensation/models.py:63 msgid "Pieces" msgstr "Stück" #: compensation/tables.py:26 compensation/tables.py:166 -#: intervention/forms.py:31 intervention/tables.py:23 +#: intervention/forms.py:29 intervention/tables.py:23 #: intervention/templates/intervention/detail/includes/compensations.html:30 msgid "Identifier" msgstr "Kennung" @@ -219,7 +223,7 @@ msgstr "Kennung" #: compensation/templates/compensation/detail/compensation/view.html:24 #: compensation/templates/compensation/detail/eco_account/includes/documents.html:28 #: compensation/templates/compensation/detail/eco_account/view.html:24 -#: intervention/forms.py:38 intervention/tables.py:28 +#: intervention/forms.py:36 intervention/tables.py:28 #: intervention/templates/intervention/detail/includes/compensations.html:33 #: intervention/templates/intervention/detail/includes/documents.html:28 #: intervention/templates/intervention/detail/view.html:24 konova/forms.py:259 @@ -310,7 +314,7 @@ msgstr "Ökokonten" #: compensation/tables.py:224 #: compensation/templates/compensation/detail/eco_account/view.html:12 -#: intervention/forms.py:433 intervention/forms.py:440 +#: intervention/forms.py:439 intervention/forms.py:446 #: konova/templates/konova/home.html:88 templates/navbar.html:34 msgid "Eco-account" msgstr "Ökokonto" @@ -410,7 +414,7 @@ msgstr "Neue Frist hinzufügen" #: compensation/templates/compensation/detail/compensation/includes/deadlines.html:28 #: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:28 -#: intervention/forms.py:43 +#: intervention/forms.py:41 msgid "Type" msgstr "Typ" @@ -513,7 +517,7 @@ msgstr "Zuletzt bearbeitet" #: compensation/templates/compensation/detail/compensation/view.html:72 #: compensation/templates/compensation/detail/eco_account/view.html:58 -#: intervention/forms.py:254 +#: intervention/forms.py:252 #: intervention/templates/intervention/detail/view.html:104 msgid "Shared with" msgstr "Freigegeben für" @@ -550,7 +554,7 @@ msgid "Remove Withdraw" msgstr "Abbuchung entfernen" #: compensation/views/compensation_views.py:121 -#: compensation/views/eco_account_views.py:185 intervention/views.py:391 +#: compensation/views/eco_account_views.py:184 intervention/views.py:391 msgid "Log" msgstr "Log" @@ -559,22 +563,22 @@ msgid "Compensation removed" msgstr "Kompensation entfernt" #: compensation/views/compensation_views.py:161 -#: compensation/views/eco_account_views.py:262 intervention/views.py:96 +#: compensation/views/eco_account_views.py:261 intervention/views.py:96 msgid "Document added" msgstr "Dokument hinzugefügt" #: compensation/views/compensation_views.py:180 -#: compensation/views/eco_account_views.py:206 +#: compensation/views/eco_account_views.py:205 msgid "State added" msgstr "Zustand hinzugefügt" #: compensation/views/compensation_views.py:199 -#: compensation/views/eco_account_views.py:225 +#: compensation/views/eco_account_views.py:224 msgid "Action added" msgstr "Maßnahme hinzugefügt" #: compensation/views/compensation_views.py:218 -#: compensation/views/eco_account_views.py:244 +#: compensation/views/eco_account_views.py:243 msgid "Deadline added" msgstr "Frist hinzugefügt" @@ -586,15 +590,15 @@ msgstr "Zustand gelöscht" msgid "Action removed" msgstr "Maßnahme entfernt" -#: compensation/views/eco_account_views.py:135 +#: compensation/views/eco_account_views.py:134 msgid "Eco-account removed" msgstr "Ökokonto entfernt" -#: compensation/views/eco_account_views.py:162 +#: compensation/views/eco_account_views.py:161 msgid "Withdraw removed" msgstr "Abbuchung entfernt" -#: compensation/views/eco_account_views.py:282 intervention/views.py:413 +#: compensation/views/eco_account_views.py:281 intervention/views.py:413 msgid "Withdraw added" msgstr "Abbuchung hinzugefügt" @@ -622,125 +626,125 @@ msgstr "Gemarkung" msgid "Search for district" msgstr "Nach Gemarkung suchen" -#: intervention/forms.py:34 +#: intervention/forms.py:32 msgid "Generated automatically if none was given" msgstr "Wird automatisch erzeugt, falls nicht angegeben" -#: intervention/forms.py:46 +#: intervention/forms.py:44 msgid "Which intervention type is this" msgstr "Welcher Eingriffstyp" -#: intervention/forms.py:49 +#: intervention/forms.py:47 #: intervention/templates/intervention/detail/view.html:32 msgid "Law" msgstr "Gesetz" -#: intervention/forms.py:52 +#: intervention/forms.py:50 msgid "Based on which law" msgstr "Basiert auf welchem Recht" -#: intervention/forms.py:55 +#: intervention/forms.py:53 #: intervention/templates/intervention/detail/view.html:52 msgid "Intervention handler" msgstr "Eingriffsverursacher" -#: intervention/forms.py:58 +#: intervention/forms.py:56 msgid "Who performs the intervention" msgstr "Wer führt den Eingriff durch" -#: intervention/forms.py:61 +#: intervention/forms.py:59 msgid "Data provider" msgstr "Datenbereitsteller" -#: intervention/forms.py:63 +#: intervention/forms.py:61 msgid "Who provides the data for the intervention" msgstr "Wer stellt die Daten für den Eingriff zur Verfügung" -#: intervention/forms.py:68 +#: intervention/forms.py:66 msgid "Organization" msgstr "Organisation" -#: intervention/forms.py:74 +#: intervention/forms.py:72 msgid "Data provider details" msgstr "Datenbereitsteller Details" -#: intervention/forms.py:77 +#: intervention/forms.py:75 msgid "Further details" msgstr "Weitere Details" -#: intervention/forms.py:90 +#: intervention/forms.py:88 msgid "Map" msgstr "Karte" -#: intervention/forms.py:92 +#: intervention/forms.py:90 msgid "Where does the intervention take place" msgstr "Wo findet der Eingriff statt" -#: intervention/forms.py:100 +#: intervention/forms.py:98 msgid "Files" msgstr "Dateien" -#: intervention/forms.py:107 +#: intervention/forms.py:105 msgid "New intervention" msgstr "Neuer Eingriff" -#: intervention/forms.py:149 +#: intervention/forms.py:147 msgid "Edit intervention" msgstr "Eingriff bearbeiten" -#: intervention/forms.py:243 +#: intervention/forms.py:241 msgid "Share link" msgstr "Freigabelink" -#: intervention/forms.py:245 +#: intervention/forms.py:243 msgid "Send this link to users who you want to have writing access on the data" msgstr "Andere Nutzer erhalten über diesen Link Zugriff auf die Daten" -#: intervention/forms.py:257 +#: intervention/forms.py:255 msgid "Remove check to remove access for this user" msgstr "Wählen Sie die Nutzer ab, die keinen Zugriff mehr haben sollen" -#: intervention/forms.py:268 +#: intervention/forms.py:266 #: intervention/templates/intervention/detail/includes/controls.html:15 msgid "Share" msgstr "Freigabe" -#: intervention/forms.py:269 +#: intervention/forms.py:267 msgid "Share settings for {}" msgstr "Freigabe Einstellungen für {}" -#: intervention/forms.py:322 +#: intervention/forms.py:320 msgid "Date of revocation" msgstr "Datum des Widerspruchs" -#: intervention/forms.py:332 +#: intervention/forms.py:330 #: intervention/templates/intervention/detail/includes/revocation.html:38 msgid "Document" msgstr "Dokument" -#: intervention/forms.py:334 konova/forms.py:278 +#: intervention/forms.py:332 konova/forms.py:278 msgid "Must be smaller than 15 Mb" msgstr "Muss kleiner als 15 Mb sein" -#: intervention/forms.py:357 +#: intervention/forms.py:355 #: intervention/templates/intervention/detail/includes/revocation.html:18 msgid "Add revocation" msgstr "Widerspruch hinzufügen" -#: intervention/forms.py:393 +#: intervention/forms.py:391 msgid "Checked intervention data" msgstr "Eingriffsdaten geprüft" -#: intervention/forms.py:399 +#: intervention/forms.py:397 msgid "Checked compensations data and payments" msgstr "Kompensationen und Zahlungen geprüft" -#: intervention/forms.py:407 +#: intervention/forms.py:405 #: intervention/templates/intervention/detail/includes/controls.html:19 msgid "Run check" msgstr "Prüfung vornehmen" -#: intervention/forms.py:408 +#: intervention/forms.py:406 msgid "" "I, {} {}, confirm that all necessary control steps have been performed by " "myself." @@ -748,36 +752,36 @@ msgstr "" "Ich, {} {}, bestätige, dass die notwendigen Kontrollschritte durchgeführt " "wurden:" -#: intervention/forms.py:435 +#: intervention/forms.py:441 msgid "Only recorded accounts can be selected for withdraws" -msgstr "" -"Nur verzeichnete Ökokonten können für Abbuchungen verwendet werden." +msgstr "Nur verzeichnete Ökokonten können für Abbuchungen verwendet werden." -#: intervention/forms.py:454 intervention/forms.py:461 +#: intervention/forms.py:460 intervention/forms.py:467 #: intervention/tables.py:92 intervention/tables.py:172 #: intervention/templates/intervention/detail/view.html:12 #: konova/templates/konova/home.html:11 templates/navbar.html:22 msgid "Intervention" msgstr "Eingriff" -#: intervention/forms.py:456 +#: intervention/forms.py:462 msgid "Only shared interventions can be selected" msgstr "Nur freigegebene Eingriffe können gewählt werden" -#: intervention/forms.py:469 +#: intervention/forms.py:475 msgid "New Withdraw" msgstr "Neue Abbuchung" -#: intervention/forms.py:470 +#: intervention/forms.py:476 msgid "Enter the information for a new withdraw from a chosen eco-account" msgstr "Geben Sie die Informationen für eine neue Abbuchung ein." -#: intervention/forms.py:511 +#: intervention/forms.py:517 msgid "" "The account {} has not enough surface for a withdraw of {} m². There are " "only {} m² left" msgstr "" -"Das Ökokonto {} hat für eine Abbuchung von {} m² nicht ausreichend Restfläche. Es stehen noch {} m² zur Verfügung." +"Das Ökokonto {} hat für eine Abbuchung von {} m² nicht ausreichend " +"Restfläche. Es stehen noch {} m² zur Verfügung." #: intervention/models.py:203 #: intervention/templates/intervention/detail/view.html:23 diff --git a/templates/dal/scripts.html b/templates/dal/scripts.html new file mode 100644 index 0000000..484820d --- /dev/null +++ b/templates/dal/scripts.html @@ -0,0 +1,15 @@ + +{% comment %} + These are the scripts, which are generally loaded by using form.meda, as stated in the + dal documentation (django-autocomplete-light). By including these scripts independent from any script + we can easily use dal in modal forms. + + https://django-autocomplete-light.readthedocs.io/en/master/tutorial.html#using-autocompletes-outside-the-admin +{% endcomment %} + + + + + + + \ No newline at end of file diff --git a/templates/map/geom_form.html b/templates/map/geom_form.html new file mode 100644 index 0000000..6d07903 --- /dev/null +++ b/templates/map/geom_form.html @@ -0,0 +1,12 @@ +{% load i18n %} + +{% comment %} + Encapsules the rendering and initializing of a geometry view component, e.g. used in the detail views. +{% endcomment %} + + +{% if geom_form.area == 0 %} +
{% trans 'No geometry added, yet.' %}
+{% endif %} +{{geom_form.media}} +{{geom_form.geom}} \ No newline at end of file