Merge pull request 'master' (#130) from master into Docker

Reviewed-on: SGD-Nord/konova#130
This commit is contained in:
mpeltriaux 2022-02-25 13:07:59 +01:00
commit a80fa4c700
17 changed files with 294 additions and 251 deletions

View File

@ -113,6 +113,7 @@ class EditPaymentModalForm(NewPaymentForm):
def __init__(self, *args, **kwargs):
self.payment = kwargs.pop("payment", None)
super().__init__(*args, **kwargs)
self.form_title = _("Edit payment")
form_date = {
"amount": self.payment.amount,
"due": str(self.payment.due_on),
@ -268,6 +269,7 @@ class EditCompensationStateModalForm(NewStateModalForm):
def __init__(self, *args, **kwargs):
self.state = kwargs.pop("state", None)
super().__init__(*args, **kwargs)
self.form_title = _("Edit state")
form_data = {
"biotope_type": self.state.biotope_type,
"biotope_extra": self.state.biotope_type_details.all(),
@ -380,6 +382,7 @@ class EditDeadlineModalForm(NewDeadlineModalForm):
def __init__(self, *args, **kwargs):
self.deadline = kwargs.pop("deadline", None)
super().__init__(*args, **kwargs)
self.form_title = _("Edit deadline")
form_data = {
"type": self.deadline.type,
"date": str(self.deadline.date),
@ -497,6 +500,7 @@ class EditCompensationActionModalForm(NewActionModalForm):
def __init__(self, *args, **kwargs):
self.action = kwargs.pop("action", None)
super().__init__(*args, **kwargs)
self.form_title = _("Edit action")
form_data = {
"action_type": list(self.action.action_type.values_list("id", flat=True)),
"action_type_details": self.action.action_type_details.all(),

View File

@ -20,10 +20,6 @@
<th scope="row">{% trans 'Conservation office file number' %}</th>
<td class="align-middle">{{obj.responsible.conservation_file_number|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'Action handler' %}</th>
<td class="align-middle">{{obj.responsible.handler|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'Deductions for' %}</th>
<td class="align-middle">

View File

@ -20,10 +20,6 @@
<th scope="row">{% trans 'Conservation office file number' %}</th>
<td class="align-middle">{{obj.responsible.conservation_file_number|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'Action handler' %}</th>
<td class="align-middle">{{obj.responsible.handler|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'Last modified' %}</th>
<td class="align-middle">

View File

@ -205,6 +205,7 @@ class EditRevocationModalForm(NewRevocationModalForm):
def __init__(self, *args, **kwargs):
self.revocation = kwargs.pop("revocation", None)
super().__init__(*args, **kwargs)
self.form_title = _("Edit revocation")
try:
doc = self.revocation.document.file
except ObjectDoesNotExist:
@ -477,6 +478,7 @@ class EditEcoAccountDeductionModalForm(NewDeductionModalForm):
def __init__(self, *args, **kwargs):
self.deduction = kwargs.pop("deduction", None)
super().__init__(*args, **kwargs)
self.form_title = _("Edit Deduction")
form_data = {
"account": self.deduction.account,
"intervention": self.deduction.intervention,

View File

@ -41,10 +41,6 @@
<th scope="row">{% trans 'Conservation office file number' %}</th>
<td class="align-middle">{{obj.responsible.conservation_file_number|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'Intervention handler' %}</th>
<td class="align-middle">{{obj.responsible.handler|default_if_none:""}}</td>
</tr>
<tr>
<th scope="row">{% trans 'Compensations' %}</th>
<td class="align-middle">

View File

@ -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:

View File

@ -471,6 +471,7 @@ class EditDocumentModalForm(NewDocumentModalForm):
def __init__(self, *args, **kwargs):
self.document = kwargs.pop("document", None)
super().__init__(*args, **kwargs)
self.form_title = _("Edit document")
form_data = {
"title": self.document.title,
"comment": self.document.comment,

View File

@ -0,0 +1,32 @@
{% load i18n %}
<div class="table-container w-100 scroll-300">
{% if parcels|length == 0 %}
<article class="alert alert-info">
{% trans 'Parcels can not be calculated, since no geometry is given.' %}
</article>
{% else %}
<table class="table table-hover">
<thead>
<tr>
<th scope="col">{% trans 'Kreis' %}</th>
<th scope="col">{% trans 'Gemarkung' %}</th>
<th scope="col">{% trans 'Parcel' %}</th>
<th scope="col">{% trans 'Parcel counter' %}</th>
<th scope="col">{% trans 'Parcel number' %}</th>
</tr>
</thead>
<tbody>
{% for parcel in parcels %}
<tr>
<td>{{parcel.district.krs|default_if_none:"-"}}</td>
<td>{{parcel.gmrkng|default_if_none:"-"}}</td>
<td>{{parcel.flr|default_if_none:"-"}}</td>
<td>{{parcel.flrstck_zhlr|default_if_none:"-"}}</td>
<td>{{parcel.flrstck_nnr|default_if_none:"-"}}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div>

View File

@ -1,37 +1,18 @@
{% load i18n %}
<div>
<h3>{% trans 'Spatial reference' %}</h3>
</div>
<div class="table-container w-100 scroll-300">
{% if parcels|length == 0 %}
<article class="alert alert-info">
{% blocktrans %}
If the geometry is not empty, the parcels are currently recalculated. Please refresh this page in a few moments.
{% endblocktrans %}
</article>
{% else %}
<table class="table table-hover">
<thead>
<tr>
<th scope="col">{% trans 'Kreis' %}</th>
<th scope="col">{% trans 'Gemarkung' %}</th>
<th scope="col">{% trans 'Parcel' %}</th>
<th scope="col">{% trans 'Parcel counter' %}</th>
<th scope="col">{% trans 'Parcel number' %}</th>
</tr>
</thead>
<tbody>
{% for parcel in parcels %}
<tr>
<td>{{parcel.district.krs|default_if_none:"-"}}</td>
<td>{{parcel.gmrkng|default_if_none:"-"}}</td>
<td>{{parcel.flr|default_if_none:"-"}}</td>
<td>{{parcel.flrstck_zhlr|default_if_none:"-"}}</td>
<td>{{parcel.flrstck_nnr|default_if_none:"-"}}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% load i18n fontawesome_5 %}
<div class="col-sm-12">
<div class="card">
<div class="card-header rlp-r">
<h5>
{% fa5_icon 'search-location' %}
{% trans 'Spatial reference' %}
</h5>
</div>
<div class="card-body">
<div hx-trigger="every 2s" hx-get="{% url 'geometry-parcels' geom_form.instance.geometry.id %}" title="{% trans 'Loading...' %}">
<div class="row justify-content-center">
<span class="spinner-border rlp-r-inv" role="status"></span>
</div>
</div>
</div>
</div>
</div>

View File

@ -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()
cls.home_url = reverse("home")
geom = self.create_dummy_geometry()
self.geom_1 = Geometry.objects.create(
geom=geom,
)
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

View File

@ -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/<id>/parcels', get_geom_parcels, name="geometry-parcels"),
# Autocomplete paths for all apps
path("atcmplt/eco-accounts", EcoAccountAutocomplete.as_view(), name="accounts-autocomplete"),

View File

@ -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

Binary file not shown.

View File

@ -5,7 +5,7 @@
#
#: compensation/filters.py:123 compensation/forms/modalForms.py:36
#: compensation/forms/modalForms.py:47 compensation/forms/modalForms.py:63
#: compensation/forms/modalForms.py:356 compensation/forms/modalForms.py:463
#: compensation/forms/modalForms.py:358 compensation/forms/modalForms.py:466
#: intervention/forms/forms.py:54 intervention/forms/forms.py:156
#: intervention/forms/forms.py:168 intervention/forms/modalForms.py:150
#: intervention/forms/modalForms.py:163 intervention/forms/modalForms.py:176
@ -26,7 +26,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-02-18 14:50+0100\n"
"POT-Creation-Date: 2022-02-21 14:44+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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:447
#: 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"
@ -214,14 +214,14 @@ msgstr "Abbuchungen"
#: analysis/templates/analysis/reports/includes/eco_account/deductions.html:9
#: analysis/templates/analysis/reports/includes/eco_account/deductions.html:11
#: compensation/forms/modalForms.py:194
#: compensation/forms/modalForms.py:195
#: compensation/templates/compensation/detail/compensation/includes/states-after.html:36
#: 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
#: ema/templates/ema/detail/includes/states-after.html:36
#: ema/templates/ema/detail/includes/states-before.html:36
#: intervention/forms/modalForms.py:361
#: intervention/forms/modalForms.py:364
msgid "Surface"
msgstr "Fläche"
@ -284,8 +284,8 @@ msgid "Type"
msgstr "Typ"
#: analysis/templates/analysis/reports/includes/old_data/amount.html:24
#: compensation/tables.py:89 intervention/forms/modalForms.py:372
#: intervention/forms/modalForms.py:379 intervention/tables.py:88
#: compensation/tables.py:89 intervention/forms/modalForms.py:375
#: intervention/forms/modalForms.py:382 intervention/tables.py:88
#: intervention/templates/intervention/detail/view.html:19
#: konova/templates/konova/includes/quickstart/interventions.html:4
#: templates/navbars/navbar.html:22
@ -295,7 +295,7 @@ msgstr "Eingriff"
#: analysis/templates/analysis/reports/includes/old_data/amount.html:34
#: compensation/tables.py:266
#: compensation/templates/compensation/detail/eco_account/view.html:20
#: intervention/forms/modalForms.py:345 intervention/forms/modalForms.py:352
#: intervention/forms/modalForms.py:348 intervention/forms/modalForms.py:355
#: konova/templates/konova/includes/quickstart/ecoaccounts.html:4
#: templates/navbars/navbar.html:34
msgid "Eco-account"
@ -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:355 compensation/forms/modalForms.py:462
#: 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:464
#: 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:357
#: 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"
@ -496,47 +496,62 @@ msgstr "Neue Ersatzzahlung zu Eingriff '{}' hinzufügen"
msgid "If there is no date you can enter, please explain why."
msgstr "Falls Sie kein Datum angeben können, erklären Sie bitte weshalb."
#: compensation/forms/modalForms.py:158 compensation/forms/modalForms.py:170
#: compensation/forms/modalForms.py:116
#: intervention/templates/intervention/detail/includes/payments.html:59
msgid "Edit payment"
msgstr "Zahlung bearbeiten"
#: compensation/forms/modalForms.py:159 compensation/forms/modalForms.py:171
msgid "Biotope Type"
msgstr "Biotoptyp"
#: compensation/forms/modalForms.py:161
#: compensation/forms/modalForms.py:162
msgid "Select the biotope type"
msgstr "Biotoptyp wählen"
#: compensation/forms/modalForms.py:175 compensation/forms/modalForms.py:187
#: compensation/forms/modalForms.py:176 compensation/forms/modalForms.py:188
msgid "Biotope additional type"
msgstr "Zusatzbezeichnung"
#: compensation/forms/modalForms.py:178
#: compensation/forms/modalForms.py:179
msgid "Select an additional biotope type"
msgstr "Zusatzbezeichnung wählen"
#: compensation/forms/modalForms.py:197 intervention/forms/modalForms.py:363
#: compensation/forms/modalForms.py:198 intervention/forms/modalForms.py:366
msgid "in m²"
msgstr ""
#: compensation/forms/modalForms.py:208
#: compensation/forms/modalForms.py:209
msgid "New state"
msgstr "Neuer Zustand"
#: compensation/forms/modalForms.py:209
#: compensation/forms/modalForms.py:210
msgid "Insert data for the new state"
msgstr "Geben Sie die Daten des neuen Zustandes ein"
#: compensation/forms/modalForms.py:216 konova/forms.py:193
#: compensation/forms/modalForms.py:217 konova/forms.py:193
msgid "Object removed"
msgstr "Objekt entfernt"
#: compensation/forms/modalForms.py:327
#: 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:330
#: compensation/forms/modalForms.py:332
msgid "Select the deadline type"
msgstr "Fristart wählen"
#: compensation/forms/modalForms.py:339
#: 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
@ -544,23 +559,30 @@ msgstr "Fristart wählen"
msgid "Date"
msgstr "Datum"
#: compensation/forms/modalForms.py:342
#: compensation/forms/modalForms.py:344
msgid "Select date"
msgstr "Datum wählen"
#: compensation/forms/modalForms.py:369
#: compensation/forms/modalForms.py:371
msgid "New deadline"
msgstr "Neue Frist"
#: compensation/forms/modalForms.py:370
#: 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:410
#: 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:413
#: 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 "
@ -570,34 +592,41 @@ msgstr ""
"hier gewählten Einträge sollen mit der weiter unten angegebenen Einheit und "
"Menge umgesetzt werden. "
#: compensation/forms/modalForms.py:418 compensation/forms/modalForms.py:430
#: compensation/forms/modalForms.py:421 compensation/forms/modalForms.py:433
msgid "Action Type detail"
msgstr "Zusatzmerkmal"
#: compensation/forms/modalForms.py:421
#: compensation/forms/modalForms.py:424
msgid "Select the action type detail"
msgstr "Zusatzmerkmal wählen"
#: compensation/forms/modalForms.py:435
#: compensation/forms/modalForms.py:438
msgid "Unit"
msgstr "Einheit"
#: compensation/forms/modalForms.py:438
#: compensation/forms/modalForms.py:441
msgid "Select the unit"
msgstr "Einheit wählen"
#: compensation/forms/modalForms.py:450
#: compensation/forms/modalForms.py:453
msgid "Insert the amount"
msgstr "Menge eingeben"
#: compensation/forms/modalForms.py:475
#: compensation/forms/modalForms.py:478
msgid "New action"
msgstr "Neue Maßnahme"
#: compensation/forms/modalForms.py:476
#: 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 ""
@ -762,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
@ -822,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
@ -861,8 +878,9 @@ 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 bearbeitet"
msgstr "Dokument bearbeiten"
#: compensation/templates/compensation/detail/compensation/includes/documents.html:66
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:64
@ -908,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
@ -990,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"
@ -1049,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"
@ -1082,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"
@ -1096,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 "-"
@ -1286,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"
@ -1297,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"
@ -1370,20 +1377,25 @@ msgstr "Muss kleiner als 15 Mb sein"
msgid "Add revocation"
msgstr "Widerspruch hinzufügen"
#: intervention/forms/modalForms.py:247
#: intervention/forms/modalForms.py:208
#: intervention/templates/intervention/detail/includes/revocation.html:69
msgid "Edit revocation"
msgstr "Widerspruch bearbeiten"
#: intervention/forms/modalForms.py:248
msgid "Checked intervention data"
msgstr "Eingriffsdaten geprüft"
#: intervention/forms/modalForms.py:253
#: intervention/forms/modalForms.py:254
msgid "Checked compensations data and payments"
msgstr "Kompensationen und Zahlungen geprüft"
#: intervention/forms/modalForms.py:262
#: intervention/forms/modalForms.py:263
#: intervention/templates/intervention/detail/includes/controls.html:19
msgid "Run check"
msgstr "Prüfung vornehmen"
#: intervention/forms/modalForms.py:263 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."
@ -1391,23 +1403,23 @@ msgstr ""
"Ich, {} {}, bestätige, dass die notwendigen Kontrollschritte durchgeführt "
"wurden:"
#: intervention/forms/modalForms.py:347
#: intervention/forms/modalForms.py:350
msgid "Only recorded accounts can be selected for deductions"
msgstr "Nur verzeichnete Ökokonten können für Abbuchungen verwendet werden."
#: intervention/forms/modalForms.py:374
#: intervention/forms/modalForms.py:377
msgid "Only shared interventions can be selected"
msgstr "Nur freigegebene Eingriffe können gewählt werden"
#: intervention/forms/modalForms.py:387
#: intervention/forms/modalForms.py:390
msgid "New Deduction"
msgstr "Neue Abbuchung"
#: intervention/forms/modalForms.py:388
#: intervention/forms/modalForms.py:391
msgid "Enter the information for a new deduction from a chosen eco-account"
msgstr "Geben Sie die Informationen für eine neue Abbuchung ein."
#: intervention/forms/modalForms.py:431
#: intervention/forms/modalForms.py:434
msgid ""
"Eco-account {} is not recorded yet. You can only deduct from recorded "
"accounts."
@ -1415,7 +1427,7 @@ msgstr ""
"Ökokonto {} ist noch nicht verzeichnet. Abbuchungen können nur von "
"verzeichneten Ökokonten erfolgen."
#: intervention/forms/modalForms.py:441
#: intervention/forms/modalForms.py:444
msgid ""
"The account {} has not enough surface for a deduction of {} m². There are "
"only {} m² left"
@ -1444,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"
@ -1457,10 +1469,6 @@ msgctxt "money"
msgid "Amount"
msgstr "Betrag"
#: intervention/templates/intervention/detail/includes/payments.html:59
msgid "Edit payment"
msgstr "Zahlung bearbeitet"
#: intervention/templates/intervention/detail/includes/payments.html:62
msgid "Remove payment"
msgstr "Zahlung entfernen"
@ -1479,10 +1487,6 @@ msgstr "Vom"
msgid "Revocation"
msgstr "Widerspruch"
#: intervention/templates/intervention/detail/includes/revocation.html:69
msgid "Edit revocation"
msgstr "Widerspruch bearbeiten"
#: intervention/templates/intervention/detail/includes/revocation.html:72
msgid "Remove revocation"
msgstr "Widerspruch entfernen"
@ -1491,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"
@ -1580,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"
@ -1589,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"
@ -1598,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"
@ -1668,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."
@ -1733,29 +1737,25 @@ msgstr ""
msgid "English"
msgstr ""
#: 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/parcel_table.html:11
msgid "Kreis"
msgstr "Kreis"
#: 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: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/parcels.html:16
msgid "Kreis"
msgstr "Kreis"
#: konova/templates/konova/includes/parcels.html:17
msgid "Gemarkung"
msgstr "Gemarkung"
#: 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
@ -1792,7 +1792,7 @@ msgstr "In Zwischenablage kopieren"
msgid "Copied to clipboard"
msgstr "In Zwischenablage kopiert"
#: konova/utils/mailer.py:68
#: konova/utils/mailer.py:68 konova/utils/mailer.py:137
msgid "{} - Shared access removed"
msgstr "{} - Zugriff entzogen"
@ -1800,23 +1800,23 @@ msgstr "{} - Zugriff entzogen"
msgid "{} - Shared access given"
msgstr "{} - Zugriff freigegeben"
#: konova/utils/mailer.py:137
msgid "{} - Shared data recorded"
msgstr "{} - Freigegebene Daten verzeichnet"
#: konova/utils/mailer.py:160
#: konova/utils/mailer.py:160 konova/utils/mailer.py:275
msgid "{} - Shared data unrecorded"
msgstr "{} - Freigegebene Daten entzeichnet"
#: konova/utils/mailer.py:183
msgid "{} - Shared data deleted"
msgstr "{} - Freigegebene Daten gelöscht"
#: konova/utils/mailer.py:183 konova/utils/mailer.py:252
msgid "{} - Shared data recorded"
msgstr "{} - Freigegebene Daten verzeichnet"
#: konova/utils/mailer.py:206
#: konova/utils/mailer.py:206 konova/utils/mailer.py:321
msgid "{} - Shared data checked"
msgstr "{} - Freigegebene Daten geprüft"
#: konova/utils/mailer.py:227 templates/email/api/verify_token.html:4
#: konova/utils/mailer.py:229 konova/utils/mailer.py:298
msgid "{} - Shared data deleted"
msgstr "{} - Freigegebene Daten gelöscht"
#: konova/utils/mailer.py:342 templates/email/api/verify_token.html:4
msgid "Request for new API token"
msgstr "Anfrage für neuen API Token"
@ -2088,9 +2088,13 @@ msgstr ""
#: templates/email/api/verify_token.html:18
#: templates/email/checking/shared_data_checked.html:19
#: templates/email/checking/shared_data_checked_team.html:19
#: templates/email/deleting/shared_data_deleted.html:19
#: templates/email/deleting/shared_data_deleted_team.html:19
#: templates/email/recording/shared_data_recorded.html:19
#: templates/email/recording/shared_data_recorded_team.html:19
#: templates/email/recording/shared_data_unrecorded.html:19
#: templates/email/recording/shared_data_unrecorded_team.html:19
#: templates/email/sharing/shared_access_given.html:20
#: templates/email/sharing/shared_access_given_team.html:20
#: templates/email/sharing/shared_access_removed.html:20
@ -2099,6 +2103,7 @@ msgid "Best regards"
msgstr "Beste Grüße"
#: templates/email/checking/shared_data_checked.html:4
#: templates/email/checking/shared_data_checked_team.html:4
msgid "Shared data checked"
msgstr "Freigegebene Daten geprüft"
@ -2112,10 +2117,12 @@ msgid "Hello "
msgstr "Hallo "
#: templates/email/checking/shared_data_checked.html:10
#: templates/email/checking/shared_data_checked_team.html:10
msgid "the following dataset has just been checked"
msgstr "der folgende Datensatz wurde soeben geprüft "
#: templates/email/checking/shared_data_checked.html:16
#: templates/email/checking/shared_data_checked_team.html:16
msgid ""
"This means, the responsible registration office just confirmed the "
"correctness of this dataset."
@ -2123,15 +2130,27 @@ msgstr ""
"Das bedeutet, dass die zuständige Zulassungsbehörde die Korrektheit des "
"Datensatzes soeben bestätigt hat."
#: templates/email/checking/shared_data_checked_team.html:8
#: templates/email/deleting/shared_data_deleted_team.html:8
#: templates/email/recording/shared_data_recorded_team.html:8
#: templates/email/recording/shared_data_unrecorded_team.html:8
#: templates/email/sharing/shared_access_given_team.html:8
#: templates/email/sharing/shared_access_removed_team.html:8
msgid "Hello team"
msgstr "Hallo Team"
#: templates/email/deleting/shared_data_deleted.html:4
#: templates/email/deleting/shared_data_deleted_team.html:4
msgid "Shared data deleted"
msgstr "Freigegebene Daten gelöscht"
#: templates/email/deleting/shared_data_deleted.html:10
#: templates/email/deleting/shared_data_deleted_team.html:10
msgid "the following dataset has just been deleted"
msgstr "der folgende Datensatz wurde soeben gelöscht "
#: templates/email/deleting/shared_data_deleted.html:16
#: templates/email/deleting/shared_data_deleted_team.html:16
msgid ""
"If this should not have been happened, please contact us. See the signature "
"for details."
@ -2140,19 +2159,23 @@ msgstr ""
"mail Signatur finden Sie weitere Kontaktinformationen."
#: templates/email/recording/shared_data_recorded.html:4
#: templates/email/recording/shared_data_recorded_team.html:4
msgid "Shared data recorded"
msgstr "Freigegebene Daten verzeichnet"
#: templates/email/recording/shared_data_recorded.html:10
#: templates/email/recording/shared_data_recorded_team.html:10
msgid "the following dataset has just been recorded"
msgstr "der folgende Datensatz wurde soeben verzeichnet "
#: templates/email/recording/shared_data_recorded.html:16
#: templates/email/recording/shared_data_recorded_team.html:16
msgid "This means the data is now publicly available, e.g. in LANIS"
msgstr ""
"Das bedeutet, dass die Daten nun öffentlich verfügbar sind, z.B. im LANIS."
#: templates/email/recording/shared_data_recorded.html:26
#: templates/email/recording/shared_data_recorded_team.html:26
msgid ""
"Please note: Recorded intervention means the compensations are recorded as "
"well."
@ -2161,18 +2184,22 @@ msgstr ""
"zugehörigen Kompensationen automatisch verzeichnet sind."
#: templates/email/recording/shared_data_unrecorded.html:4
#: templates/email/recording/shared_data_unrecorded_team.html:4
msgid "Shared data unrecorded"
msgstr "Freigegebene Daten entzeichnet"
#: templates/email/recording/shared_data_unrecorded.html:10
#: templates/email/recording/shared_data_unrecorded_team.html:10
msgid "the following dataset has just been unrecorded"
msgstr "der folgende Datensatz wurde soeben entzeichnet "
#: templates/email/recording/shared_data_unrecorded.html:16
#: templates/email/recording/shared_data_unrecorded_team.html:16
msgid "This means the data is no longer publicly available."
msgstr "Das bedeutet, dass die Daten nicht länger öffentlich verfügbar sind."
#: templates/email/recording/shared_data_unrecorded.html:26
#: templates/email/recording/shared_data_unrecorded_team.html:26
msgid ""
"Please note: Unrecorded intervention means the compensations are unrecorded "
"as well."
@ -2213,11 +2240,6 @@ msgstr ""
"Sie automatisch auch Zugriff auf die zugehörigen Kompensationen erhalten "
"haben."
#: templates/email/sharing/shared_access_given_team.html:8
#: templates/email/sharing/shared_access_removed_team.html:8
msgid "Hello team"
msgstr "Hallo Team"
#: templates/email/sharing/shared_access_given_team.html:10
msgid "the following dataset has just been shared with your team"
msgstr "der folgende Datensatz wurde soeben für Ihr Team freigegeben "
@ -4143,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"

View File

@ -14,6 +14,7 @@
Adds script for modal rendering. Script depends on Jquery, therefore it needs to be loaded afterwards.
{% endcomment %}
<script src="{% static 'js/jquery.bootstrap.modal.forms.min.js' %}"></script>
<script src="https://unpkg.com/htmx.org@1.6.1"></script>
{% block head %}
{% endblock %}
</head>

View File

@ -10,4 +10,6 @@
</div>
{% endif %}
{{geom_form.media}}
{{geom_form.geom}}
<div class="col-sm-12">
{{geom_form.geom}}
</div>

View File

@ -10,6 +10,7 @@
{% bootstrap_javascript jquery='full' %}
{% fontawesome_5_static %}
<link rel="stylesheet" href="{% static 'css/konova.css' %}">
<script src="https://unpkg.com/htmx.org@1.6.1"></script>
{% block head %}
{% endblock %}