From 6e3a6d53d11fc530e4a4474b02e833271f052e32 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Mon, 21 Feb 2022 15:18:15 +0100 Subject: [PATCH 1/3] #121 Deferred parcels * improves filtering by gmrkng and krs * implements deferred loading of parcels on spatial referenced data objects * adds HTMX to project * improves detail view layout (mainly interesting for smaller displays/mobile) --- konova/filters/mixins.py | 4 +- .../konova/includes/parcel_table.html | 32 +++ konova/templates/konova/includes/parcels.html | 39 +-- konova/urls.py | 3 +- konova/views.py | 47 +++- locale/de/LC_MESSAGES/django.mo | Bin 40282 -> 40170 bytes locale/de/LC_MESSAGES/django.po | 229 +++++++----------- templates/base.html | 1 + templates/map/geom_form.html | 4 +- templates/public_base.html | 1 + 10 files changed, 176 insertions(+), 184 deletions(-) create mode 100644 konova/templates/konova/includes/parcel_table.html diff --git a/konova/filters/mixins.py b/konova/filters/mixins.py index 5a07e3c..e6a841e 100644 --- a/konova/filters/mixins.py +++ b/konova/filters/mixins.py @@ -185,7 +185,7 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet): """ matching_districts = District.objects.filter( - krs=value + krs__icontains=value ) matching_parcels = Parcel.objects.filter( district__in=matching_districts @@ -209,7 +209,7 @@ class GeoReferencedTableFilterMixin(django_filters.FilterSet): Returns: """ - queryset = self._filter_parcel_reference(queryset, name, value, "gmrkng__istartswith") + queryset = self._filter_parcel_reference(queryset, name, value, "gmrkng__icontains") return queryset def filter_parcel(self, queryset, name, value) -> QuerySet: diff --git a/konova/templates/konova/includes/parcel_table.html b/konova/templates/konova/includes/parcel_table.html new file mode 100644 index 0000000..6890489 --- /dev/null +++ b/konova/templates/konova/includes/parcel_table.html @@ -0,0 +1,32 @@ +{% load i18n %} +
+ {% if parcels|length == 0 %} +
+ {% trans 'Parcels can not be calculated, since no geometry is given.' %} +
+ {% else %} + + + + + + + + + + + + {% for parcel in parcels %} + + + + + + + + {% endfor %} + + +
{% trans 'Kreis' %}{% trans 'Gemarkung' %}{% trans 'Parcel' %}{% trans 'Parcel counter' %}{% trans 'Parcel number' %}
{{parcel.district.krs|default_if_none:"-"}}{{parcel.gmrkng|default_if_none:"-"}}{{parcel.flr|default_if_none:"-"}}{{parcel.flrstck_zhlr|default_if_none:"-"}}{{parcel.flrstck_nnr|default_if_none:"-"}}
+ {% endif %} +
\ No newline at end of file diff --git a/konova/templates/konova/includes/parcels.html b/konova/templates/konova/includes/parcels.html index d73d461..9ccd9d5 100644 --- a/konova/templates/konova/includes/parcels.html +++ b/konova/templates/konova/includes/parcels.html @@ -1,37 +1,8 @@ {% load i18n %} -
+

{% trans 'Spatial reference' %}

