* adds NewEcoAccountForm
* refactors NewCompensationForm into AbstractCompensationForm so main fields can be reused again
* fixes template bug in account detail view where the amount of deductions has been displayed instead of the available rest
* refactors _generate_new_identifier() into generate_new_identifier()
* refactors get_available_rest() into returning both, the total and relative amount
* improves saving of SimpleGeometryForm()
* adds/updates translations
pull/28/head
mipel 3 years ago
parent 46e1a9af86
commit d84fe68120

@ -11,6 +11,7 @@ from compensation.views.eco_account_views import *
urlpatterns = [
path("", index_view, name="acc-index"),
path('new/', new_view, name='acc-new'),
path('new/id', new_id_view, name='acc-new-id'),
path('<id>', open_view, name='acc-open'),
path('<id>/log', log_view, name='acc-log'),
path('<id>/record', record_view, name='acc-record'),

@ -13,18 +13,18 @@ from django.utils.translation import gettext_lazy as _
from django import forms
from codelist.models import KonovaCode
from codelist.settings import CODELIST_COMPENSATION_FUNDING_ID
from compensation.models import Compensation
from codelist.settings import CODELIST_COMPENSATION_FUNDING_ID, CODELIST_CONSERVATION_OFFICE_ID
from compensation.models import Compensation, EcoAccount
from intervention.inputs import GenerateInput
from intervention.models import Intervention
from intervention.models import Intervention, ResponsibilityData
from konova.forms import BaseForm, SimpleGeomForm
from user.models import UserActionLogEntry, UserAction
class NewCompensationForm(BaseForm):
""" Form for creating new compensations.
class AbstractCompensationForm(BaseForm):
""" Abstract form for compensations
Can be initialized with an intervention id for preselecting the related intervention.
Holds all important form fields, which are used in compensation and eco account forms
"""
identifier = forms.CharField(
@ -35,7 +35,7 @@ class NewCompensationForm(BaseForm):
widget=GenerateInput(
attrs={
"class": "form-control",
"url": reverse_lazy("compensation:new-id"),
"url": None, # Needs to be set in inheriting constructors
}
)
)
@ -51,21 +51,6 @@ class NewCompensationForm(BaseForm):
}
)
)
intervention = forms.ModelChoiceField(
label=_("compensates intervention"),
label_suffix="",
help_text=_("Select the intervention for which this compensation compensates"),
queryset=Intervention.objects.filter(
deleted=None,
),
widget=autocomplete.ModelSelect2(
url="interventions-autocomplete",
attrs={
"data-placeholder": _("Intervention"),
"data-minimum-input-length": 3,
}
),
)
fundings = forms.ModelMultipleChoiceField(
label=_("Fundings"),
label_suffix="",
@ -96,6 +81,41 @@ class NewCompensationForm(BaseForm):
)
)
class Meta:
abstract = True
class NewCompensationForm(AbstractCompensationForm):
""" Form for creating new compensations.
Can be initialized with an intervention id for preselecting the related intervention.
"""
intervention = forms.ModelChoiceField(
label=_("compensates intervention"),
label_suffix="",
help_text=_("Select the intervention for which this compensation compensates"),
queryset=Intervention.objects.filter(
deleted=None,
),
widget=autocomplete.ModelSelect2(
url="interventions-autocomplete",
attrs={
"data-placeholder": _("Intervention"),
"data-minimum-input-length": 3,
}
),
)
# Define a field order for a nicer layout instead of running with the inheritance result
field_order = [
"identifier",
"title",
"intervention",
"fundings",
"comment",
]
def __init__(self, *args, **kwargs):
intervention_id = kwargs.pop("intervention_id", None)
super().__init__(*args, **kwargs)
@ -114,8 +134,9 @@ class NewCompensationForm(BaseForm):
self.cancel_redirect = reverse("compensation:index")
tmp = Compensation()
identifier = tmp._generate_new_identifier()
identifier = tmp.generate_new_identifier()
self.initialize_form_field("identifier", identifier)
self.fields["identifier"].widget.attrs["url"] = reverse_lazy("compensation:new-id")
def save(self, user: User, geom_form: SimpleGeomForm):
with transaction.atomic():
@ -200,3 +221,124 @@ class EditCompensationForm(NewCompensationForm):
self.instance.log.add(action)
return self.instance
class NewEcoAccountForm(AbstractCompensationForm):
conservation_office = forms.ModelChoiceField(
label=_("Conservation office"),
label_suffix="",
help_text=_("Select the responsible office"),
queryset=KonovaCode.objects.filter(
is_archived=False,
is_leaf=True,
code_lists__in=[CODELIST_CONSERVATION_OFFICE_ID],
),
widget=autocomplete.ModelSelect2(
url="codes-conservation-office-autocomplete",
attrs={
}
),
)
conservation_file_number = forms.CharField(
label=_("Conservation office file number"),
label_suffix="",
max_length=255,
required=False,
widget=forms.TextInput(
attrs={
"placeholder": _("ETS-123/ABC.456"),
"class": "form-control",
}
)
)
handler = forms.CharField(
label=_("Eco-account handler"),
label_suffix="",
max_length=255,
required=False,
help_text=_("Who handles the eco-account"),
widget=forms.TextInput(
attrs={
"placeholder": _("Company Mustermann"),
"class": "form-control",
}
)
)
surface = forms.DecimalField(
min_value=0.00,
decimal_places=2,
label=_("Available Surface"),
label_suffix="",
help_text=_("The amount that can be used for deductions"),
widget=forms.NumberInput(
attrs={
"class": "form-control",
}
)
)
field_order = [
"identifier",
"title",
"conservation_office",
"surface",
"conservation_file_number",
"handler",
"fundings",
"comment",
]
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.form_title = _("New Eco-Account")
self.action_url = reverse("compensation:acc-new")
self.cancel_redirect = reverse("compensation:acc-index")
tmp = EcoAccount()
identifier = tmp.generate_new_identifier()
self.initialize_form_field("identifier", identifier)
self.fields["identifier"].widget.attrs["url"] = reverse_lazy("compensation:acc-new-id")
self.fields["title"].widget.attrs["placeholder"] = _("Eco-Account XY; Location ABC")
def save(self, user: User, geom_form: SimpleGeomForm):
with transaction.atomic():
# Fetch data from cleaned POST values
identifier = self.cleaned_data.get("identifier", None)
title = self.cleaned_data.get("title", None)
fundings = self.cleaned_data.get("fundings", None)
handler = self.cleaned_data.get("handler", None)
deductable_surface = self.cleaned_data.get("surface", None)
conservation_office = self.cleaned_data.get("conservation_office", None)
conservation_file_number = self.cleaned_data.get("conservation_file_number", None)
comment = self.cleaned_data.get("comment", None)
# Create log entry
action = UserActionLogEntry.objects.create(
user=user,
action=UserAction.CREATED,
)
# Process the geometry form
geometry = geom_form.save(action)
responsible = ResponsibilityData.objects.create(
handler=handler,
conservation_file_number=conservation_file_number,
conservation_office=conservation_office,
)
# Finally create main object
acc = EcoAccount.objects.create(
identifier=identifier,
title=title,
responsible=responsible,
deductable_surface=deductable_surface,
created=action,
geometry=geometry,
comment=comment,
)
acc.fundings.set(fundings)
acc.users.add(user)
# Add the log entry to the main objects log list
acc.log.add(action)
return acc

@ -185,9 +185,9 @@ class Compensation(AbstractCompensation):
def save(self, *args, **kwargs):
if self.identifier is None or len(self.identifier) == 0:
# Create new identifier
new_id = self._generate_new_identifier()
new_id = self.generate_new_identifier()
while Compensation.objects.filter(identifier=new_id).exists():
new_id = self._generate_new_identifier()
new_id = self.generate_new_identifier()
self.identifier = new_id
super().save(*args, **kwargs)
@ -322,9 +322,9 @@ class EcoAccount(AbstractCompensation):
def save(self, *args, **kwargs):
if self.identifier is None or len(self.identifier) == 0:
# Create new identifier
new_id = self._generate_new_identifier()
new_id = self.generate_new_identifier()
while EcoAccount.objects.filter(identifier=new_id).exists():
new_id = self._generate_new_identifier()
new_id = self.generate_new_identifier()
self.identifier = new_id
super().save(*args, **kwargs)
@ -355,28 +355,28 @@ class EcoAccount(AbstractCompensation):
"""
return self.after_states.all().aggregate(Sum("surface"))["surface__sum"] or 0
def get_available_rest(self, as_percentage: bool = False) -> float:
def get_available_rest(self) -> (float, float):
""" Calculates available rest surface of the eco account
Args:
as_percentage (bool): Whether to return the result as or %
Returns:
ret_val_total (float): Total amount
ret_val_relative (float): Amount as percentage (0-100)
"""
deductions = self.deductions.filter(
intervention__deleted=None,
)
deductions_surfaces = deductions.aggregate(Sum("surface"))["surface__sum"] or 0
available_surfaces = self.deductable_surface or deductions_surfaces ## no division by zero
ret_val = available_surfaces - deductions_surfaces
if as_percentage:
if available_surfaces > 0:
ret_val = int((ret_val / available_surfaces) * 100)
else:
ret_val = 0
return ret_val
ret_val_total = available_surfaces - deductions_surfaces
if available_surfaces > 0:
ret_val_relative = int((ret_val_total / available_surfaces) * 100)
else:
ret_val_relative = 0
return ret_val_total, ret_val_relative
def get_LANIS_link(self) -> str:
""" Generates a link for LANIS depending on the geometry

@ -239,8 +239,8 @@ class EcoAccountTable(BaseTable):
Returns:
"""
value = record.get_available_rest(as_percentage=True)
html = render_to_string("konova/custom_widgets/progressbar.html", {"value": value})
value_total, value_relative = record.get_available_rest()
html = render_to_string("konova/custom_widgets/progressbar.html", {"value": value_relative})
return format_html(html)
def render_r(self, value, record: EcoAccount):

@ -33,7 +33,7 @@
<tr>
<th scope="row">{% trans 'Available' %}</th>
<td class="align-middle">
{{obj.deductions_surface_sum|floatformat:2}} / {{obj.deductable_surface|floatformat:2}} m²
{{available_total|floatformat:2}} / {{obj.deductable_surface|floatformat:2}} m²
{% with available as value %}
{% include 'konova/custom_widgets/progressbar.html' %}
{% endwith %}

@ -97,9 +97,9 @@ def new_id_view(request: HttpRequest):
"""
tmp = Compensation()
identifier = tmp._generate_new_identifier()
identifier = tmp.generate_new_identifier()
while Compensation.objects.filter(identifier=identifier).exists():
identifier = tmp._generate_new_identifier()
identifier = tmp.generate_new_identifier()
return JsonResponse(
data={
"identifier": identifier

@ -5,14 +5,16 @@ Contact: michel.peltriaux@sgdnord.rlp.de
Created on: 09.08.21
"""
from django.contrib import messages
from django.db.models import Sum
from django.urls import reverse
from django.utils.translation import gettext_lazy as _
from django.contrib.auth.decorators import login_required
from django.core.exceptions import ObjectDoesNotExist
from django.http import HttpRequest, Http404
from django.shortcuts import render, get_object_or_404
from django.http import HttpRequest, Http404, JsonResponse
from django.shortcuts import render, get_object_or_404, redirect
from compensation.forms.forms import NewEcoAccountForm
from compensation.forms.modalForms import NewStateModalForm, NewActionModalForm, NewDeadlineModalForm
from compensation.models import EcoAccount, EcoAccountDocument
from compensation.tables import EcoAccountTable
@ -22,6 +24,7 @@ from konova.decorators import any_group_check, default_group_required, conservat
from konova.forms import RemoveModalForm, SimpleGeomForm, NewDocumentForm, RecordModalForm
from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
from konova.utils.documents import get_document, remove_document
from konova.utils.message_templates import IDENTIFIER_REPLACED, FORM_INVALID
from konova.utils.user_checks import in_group
@ -56,8 +59,62 @@ def index_view(request: HttpRequest):
@login_required
@default_group_required
def new_view(request: HttpRequest):
# ToDo
pass
"""
Renders a view for a new eco account creation
Args:
request (HttpRequest): The incoming request
Returns:
"""
template = "compensation/new/view.html"
data_form = NewEcoAccountForm(request.POST or None)
geom_form = SimpleGeomForm(request.POST or None, read_only=False)
if request.method == "POST":
if data_form.is_valid() and geom_form.is_valid():
generated_identifier = data_form.cleaned_data.get("identifier", None)
acc = data_form.save(request.user, geom_form)
if generated_identifier != acc.identifier:
messages.info(
request,
IDENTIFIER_REPLACED.format(
generated_identifier,
acc.identifier
)
)
messages.success(request, _("Eco-Account {} added").format(acc.identifier))
return redirect("compensation:acc-open", id=acc.id)
else:
messages.error(request, FORM_INVALID)
else:
# For clarification: nothing in this case
pass
context = {
"form": data_form,
"geom_form": geom_form,
"url": reverse("compensation:acc-new-id")
}
context = BaseContext(request, context).context
return render(request, template, context)
@login_required
def new_id_view(request: HttpRequest):
""" JSON endpoint
Provides fetching of free identifiers for e.g. AJAX calls
"""
tmp = EcoAccount()
identifier = tmp.generate_new_identifier()
while EcoAccount.objects.filter(identifier=identifier).exists():
identifier = tmp.generate_new_identifier()
return JsonResponse(
data={
"identifier": identifier
}
)
@login_required
@ -96,7 +153,7 @@ def open_view(request: HttpRequest, id: str):
diff_states = abs(sum_before_states - sum_after_states)
# Calculate rest of available surface for deductions
available = acc.get_available_rest(as_percentage=True)
available_total, available_relative = acc.get_available_rest()
deductions = acc.deductions.filter(
intervention__deleted=None,
@ -111,7 +168,8 @@ def open_view(request: HttpRequest, id: str):
"sum_before_states": sum_before_states,
"sum_after_states": sum_after_states,
"diff_states": diff_states,
"available": available,
"available": available_relative,
"available_total": available_total,
"is_default_member": in_group(_user, DEFAULT_GROUP),
"is_zb_member": in_group(_user, ZB_GROUP),
"is_ets_member": in_group(_user, ETS_GROUP),

@ -49,9 +49,9 @@ class Ema(AbstractCompensation):
def save(self, *args, **kwargs):
if self.identifier is None or len(self.identifier) == 0:
# Create new identifier
new_id = self._generate_new_identifier()
new_id = self.generate_new_identifier()
while Ema.objects.filter(identifier=new_id).exists():
new_id = self._generate_new_identifier()
new_id = self.generate_new_identifier()
self.identifier = new_id
super().save(*args, **kwargs)

@ -190,7 +190,7 @@ class NewInterventionForm(BaseForm):
self.cancel_redirect = reverse("intervention:index")
tmp_intervention = Intervention()
identifier = tmp_intervention._generate_new_identifier()
identifier = tmp_intervention.generate_new_identifier()
self.initialize_form_field("identifier", identifier)
def save(self, user: User, geom_form: SimpleGeomForm):

@ -274,11 +274,11 @@ class Intervention(BaseObject):
"""
if self.identifier is None or len(self.identifier) == 0:
# No identifier given
self.identifier = self._generate_new_identifier()
self.identifier = self.generate_new_identifier()
# Before saving, make sure the set identifier is not used, yet
while Intervention.objects.filter(identifier=self.identifier).exists():
self.identifier = self._generate_new_identifier()
self.identifier = self.generate_new_identifier()
super().save(*args, **kwargs)
def delete(self, using=None, keep_parents=False):

@ -97,9 +97,9 @@ def new_id_view(request: HttpRequest):
"""
tmp_intervention = Intervention()
identifier = tmp_intervention._generate_new_identifier()
identifier = tmp_intervention.generate_new_identifier()
while Intervention.objects.filter(identifier=identifier).exists():
identifier = tmp_intervention._generate_new_identifier()
identifier = tmp_intervention.generate_new_identifier()
return JsonResponse(
data={
"identifier": identifier

@ -285,18 +285,17 @@ class SimpleGeomForm(BaseForm):
Returns:
"""
if self.instance.geometry is None:
geometry = Geometry.objects.create(
geom=self.cleaned_data.get("geom", MultiPolygon(srid=DEFAULT_SRID)),
created=action,
)
self.instance.geometry = geometry
self.instance.save()
else:
try:
geometry = self.instance.geometry
geometry.geom = self.cleaned_data.get("geom", MultiPolygon(srid=DEFAULT_SRID))
geometry.modified = action
geometry.save()
except (AttributeError) as e:
# No geometry or linked instance holding a geometry exist --> create a new one!
geometry = Geometry.objects.create(
geom=self.cleaned_data.get("geom", MultiPolygon(srid=DEFAULT_SRID)),
created=action,
)
return geometry

@ -21,7 +21,7 @@ class Command(BaseCommand):
len_ids = len(identifiers)
while len_ids < max_iterations:
tmp_intervention = Intervention()
_id = tmp_intervention._generate_new_identifier()
_id = tmp_intervention.generate_new_identifier()
len_ids = len(identifiers)
if _id not in identifiers:
if len_ids % (max_iterations/5) == 0:

@ -153,7 +153,7 @@ class BaseObject(BaseResource):
else:
return User.objects.none()
def _generate_new_identifier(self) -> str:
def generate_new_identifier(self) -> str:
""" Generates a new identifier for the intervention object
Returns:

Binary file not shown.

@ -11,15 +11,15 @@
#: intervention/forms/forms.py:53 intervention/forms/forms.py:151
#: intervention/forms/forms.py:163 intervention/forms/modalForms.py:107
#: intervention/forms/modalForms.py:120 intervention/forms/modalForms.py:133
#: konova/forms.py:140 konova/forms.py:244 konova/forms.py:293
#: konova/forms.py:320 konova/forms.py:330 konova/forms.py:343
#: konova/forms.py:355 konova/forms.py:376 user/forms.py:38
#: konova/forms.py:140 konova/forms.py:244 konova/forms.py:311
#: konova/forms.py:338 konova/forms.py:348 konova/forms.py:361
#: konova/forms.py:373 konova/forms.py:394 user/forms.py:38
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-10-04 09:54+0200\n"
"POT-Creation-Date: 2021-10-05 15:19+0200\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"
@ -33,18 +33,18 @@ msgstr ""
msgid "Show only unrecorded"
msgstr "Nur unverzeichnete anzeigen"
#: compensation/forms/forms.py:26 compensation/tables.py:25
#: compensation/forms/forms.py:31 compensation/tables.py:25
#: compensation/tables.py:167 ema/tables.py:28 intervention/forms/forms.py:27
#: intervention/tables.py:23
#: intervention/templates/intervention/detail/includes/compensations.html:30
msgid "Identifier"
msgstr "Kennung"
#: compensation/forms/forms.py:29 intervention/forms/forms.py:30
#: compensation/forms/forms.py:34 intervention/forms/forms.py:30
msgid "Generated automatically"
msgstr "Automatisch generiert"
#: compensation/forms/forms.py:38 compensation/tables.py:30
#: compensation/forms/forms.py:43 compensation/tables.py:30
#: compensation/tables.py:172
#: compensation/templates/compensation/detail/compensation/includes/documents.html:28
#: compensation/templates/compensation/detail/compensation/view.html:31
@ -55,49 +55,34 @@ msgstr "Automatisch generiert"
#: 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:31 konova/forms.py:319
#: intervention/templates/intervention/detail/view.html:31 konova/forms.py:337
msgid "Title"
msgstr "Bezeichnung"
#: compensation/forms/forms.py:40 intervention/forms/forms.py:41
#: compensation/forms/forms.py:45 intervention/forms/forms.py:41
msgid "An explanatory name"
msgstr "Aussagekräftiger Titel"
#: compensation/forms/forms.py:44
#: compensation/forms/forms.py:49
msgid "Compensation XY; Location ABC"
msgstr "Kompensation XY; Flur ABC"
#: compensation/forms/forms.py:50
#: compensation/templates/compensation/detail/compensation/view.html:35
msgid "compensates intervention"
msgstr "kompensiert Eingriff"
#: compensation/forms/forms.py:52
msgid "Select the intervention for which this compensation compensates"
msgstr "Wählen Sie den Eingriff, für den diese Kompensation bestimmt ist"
#: compensation/forms/forms.py:59 intervention/forms/modalForms.py:284
#: intervention/forms/modalForms.py:291 intervention/tables.py:88
#: intervention/templates/intervention/detail/view.html:19
#: konova/templates/konova/home.html:11 templates/navbar.html:22
msgid "Intervention"
msgstr "Eingriff"
#: compensation/forms/forms.py:65
#: compensation/forms/forms.py:55
msgid "Fundings"
msgstr "Förderungen"
#: compensation/forms/forms.py:68
#: compensation/forms/forms.py:58
msgid "Select fundings for this compensation"
msgstr "Wählen Sie ggf. Fördermittelprojekte"
#: compensation/forms/forms.py:77
#: compensation/forms/forms.py:67
msgid "Funding by..."
msgstr "Gefördert mit..."
#: compensation/forms/forms.py:83 compensation/forms/modalForms.py:60
#: compensation/forms/forms.py:73 compensation/forms/modalForms.py:60
#: compensation/forms/modalForms.py:272 compensation/forms/modalForms.py:366
#: compensation/templates/compensation/detail/compensation/includes/actions.html:34
#: compensation/templates/compensation/detail/compensation/includes/comment.html:11
#: compensation/templates/compensation/detail/compensation/includes/deadlines.html:34
#: compensation/templates/compensation/detail/compensation/includes/documents.html:31
#: compensation/templates/compensation/detail/eco_account/includes/actions.html:34
@ -107,22 +92,92 @@ msgstr "Gefördert mit..."
#: ema/templates/ema/detail/includes/deadlines.html:34
#: ema/templates/ema/detail/includes/documents.html:31
#: intervention/forms/forms.py:175 intervention/forms/modalForms.py:132
#: intervention/templates/intervention/detail/includes/comment.html:10
#: intervention/templates/intervention/detail/includes/comment.html:11
#: intervention/templates/intervention/detail/includes/documents.html:31
#: intervention/templates/intervention/detail/includes/payments.html:34
#: intervention/templates/intervention/detail/includes/revocation.html:38
#: konova/forms.py:354
#: konova/forms.py:372
msgid "Comment"
msgstr "Kommentar"
#: compensation/forms/forms.py:85 intervention/forms/forms.py:177
#: compensation/forms/forms.py:75 intervention/forms/forms.py:177
msgid "Additional comment"
msgstr "Zusätzlicher Kommentar"
#: compensation/forms/forms.py:96
#: compensation/forms/forms.py:95
#: compensation/templates/compensation/detail/compensation/view.html:35
msgid "compensates intervention"
msgstr "kompensiert Eingriff"
#: compensation/forms/forms.py:97
msgid "Select the intervention for which this compensation compensates"
msgstr "Wählen Sie den Eingriff, für den diese Kompensation bestimmt ist"
#: compensation/forms/forms.py:104 intervention/forms/modalForms.py:284
#: intervention/forms/modalForms.py:291 intervention/tables.py:88
#: intervention/templates/intervention/detail/view.html:19
#: konova/templates/konova/home.html:11 templates/navbar.html:22
msgid "Intervention"
msgstr "Eingriff"
#: compensation/forms/forms.py:122
msgid "New compensation"
msgstr "Neue Kompensation"
#: compensation/forms/forms.py:177
msgid "Edit compensation"
msgstr "Bearbeite Kompensation"
#: compensation/forms/forms.py:228
#: compensation/templates/compensation/detail/eco_account/view.html:58
#: ema/templates/ema/detail/view.html:42 intervention/forms/forms.py:98
#: intervention/templates/intervention/detail/view.html:56
msgid "Conservation office"
msgstr "Eintragungsstelle"
#: compensation/forms/forms.py:230
msgid "Select the responsible office"
msgstr "Verantwortliche Stelle"
#: compensation/forms/forms.py:243
#: compensation/templates/compensation/detail/eco_account/view.html:62
#: ema/templates/ema/detail/view.html:46 intervention/forms/forms.py:125
#: intervention/templates/intervention/detail/view.html:60
msgid "Conservation office file number"
msgstr "Aktenzeichen Eintragungsstelle"
#: compensation/forms/forms.py:249 intervention/forms/forms.py:131
msgid "ETS-123/ABC.456"
msgstr ""
#: compensation/forms/forms.py:255
msgid "Eco-account handler"
msgstr "Maßnahmenträger"
#: compensation/forms/forms.py:259
msgid "Who handles the eco-account"
msgstr "Wer für die Herrichtung des Ökokontos verantwortlich ist"
#: compensation/forms/forms.py:262 intervention/forms/forms.py:144
msgid "Company Mustermann"
msgstr "Firma Mustermann"
#: compensation/forms/forms.py:270
msgid "Available Surface"
msgstr "Verfügbare Fläche"
#: compensation/forms/forms.py:272
msgid "The amount that can be used for deductions"
msgstr "Die für Abbuchungen zur Verfügung stehende Menge"
#: compensation/forms/forms.py:292
msgid "New Eco-Account"
msgstr "Neues Ökokonto"
#: compensation/forms/forms.py:301
msgid "Eco-Account XY; Location ABC"
msgstr "Ökokonto XY; Flur ABC"
#: compensation/forms/modalForms.py:36
msgid "in Euro"
msgstr "in Euro"
@ -138,7 +193,7 @@ msgstr "Zahlung wird an diesem Datum erwartet"
#: compensation/forms/modalForms.py:62 compensation/forms/modalForms.py:274
#: compensation/forms/modalForms.py:368 intervention/forms/modalForms.py:134
#: konova/forms.py:356
#: konova/forms.py:374
msgid "Additional comment, maximum {} letters"
msgstr "Zusätzlicher Kommentar, maximal {} Zeichen"
@ -532,7 +587,7 @@ msgstr "Dokumente"
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:14
#: ema/templates/ema/detail/includes/documents.html:14
#: intervention/templates/intervention/detail/includes/documents.html:14
#: konova/forms.py:375
#: konova/forms.py:393
msgid "Add new document"
msgstr "Neues Dokument hinzufügen"
@ -624,6 +679,12 @@ msgstr "Verzeichnet am"
msgid "Funded by"
msgstr "Gefördert mit"
#: compensation/templates/compensation/detail/compensation/view.html:79
#: compensation/templates/compensation/detail/eco_account/view.html:78
#: ema/templates/ema/detail/view.html:62
msgid "None"
msgstr ""
#: compensation/templates/compensation/detail/compensation/view.html:84
#: compensation/templates/compensation/detail/eco_account/view.html:83
#: ema/templates/ema/detail/view.html:67
@ -693,91 +754,82 @@ msgstr "Abbuchung entfernen"
msgid "Missing"
msgstr "Fehlt"
#: compensation/templates/compensation/detail/eco_account/view.html:58
#: ema/templates/ema/detail/view.html:42 intervention/forms/forms.py:98
#: intervention/templates/intervention/detail/view.html:56
msgid "Conservation office"
msgstr "Eintragungsstelle"
#: compensation/templates/compensation/detail/eco_account/view.html:62
#: ema/templates/ema/detail/view.html:46 intervention/forms/forms.py:125
#: intervention/templates/intervention/detail/view.html:60
msgid "Conservation office file number"
msgstr "Aktenzeichen Eintragungsstelle"
#: compensation/templates/compensation/detail/eco_account/view.html:66
#: ema/templates/ema/detail/view.html:50 intervention/forms/forms.py:137
#: intervention/templates/intervention/detail/view.html:64
msgid "Intervention handler"
msgstr "Eingriffsverursacher"
#: compensation/templates/compensation/detail/eco_account/view.html:78
#: ema/templates/ema/detail/view.html:62
msgid "None"
msgstr ""
#: compensation/views/compensation_views.py:74
#: compensation/views/compensation_views.py:76
msgid "Compensation {} added"
msgstr "Kompensation {} hinzugefügt"
#: compensation/views/compensation_views.py:179
#: compensation/views/eco_account_views.py:190 ema/views.py:128
#: compensation/views/compensation_views.py:132
msgid "Compensation {} edited"
msgstr "Kompensation {} bearbeitet"
#: compensation/views/compensation_views.py:211
#: compensation/views/eco_account_views.py:248 ema/views.py:128
#: intervention/views.py:428
msgid "Log"
msgstr "Log"
#: compensation/views/compensation_views.py:200
#: compensation/views/compensation_views.py:232
msgid "Compensation removed"
msgstr "Kompensation entfernt"
#: compensation/views/compensation_views.py:219
#: compensation/views/eco_account_views.py:289 ema/views.py:250
#: compensation/views/compensation_views.py:251
#: compensation/views/eco_account_views.py:347 ema/views.py:250
#: intervention/views.py:124
msgid "Document added"
msgstr "Dokument hinzugefügt"
#: compensation/views/compensation_views.py:275
#: compensation/views/eco_account_views.py:233 ema/views.py:194
#: compensation/views/compensation_views.py:307
#: compensation/views/eco_account_views.py:291 ema/views.py:194
msgid "State added"
msgstr "Zustand hinzugefügt"
#: compensation/views/compensation_views.py:294
#: compensation/views/eco_account_views.py:252 ema/views.py:213
#: compensation/views/compensation_views.py:326
#: compensation/views/eco_account_views.py:310 ema/views.py:213
msgid "Action added"
msgstr "Maßnahme hinzugefügt"
#: compensation/views/compensation_views.py:313
#: compensation/views/eco_account_views.py:271 ema/views.py:232
#: compensation/views/compensation_views.py:345
#: compensation/views/eco_account_views.py:329 ema/views.py:232
msgid "Deadline added"
msgstr "Frist/Termin hinzugefügt"
#: compensation/views/compensation_views.py:332
#: compensation/views/compensation_views.py:364
msgid "State removed"
msgstr "Zustand gelöscht"
#: compensation/views/compensation_views.py:351
#: compensation/views/compensation_views.py:383
msgid "Action removed"
msgstr "Maßnahme entfernt"
#: compensation/views/eco_account_views.py:140
#: compensation/views/eco_account_views.py:87
msgid "Eco-Account {} added"
msgstr "Ökokonto {} hinzugefügt"
#: compensation/views/eco_account_views.py:198
msgid "Eco-account removed"
msgstr "Ökokonto entfernt"
#: compensation/views/eco_account_views.py:167
#: compensation/views/eco_account_views.py:225
msgid "Deduction removed"
msgstr "Abbuchung entfernt"
#: compensation/views/eco_account_views.py:210 ema/views.py:171
#: compensation/views/eco_account_views.py:268 ema/views.py:171
#: intervention/views.py:468
msgid "{} unrecorded"
msgstr "{} entzeichnet"
#: compensation/views/eco_account_views.py:210 ema/views.py:171
#: compensation/views/eco_account_views.py:268 ema/views.py:171
#: intervention/views.py:468
msgid "{} recorded"
msgstr "{} verzeichnet"
#: compensation/views/eco_account_views.py:346 intervention/views.py:450
#: compensation/views/eco_account_views.py:404 intervention/views.py:450
msgid "Deduction added"
msgstr "Abbuchung hinzugefügt"
@ -861,18 +913,10 @@ msgstr "Aktenzeichen Zulassungsbehörde"
msgid "ZB-123/ABC.456"
msgstr ""
#: intervention/forms/forms.py:131
msgid "ETS-123/ABC.456"
msgstr ""
#: intervention/forms/forms.py:141
msgid "Who performs the intervention"
msgstr "Wer führt den Eingriff durch"
#: intervention/forms/forms.py:144
msgid "Company Mustermann"
msgstr "Firma Mustermann"
#: intervention/forms/forms.py:150
#: intervention/templates/intervention/detail/view.html:96
msgid "Registration date"
@ -921,7 +965,7 @@ msgstr "Datum des Widerspruchs"
msgid "Document"
msgstr "Dokument"
#: intervention/forms/modalForms.py:122 konova/forms.py:344
#: intervention/forms/modalForms.py:122 konova/forms.py:362
msgid "Must be smaller than 15 Mb"
msgstr "Muss kleiner als 15 Mb sein"
@ -943,7 +987,7 @@ msgstr "Kompensationen und Zahlungen geprüft"
msgid "Run check"
msgstr "Prüfung vornehmen"
#: intervention/forms/modalForms.py:201 konova/forms.py:429
#: intervention/forms/modalForms.py:201 konova/forms.py:447
msgid ""
"I, {} {}, confirm that all necessary control steps have been performed by "
"myself."
@ -1138,15 +1182,15 @@ msgstr "Widerspruch hinzugefügt"
msgid "There are errors on this intervention:"
msgstr "Es liegen Fehler in diesem Eingriff vor:"
#: konova/decorators.py:29
#: konova/decorators.py:30
msgid "You need to be staff to perform this action!"
msgstr "Hierfür müssen Sie Mitarbeiter sein!"
#: konova/decorators.py:44
#: konova/decorators.py:45
msgid "You need to be administrator to perform this action!"
msgstr "Hierfür müssen Sie Administrator sein!"
#: konova/decorators.py:62
#: konova/decorators.py:63
msgid ""
"+++ Attention: You are not part of any group. You won't be able to create, "
"edit or do anything. Please contact an administrator. +++"
@ -1155,19 +1199,15 @@ msgstr ""
"somit nichts eingeben, bearbeiten oder sonstige Aktionen ausführen. "
"Kontaktieren Sie bitte einen Administrator. +++"
#: konova/decorators.py:83 konova/decorators.py:103 konova/decorators.py:123
msgid "You need to be part of another user group."
msgstr "Hierfür müssen Sie einer anderen Nutzergruppe angehören!"
#: konova/forms.py:69
msgid "Not editable"
msgstr "Nicht editierbar"
#: konova/forms.py:139 konova/forms.py:292
#: konova/forms.py:139 konova/forms.py:310
msgid "Confirm"
msgstr "Bestätige"
#: konova/forms.py:151 konova/forms.py:301
#: konova/forms.py:151 konova/forms.py:319
msgid "Remove"
msgstr "Löschen"
@ -1179,44 +1219,44 @@ msgstr "Sie sind dabei {} {} zu löschen"
msgid "Geometry"
msgstr "Geometrie"
#: konova/forms.py:302
#: konova/forms.py:320
msgid "Are you sure?"
msgstr "Sind Sie sicher?"
#: konova/forms.py:329
#: konova/forms.py:347
msgid "Created on"
msgstr "Erstellt"
#: konova/forms.py:331
#: konova/forms.py:349
msgid "When has this file been created? Important for photos."
msgstr "Wann wurde diese Datei erstellt oder das Foto aufgenommen?"
#: konova/forms.py:342
#: konova/forms.py:360
#: venv/lib/python3.7/site-packages/django/db/models/fields/files.py:231
msgid "File"
msgstr "Datei"
#: konova/forms.py:406
#: konova/forms.py:424
msgid "Added document"
msgstr "Dokument hinzugefügt"
#: konova/forms.py:420
#: konova/forms.py:438
msgid "Confirm record"
msgstr "Verzeichnen bestätigen"
#: konova/forms.py:428
#: konova/forms.py:446
msgid "Record data"
msgstr "Daten verzeichnen"
#: konova/forms.py:435
#: konova/forms.py:453
msgid "Confirm unrecord"
msgstr "Entzeichnen bestätigen"
#: konova/forms.py:436
#: konova/forms.py:454
msgid "Unrecord data"
msgstr "Daten entzeichnen"
#: konova/forms.py:437
#: konova/forms.py:455
msgid "I, {} {}, confirm that this data must be unrecorded."
msgstr ""
"Ich, {} {}, bestätige, dass diese Daten wieder entzeichnet werden müssen."
@ -1317,6 +1357,14 @@ msgstr ""
"Die Kennung '{}' musste zu '{}' geändert werden, da ein anderer Eintrag in "
"der Zwischenzeit angelegt wurde, welcher diese Kennung nun bereits verwendet"
#: konova/utils/message_templates.py:14
msgid "This data is not shared with you"
msgstr "Diese Daten sind für Sie nicht freigegeben"
#: konova/utils/message_templates.py:15
msgid "You need to be part of another user group."
msgstr "Hierfür müssen Sie einer anderen Nutzergruppe angehören!"
#: konova/utils/messenger.py:69
msgid "{} checked"
msgstr "{} geprüft"
@ -1452,7 +1500,7 @@ msgstr "Zeitpunkt"
msgid "User"
msgstr "Nutzer"
#: templates/map/geom_form.html:8
#: templates/map/geom_form.html:9
msgid "No geometry added, yet."
msgstr "Keine Geometrie vorhanden"
@ -2849,9 +2897,6 @@ msgstr ""
#~ msgid "Edit eco account"
#~ msgstr "Ökokonto bearbeiten"
#~ msgid "Delete eco account"
#~ msgstr "Ökokonto löschen"
#~ msgid "Add new EMA"
#~ msgstr "Neue EMA hinzufügen"
@ -2885,9 +2930,6 @@ msgstr ""
#~ msgid "Show eco-accounts"
#~ msgstr "Zeige Ökokonten"
#~ msgid "New eco-account"
#~ msgstr "Neues Ökokonto"
#~ msgid "Deduct from eco-account"
#~ msgstr "Von Konto abbuchen"

Loading…
Cancel
Save