-
-
- {% if parcels|length == 0 %} -
- {% blocktrans %} - If the geometry is not empty, the parcels are currently recalculated. Please refresh this page in a few moments. - {% endblocktrans %} -
- {% else %} - - - - - - - - - - - - {% for parcel in parcels %} - - - - - - - - {% endfor %} - - -
{% trans 'Kreis' %}{% trans 'Gemarkung' %}{% trans 'Parcel' %}{% trans 'Parcel counter' %}{% trans 'Parcel number' %}
{{parcel.district.krs|default_if_none:"-"}}{{parcel.gmrkng|default_if_none:"-"}}{{parcel.flr|default_if_none:"-"}}{{parcel.flrstck_zhlr|default_if_none:"-"}}{{parcel.flrstck_nnr|default_if_none:"-"}}
- {% endif %} +
+ + {% trans 'Loading...' %} +
\ No newline at end of file diff --git a/konova/urls.py b/konova/urls.py index 1cd8851..7f3b897 100644 --- a/konova/urls.py +++ b/konova/urls.py @@ -23,7 +23,7 @@ from konova.autocompletes import EcoAccountAutocomplete, \ ShareUserAutocomplete, BiotopeExtraCodeAutocomplete, CompensationActionDetailCodeAutocomplete, ShareTeamAutocomplete from konova.settings import SSO_SERVER, SSO_PUBLIC_KEY, SSO_PRIVATE_KEY, DEBUG from konova.sso.sso import KonovaSSOClient -from konova.views import logout_view, home_view +from konova.views import logout_view, home_view, get_geom_parcels sso_client = KonovaSSOClient(SSO_SERVER, SSO_PUBLIC_KEY, SSO_PRIVATE_KEY) urlpatterns = [ @@ -39,6 +39,7 @@ urlpatterns = [ path('cl/', include("codelist.urls")), path('analysis/', include("analysis.urls")), path('api/', include("api.urls")), + path('geom//parcels', get_geom_parcels, name="geometry-parcels"), # Autocomplete paths for all apps path("atcmplt/eco-accounts", EcoAccountAutocomplete.as_view(), name="accounts-autocomplete"), diff --git a/konova/views.py b/konova/views.py index f3c53f0..db967e8 100644 --- a/konova/views.py +++ b/konova/views.py @@ -7,20 +7,17 @@ Created on: 16.11.20 """ from django.contrib.auth import logout from django.contrib.auth.decorators import login_required -from django.http import HttpRequest, FileResponse +from django.http import HttpRequest, HttpResponse from django.shortcuts import redirect, render, get_object_or_404 from django.template.loader import render_to_string from django.utils import timezone from django.utils.translation import gettext_lazy as _ -from codelist.models import KonovaCode -from codelist.settings import CODELIST_COMPENSATION_ACTION_ID from compensation.models import Compensation, EcoAccount from intervention.models import Intervention from konova.contexts import BaseContext from konova.decorators import any_group_check -from konova.forms import RemoveModalForm -from konova.models import Deadline +from konova.models import Deadline, Geometry from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER from news.models import ServerMessage from konova.settings import SSO_SERVER_BASE @@ -102,6 +99,46 @@ def home_view(request: HttpRequest): return render(request, template, context) +@login_required +def get_geom_parcels(request: HttpRequest, id: str): + """ Getter for HTMX + + Returns all parcels of the requested geometry rendered into a simple HTML table + + Args: + request (HttpRequest): The incoming request + id (str): The geometry's id + + Returns: + + """ + # HTTP code 286 states that the HTMX should stop polling for updates + # https://htmx.org/docs/#polling + status_code = 286 + template = "konova/includes/parcel_table.html" + geom = get_object_or_404(Geometry, id=id) + parcels = geom.get_underlying_parcels() + geos_geom = geom.geom + + parcels_are_currently_calculated = geos_geom is not None and geos_geom.area > 0 and len(parcels) == 0 + parcels_available = len(parcels) > 0 + no_geometry_given = geos_geom is None + + if parcels_are_currently_calculated: + # Parcels are being calculated right now. Change the status code, so polling stays active for fetching + # resutls after the calculation + status_code = 200 + + if parcels_available or no_geometry_given: + context = { + "parcels": parcels, + } + html = render_to_string(template, context, request) + return HttpResponse(html, status=status_code) + else: + return HttpResponse(None, status=404) + + def get_404_view(request: HttpRequest, exception=None): """ Returns a 404 handling view diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index d7b26eb6b287a1ada0ae2a4c0daf9632f2d24485..768357b402490838a801e80d698fa5cd550cc682 100644 GIT binary patch delta 11593 zcmYk?2YgP~AII@45s5^Wk%92or4b{peWYGl{S4l6+ zDvzIqSk?j3%`2(YvbscDR&Wu^>WcHpr_{ErsrWng#Bni}<-+eV5nI)AQ#^I>l+V+9PNeXBDGZ|sB2n$;gQ6LWA4F2YjSvVq;99;g`@fa*{d zhT}9Wjw?_jT!X4-2WlYuj3?2b{6%!@#!V8c;Gub-L__<I4bC=E5DsaOUV zV;HVSb^HKoMlPY2;x?+GqK)h&DS=x1a;SQvu`DJuV*V?V=uLqd8jE^y3982*nEa=x z7dN9iau7AO=TI|p8P&i&)caOrdy4%~9V>-Ju@Y+J)lGR5Hwn!^J5)tIQ56kBt>s8m zMd)QI)ix_)Wm*oDeApXQ61cYTI1uW`p=<8d=u3{ucr0@-2Nm~5Q zj4`MwZ-lC-GpeI~P#w%f%|tG$;qm7FY*c+KP)oZOH4|T&`v);h=l_g(;4bO|^cb}V z!kgI*N24leg{tsnt=%?MhmN6U;yh}qe?iU2L)45uMKx6H1$%~qQ5_A#7qJ$G>ioM% z=)*7(HI-9QFV4hrxDYjh&8UuUMJ>gC)N=)>@5cqy`y5nzO+_jSGuS^<*@f!x zX^g;Ys3rUdHL&1TZnGw>IGYsILRHiWwT3CE5vChmsHGZ?p1p#a+B{T43s6h(kttt= zdVdpY#jQbrA)p&>ikzVHbm`_ zwy2Kwz-SzdwecPFM)y7v>cBx%PmiNET>-v=zao=lwQtQ)!^5aGY}UqJnx5!Qek5uJ z#-chn9ksXSqDKA!s)L`Q2DTHKIk$Dx+&EYHi)nlKR?D8_`OFka? zrdaK;15PpJC((!eS&YO>SPUPbI{Xw>Zy+zpa>z&4s)=q@JkZ?8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i9d;l zk4oIMhl-In71v<#af)&S;w6GFs^?ho(D_fOsZIVf?lPyH?GK%QjylF~j;oybf}%dV zpHm)%@8B5XWy-BkM=DW3c`{Lvvc7gYV(odACsO{}=DdAQb;?(W_X)kiI(D1$gPeIJ zy-D=W4#e5STyxU7Y329C@v`Nkls)f}3WjpU&GBUEbYB zsWMTKn8BF^#h2n(qKJAQ;#opRDMCMi$A}Sxjt!jC|Kixtq@KUa`5QuAPvU~D|C{oY zgpLg2BLA)6^rE6Aai5s$Ic5IbgQ~VLEKKVTPfeFk-WM)?Z%!CXSe1?-HA^73OU zy1$a~8S@;y`8$^UIBvFAm%(x5+dWtC;*jfOs-r#eB(ayeu0%TJ`a~?zgS-RkxI@$+ zKS9(dRuT(|5A`Ssq9qWk2#7o3PBE{B!gEz?gX*cJPJWkS|=t}G$no$>qI!+jzEb3Mh9~1GmPMjrw zjA%eP*w(ir??QPu@eE}h`S`Of-@}&Fwbt8wnaJ{7!fwL0wwy%023QAm)I)#VXY=8n zTK-vK^S8+x6M@{szZ#rEBAHla&mY1~n zc!v0vC`TOQTp6zY6aOIBaf`?#qKM*SG3Ry6!L>vi$`gp$L=~<7RthbMT%!1>Lg7>5 zS6gw=HgW_Xq3&5*{|EWMltYPG_L>691BuDRAfou#Mxmpw`v|M&Mcb#ed8_;!-_viVBu1L|fH#m6Ww z*598V^`-I!TiX$TB&HBUsozid*_+Bxr{g{H(%d(n@)=JJJKtWTv>7py@Ka)sB-C~r zK)grPCd~VX=ZQSqz}vWmya%CUCUL-1GJn?FayhQ+{?J3er#y`Kj(C}f;kq`c<68_S zx>LSH1QMgk-Hj9~5mW7jhcVoihftqSY$bmY6Y(|TZ^~P+HD(iIhy\n" "Language-Team: LANGUAGE \n" @@ -96,7 +96,7 @@ msgstr "" #: analysis/templates/analysis/reports/includes/eco_account/amount.html:3 #: analysis/templates/analysis/reports/includes/intervention/amount.html:3 #: analysis/templates/analysis/reports/includes/old_data/amount.html:3 -#: compensation/forms/modalForms.py:448 +#: compensation/forms/modalForms.py:450 #: compensation/templates/compensation/detail/eco_account/includes/deductions.html:34 #: intervention/templates/intervention/detail/includes/deductions.html:31 msgid "Amount" @@ -199,7 +199,7 @@ msgstr "Andere Zulassungsbehörden" #: analysis/templates/analysis/reports/includes/compensation/card_compensation.html:11 #: compensation/tables.py:67 #: intervention/templates/intervention/detail/includes/compensations.html:8 -#: intervention/templates/intervention/report/report.html:49 +#: intervention/templates/intervention/report/report.html:45 msgid "Compensations" msgstr "Kompensationen" @@ -354,7 +354,7 @@ msgid "Compensation XY; Location ABC" msgstr "Kompensation XY; Flur ABC" #: compensation/forms/forms.py:57 compensation/forms/modalForms.py:62 -#: compensation/forms/modalForms.py:356 compensation/forms/modalForms.py:463 +#: compensation/forms/modalForms.py:357 compensation/forms/modalForms.py:465 #: compensation/templates/compensation/detail/compensation/includes/actions.html:35 #: compensation/templates/compensation/detail/compensation/includes/deadlines.html:34 #: compensation/templates/compensation/detail/compensation/includes/documents.html:34 @@ -372,7 +372,7 @@ msgstr "Kompensation XY; Flur ABC" msgid "Comment" msgstr "Kommentar" -#: compensation/forms/forms.py:59 compensation/forms/modalForms.py:465 +#: compensation/forms/forms.py:59 compensation/forms/modalForms.py:467 #: intervention/forms/forms.py:182 msgid "Additional comment" msgstr "Zusätzlicher Kommentar" @@ -483,7 +483,7 @@ msgstr "Fällig am" msgid "Due on which date" msgstr "Zahlung wird an diesem Datum erwartet" -#: compensation/forms/modalForms.py:64 compensation/forms/modalForms.py:358 +#: compensation/forms/modalForms.py:64 compensation/forms/modalForms.py:359 #: intervention/forms/modalForms.py:177 konova/forms.py:395 msgid "Additional comment, maximum {} letters" msgstr "Zusätzlicher Kommentar, maximal {} Zeichen" @@ -533,15 +533,25 @@ msgstr "Geben Sie die Daten des neuen Zustandes ein" msgid "Object removed" msgstr "Objekt entfernt" -#: compensation/forms/modalForms.py:328 +#: compensation/forms/modalForms.py:272 +#: compensation/templates/compensation/detail/compensation/includes/states-after.html:62 +#: compensation/templates/compensation/detail/compensation/includes/states-before.html:62 +#: compensation/templates/compensation/detail/eco_account/includes/states-after.html:62 +#: compensation/templates/compensation/detail/eco_account/includes/states-before.html:62 +#: ema/templates/ema/detail/includes/states-after.html:60 +#: ema/templates/ema/detail/includes/states-before.html:60 +msgid "Edit state" +msgstr "Zustand bearbeiten" + +#: compensation/forms/modalForms.py:329 msgid "Deadline Type" msgstr "Fristart" -#: compensation/forms/modalForms.py:331 +#: compensation/forms/modalForms.py:332 msgid "Select the deadline type" msgstr "Fristart wählen" -#: compensation/forms/modalForms.py:340 +#: compensation/forms/modalForms.py:341 #: compensation/templates/compensation/detail/compensation/includes/deadlines.html:31 #: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:31 #: ema/templates/ema/detail/includes/deadlines.html:31 @@ -549,23 +559,30 @@ msgstr "Fristart wählen" msgid "Date" msgstr "Datum" -#: compensation/forms/modalForms.py:343 +#: compensation/forms/modalForms.py:344 msgid "Select date" msgstr "Datum wählen" -#: compensation/forms/modalForms.py:370 +#: compensation/forms/modalForms.py:371 msgid "New deadline" msgstr "Neue Frist" -#: compensation/forms/modalForms.py:371 +#: compensation/forms/modalForms.py:372 msgid "Insert data for the new deadline" msgstr "Geben Sie die Daten der neuen Frist ein" -#: compensation/forms/modalForms.py:411 +#: compensation/forms/modalForms.py:385 +#: compensation/templates/compensation/detail/compensation/includes/deadlines.html:59 +#: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:57 +#: ema/templates/ema/detail/includes/deadlines.html:57 +msgid "Edit deadline" +msgstr "Frist/Termin bearbeiten" + +#: compensation/forms/modalForms.py:413 msgid "Action Type" msgstr "Maßnahmentyp" -#: compensation/forms/modalForms.py:414 +#: compensation/forms/modalForms.py:416 msgid "" "An action can consist of multiple different action types. All the selected " "action types are expected to be performed according to the amount and unit " @@ -575,34 +592,41 @@ msgstr "" "hier gewählten Einträge sollen mit der weiter unten angegebenen Einheit und " "Menge umgesetzt werden. " -#: compensation/forms/modalForms.py:419 compensation/forms/modalForms.py:431 +#: compensation/forms/modalForms.py:421 compensation/forms/modalForms.py:433 msgid "Action Type detail" msgstr "Zusatzmerkmal" -#: compensation/forms/modalForms.py:422 +#: compensation/forms/modalForms.py:424 msgid "Select the action type detail" msgstr "Zusatzmerkmal wählen" -#: compensation/forms/modalForms.py:436 +#: compensation/forms/modalForms.py:438 msgid "Unit" msgstr "Einheit" -#: compensation/forms/modalForms.py:439 +#: compensation/forms/modalForms.py:441 msgid "Select the unit" msgstr "Einheit wählen" -#: compensation/forms/modalForms.py:451 +#: compensation/forms/modalForms.py:453 msgid "Insert the amount" msgstr "Menge eingeben" -#: compensation/forms/modalForms.py:476 +#: compensation/forms/modalForms.py:478 msgid "New action" msgstr "Neue Maßnahme" -#: compensation/forms/modalForms.py:477 +#: compensation/forms/modalForms.py:479 msgid "Insert data for the new action" msgstr "Geben Sie die Daten der neuen Maßnahme ein" +#: compensation/forms/modalForms.py:503 +#: compensation/templates/compensation/detail/compensation/includes/actions.html:68 +#: compensation/templates/compensation/detail/eco_account/includes/actions.html:67 +#: ema/templates/ema/detail/includes/actions.html:65 +msgid "Edit action" +msgstr "Maßnahme bearbeiten" + #: compensation/models/action.py:20 msgid "cm" msgstr "" @@ -767,12 +791,6 @@ msgstr "Aktionen" msgid "No action type details" msgstr "Keine Zusatzmerkmale" -#: compensation/templates/compensation/detail/compensation/includes/actions.html:68 -#: compensation/templates/compensation/detail/eco_account/includes/actions.html:67 -#: ema/templates/ema/detail/includes/actions.html:65 -msgid "Edit action" -msgstr "Maßnahme bearbeiten" - #: compensation/templates/compensation/detail/compensation/includes/actions.html:71 #: compensation/templates/compensation/detail/eco_account/includes/actions.html:70 #: ema/templates/ema/detail/includes/actions.html:68 @@ -827,12 +845,6 @@ msgstr "Termine und Fristen" msgid "Add new deadline" msgstr "Frist/Termin hinzufügen" -#: compensation/templates/compensation/detail/compensation/includes/deadlines.html:59 -#: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:57 -#: ema/templates/ema/detail/includes/deadlines.html:57 -msgid "Edit deadline" -msgstr "Frist/Termin bearbeiten" - #: compensation/templates/compensation/detail/compensation/includes/deadlines.html:62 #: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:60 #: ema/templates/ema/detail/includes/deadlines.html:60 @@ -866,6 +878,7 @@ msgstr "Erstellt" #: compensation/templates/compensation/detail/eco_account/includes/documents.html:61 #: ema/templates/ema/detail/includes/documents.html:61 #: intervention/templates/intervention/detail/includes/documents.html:65 +#: konova/forms.py:474 msgid "Edit document" msgstr "Dokument bearbeiten" @@ -913,15 +926,6 @@ msgstr "Biotoptyp" msgid "No biotope type details" msgstr "Keine Zusatzbezeichnungen" -#: compensation/templates/compensation/detail/compensation/includes/states-after.html:62 -#: compensation/templates/compensation/detail/compensation/includes/states-before.html:62 -#: compensation/templates/compensation/detail/eco_account/includes/states-after.html:62 -#: compensation/templates/compensation/detail/eco_account/includes/states-before.html:62 -#: ema/templates/ema/detail/includes/states-after.html:60 -#: ema/templates/ema/detail/includes/states-before.html:60 -msgid "Edit state" -msgstr "Zustand bearbeiten" - #: compensation/templates/compensation/detail/compensation/includes/states-after.html:65 #: compensation/templates/compensation/detail/compensation/includes/states-before.html:65 #: compensation/templates/compensation/detail/eco_account/includes/states-after.html:65 @@ -995,11 +999,11 @@ msgstr "Verzeichnet am" #: compensation/templates/compensation/detail/compensation/view.html:92 #: compensation/templates/compensation/detail/eco_account/view.html:75 #: compensation/templates/compensation/report/compensation/report.html:24 -#: compensation/templates/compensation/report/eco_account/report.html:41 +#: compensation/templates/compensation/report/eco_account/report.html:37 #: ema/templates/ema/detail/view.html:61 -#: ema/templates/ema/report/report.html:28 +#: ema/templates/ema/report/report.html:24 #: intervention/templates/intervention/detail/view.html:108 -#: intervention/templates/intervention/report/report.html:91 +#: intervention/templates/intervention/report/report.html:87 msgid "Last modified" msgstr "Zuletzt bearbeitet" @@ -1054,6 +1058,7 @@ msgid "Recorded on" msgstr "Verzeichnet am" #: compensation/templates/compensation/detail/eco_account/includes/deductions.html:65 +#: intervention/forms/modalForms.py:481 #: intervention/templates/intervention/detail/includes/deductions.html:60 msgid "Edit Deduction" msgstr "Abbuchung bearbeiten" @@ -1087,9 +1092,7 @@ msgid "Missing" msgstr "fehlt" #: compensation/templates/compensation/detail/eco_account/view.html:71 -#: compensation/templates/compensation/report/eco_account/report.html:24 #: ema/templates/ema/detail/view.html:57 -#: ema/templates/ema/report/report.html:24 msgid "Action handler" msgstr "Maßnahmenträger" @@ -1101,26 +1104,26 @@ msgid "Report" msgstr "Bericht" #: compensation/templates/compensation/report/compensation/report.html:45 -#: compensation/templates/compensation/report/eco_account/report.html:62 -#: ema/templates/ema/report/report.html:49 -#: intervention/templates/intervention/report/report.html:108 +#: compensation/templates/compensation/report/eco_account/report.html:58 +#: ema/templates/ema/report/report.html:45 +#: intervention/templates/intervention/report/report.html:104 msgid "Open in browser" msgstr "Im Browser öffnen" #: compensation/templates/compensation/report/compensation/report.html:49 -#: compensation/templates/compensation/report/eco_account/report.html:66 -#: ema/templates/ema/report/report.html:53 -#: intervention/templates/intervention/report/report.html:112 +#: compensation/templates/compensation/report/eco_account/report.html:62 +#: ema/templates/ema/report/report.html:49 +#: intervention/templates/intervention/report/report.html:108 msgid "View in LANIS" msgstr "In LANIS öffnen" -#: compensation/templates/compensation/report/eco_account/report.html:28 +#: compensation/templates/compensation/report/eco_account/report.html:24 msgid "Deductions for" msgstr "Abbuchungen für" -#: compensation/templates/compensation/report/eco_account/report.html:36 -#: intervention/templates/intervention/report/report.html:57 -#: intervention/templates/intervention/report/report.html:78 +#: compensation/templates/compensation/report/eco_account/report.html:32 +#: intervention/templates/intervention/report/report.html:53 +#: intervention/templates/intervention/report/report.html:74 msgid "None" msgstr "-" @@ -1291,7 +1294,6 @@ msgstr "" #: intervention/forms/forms.py:142 #: intervention/templates/intervention/detail/view.html:64 -#: intervention/templates/intervention/report/report.html:45 #: intervention/utils/quality.py:52 msgid "Intervention handler" msgstr "Eingriffsverursacher" @@ -1302,14 +1304,14 @@ msgstr "Wer führt den Eingriff durch" #: intervention/forms/forms.py:155 #: intervention/templates/intervention/detail/view.html:96 -#: intervention/templates/intervention/report/report.html:83 +#: intervention/templates/intervention/report/report.html:79 #: intervention/utils/quality.py:73 msgid "Registration date" msgstr "Datum Zulassung bzw. Satzungsbeschluss" #: intervention/forms/forms.py:167 #: intervention/templates/intervention/detail/view.html:100 -#: intervention/templates/intervention/report/report.html:87 +#: intervention/templates/intervention/report/report.html:83 msgid "Binding on" msgstr "Datum Bestandskraft" @@ -1393,7 +1395,7 @@ msgstr "Kompensationen und Zahlungen geprüft" msgid "Run check" msgstr "Prüfung vornehmen" -#: intervention/forms/modalForms.py:264 konova/forms.py:514 +#: intervention/forms/modalForms.py:264 konova/forms.py:515 msgid "" "I, {} {}, confirm that all necessary control steps have been performed by " "myself." @@ -1454,7 +1456,7 @@ msgid "Eco-account not recorded! Deduction invalid!" msgstr "Ökokonto nicht verzeichnet! Abbuchung ungültig!" #: intervention/templates/intervention/detail/includes/payments.html:8 -#: intervention/templates/intervention/report/report.html:73 +#: intervention/templates/intervention/report/report.html:69 msgid "Payments" msgstr "Ersatzzahlungen" @@ -1493,11 +1495,11 @@ msgstr "Widerspruch entfernen" msgid "Exists" msgstr "vorhanden" -#: intervention/templates/intervention/report/report.html:62 +#: intervention/templates/intervention/report/report.html:58 msgid "Deductions of eco-accounts" msgstr "Abbuchungen von Ökokonten" -#: intervention/templates/intervention/report/report.html:76 +#: intervention/templates/intervention/report/report.html:72 msgid "Exist" msgstr "Vorhanden" @@ -1582,7 +1584,7 @@ msgid "Search for parcel gmrkng" msgstr "Nach Gemarkung suchen" #: konova/filters/mixins.py:111 -#: konova/templates/konova/includes/parcels.html:18 +#: konova/templates/konova/includes/parcel_table.html:13 msgid "Parcel" msgstr "Flur" @@ -1591,7 +1593,7 @@ msgid "Search for parcel" msgstr "Nach Flur suchen" #: konova/filters/mixins.py:124 -#: konova/templates/konova/includes/parcels.html:19 +#: konova/templates/konova/includes/parcel_table.html:14 msgid "Parcel counter" msgstr "Flurstückzähler" @@ -1600,7 +1602,7 @@ msgid "Search for parcel counter" msgstr "Nach Flurstückzähler suchen" #: konova/filters/mixins.py:138 -#: konova/templates/konova/includes/parcels.html:20 +#: konova/templates/konova/includes/parcel_table.html:15 msgid "Parcel number" msgstr "Flurstücknenner" @@ -1670,23 +1672,23 @@ msgstr "Formate: pdf, jpg, png. Maximal 15 MB." msgid "Added document" msgstr "Dokument hinzugefügt" -#: konova/forms.py:505 +#: konova/forms.py:506 msgid "Confirm record" msgstr "Verzeichnen bestätigen" -#: konova/forms.py:513 +#: konova/forms.py:514 msgid "Record data" msgstr "Daten verzeichnen" -#: konova/forms.py:520 +#: konova/forms.py:521 msgid "Confirm unrecord" msgstr "Entzeichnen bestätigen" -#: konova/forms.py:521 +#: konova/forms.py:522 msgid "Unrecord data" msgstr "Daten entzeichnen" -#: konova/forms.py:522 +#: konova/forms.py:523 msgid "I, {} {}, confirm that this data must be unrecorded." msgstr "" "Ich, {} {}, bestätige, dass diese Daten wieder entzeichnet werden müssen." @@ -1735,30 +1737,26 @@ msgstr "" msgid "English" msgstr "" -#: konova/templates/konova/includes/parcels.html:3 -msgid "Spatial reference" -msgstr "Raumreferenz" - -#: konova/templates/konova/includes/parcels.html:8 -msgid "" -"\n" -" If the geometry is not empty, the parcels are currently " -"recalculated. Please refresh this page in a few moments.\n" -" " -msgstr "" -"\n" -"Falls die Geometrie nicht leer ist, werden die Flurstücke aktuell berechnet. " -"Bitte laden Sie diese Seite in ein paar Augenblicken erneut... \n" -" " +#: konova/templates/konova/includes/parcel_table.html:5 +msgid "Parcels can not be calculated, since no geometry is given." +msgstr "Flurstücke können nicht berechnet werden, da keine Geometrie eingegeben wurde." -#: konova/templates/konova/includes/parcels.html:16 +#: konova/templates/konova/includes/parcel_table.html:11 msgid "Kreis" msgstr "Kreis" -#: konova/templates/konova/includes/parcels.html:17 +#: konova/templates/konova/includes/parcel_table.html:12 msgid "Gemarkung" msgstr "Gemarkung" +#: konova/templates/konova/includes/parcels.html:3 +msgid "Spatial reference" +msgstr "Raumreferenz" + +#: konova/templates/konova/includes/parcels.html:6 +msgid "Loading..." +msgstr "Lade..." + #: konova/templates/konova/includes/quickstart/compensations.html:20 #: konova/templates/konova/includes/quickstart/ecoaccounts.html:20 #: konova/templates/konova/includes/quickstart/interventions.html:20 @@ -4167,54 +4165,3 @@ msgstr "" #, python-format msgid "Unable to connect to qpid with SASL mechanism %s" msgstr "" - -#~ msgid "your teams" -#~ msgstr "Team entfernen" - -#~ msgid "Remove check to remove access for this user" -#~ msgstr "Wählen Sie die Nutzer ab, die keinen Zugriff mehr haben sollen" - -#~ msgid "Select the action type" -#~ msgstr "Maßnahmentyp wählen" - -#~ msgid "No revocation" -#~ msgstr "Kein Widerspruch" - -#~ msgid "Revocation from {}, added on {} by {}" -#~ msgstr "Widerspruch vom {}, am {} von {} hinzugefügt" - -#~ msgid "General data edited" -#~ msgstr "Allgemeine Daten bearbeitet" - -#~ msgid "On registered data edited" -#~ msgstr "Wenn meine freigegebenen Daten bearbeitet wurden" - -#~ msgid "Not recorded" -#~ msgstr "Noch nicht verzeichnet" - -#~ msgid "On new related data" -#~ msgstr "Wenn neue Daten für mich angelegt werden" - -#~ msgid "On disabled share link" -#~ msgstr "Wenn ein Freigabelink deaktiviert wird" - -#~ msgid "Deduct" -#~ msgstr "Abbuchen" - -#~ msgid "No file given!" -#~ msgstr "Keine Datei angegeben!" - -#~ msgid "Added action" -#~ msgstr "Maßnahme hinzugefügt" - -#~ msgid "Share with user" -#~ msgstr "Freigeben für Nutzer" - -#~ msgid "Fundings" -#~ msgstr "Förderungen" - -#~ msgid "Select fundings for this compensation" -#~ msgstr "Wählen Sie ggf. Fördermittelprojekte" - -#~ msgid "Funded by" -#~ msgstr "Gefördert mit" diff --git a/templates/base.html b/templates/base.html index c418daa..30be48e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -14,6 +14,7 @@ Adds script for modal rendering. Script depends on Jquery, therefore it needs to be loaded afterwards. {% endcomment %} + {% block head %} {% endblock %} diff --git a/templates/map/geom_form.html b/templates/map/geom_form.html index 8b9f463..bc8d0da 100644 --- a/templates/map/geom_form.html +++ b/templates/map/geom_form.html @@ -10,4 +10,6 @@
{% endif %} {{geom_form.media}} -{{geom_form.geom}} \ No newline at end of file +
+ {{geom_form.geom}} +
diff --git a/templates/public_base.html b/templates/public_base.html index 62193c4..69a25d9 100644 --- a/templates/public_base.html +++ b/templates/public_base.html @@ -10,6 +10,7 @@ {% bootstrap_javascript jquery='full' %} {% fontawesome_5_static %} + {% block head %} {% endblock %} From 95255ff3eaee7cb9bf12bc45409b4100a9e7c821 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Mon, 21 Feb 2022 15:38:41 +0100 Subject: [PATCH 2/3] #121 Fancy spatial reference * visual enhancement for spatial reference rendering --- konova/templates/konova/includes/parcels.html | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/konova/templates/konova/includes/parcels.html b/konova/templates/konova/includes/parcels.html index 9ccd9d5..952fde1 100644 --- a/konova/templates/konova/includes/parcels.html +++ b/konova/templates/konova/includes/parcels.html @@ -1,8 +1,18 @@ -{% load i18n %} +{% load i18n fontawesome_5 %}
-

{% trans 'Spatial reference' %}

-
- - {% trans 'Loading...' %} +
+
+
+ {% fa5_icon 'search-location' %} + {% trans 'Spatial reference' %} +
+
+
+
+
+ +
+
+
\ No newline at end of file From ab361ec2fdba522893a74741fdab712598121e56 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Mon, 21 Feb 2022 15:53:09 +0100 Subject: [PATCH 3/3] #121 Deferred parcels test * adds test for htmx-parcel fetching --- konova/tests/test_views.py | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/konova/tests/test_views.py b/konova/tests/test_views.py index ff99ea3..d84c051 100644 --- a/konova/tests/test_views.py +++ b/konova/tests/test_views.py @@ -466,11 +466,15 @@ class KonovaViewTestCase(BaseViewTestCase): """ Holds tests for all regular views, which are not app specific """ - @classmethod - def setUpTestData(cls) -> None: - super().setUpTestData() + def setUp(self) -> None: + super().setUp() + + geom = self.create_dummy_geometry() + self.geom_1 = Geometry.objects.create( + geom=geom, + ) - cls.home_url = reverse("home") + self.home_url = reverse("home") def test_views_logged_in_no_groups(self): """ Check correct status code for all requests @@ -504,6 +508,24 @@ class KonovaViewTestCase(BaseViewTestCase): ] self.assert_url_fail(client, urls) + def test_htmx_parcel_fetch(self): + """ Tests that the htmx geometry-parcel fetch returns a proper status code and content + + Returns: + + """ + client_user = Client() + client_user.login(username=self.superuser.username, password=self.superuser_pw) + + has_parcels = self.geom_1.parcels.all().exists() + if not has_parcels: + self.geom_1.update_parcels() + + htmx_url = reverse("geometry-parcels", args=(self.geom_1.id,)) + response = client_user.get(htmx_url) + self.assertEqual(response.status_code, 286, "Unexpected status code for HTMX fetch") + self.assertGreater(len(response.content), 0) + class AutocompleteTestCase(BaseViewTestCase): @classmethod