#7 New Form
* 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
This commit is contained in:
parent
0342d96a1f
commit
ac665c9268
@ -11,6 +11,7 @@ from compensation.views.eco_account_views import *
|
|||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("", index_view, name="acc-index"),
|
path("", index_view, name="acc-index"),
|
||||||
path('new/', new_view, name='acc-new'),
|
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>', open_view, name='acc-open'),
|
||||||
path('<id>/log', log_view, name='acc-log'),
|
path('<id>/log', log_view, name='acc-log'),
|
||||||
path('<id>/record', record_view, name='acc-record'),
|
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 django import forms
|
||||||
|
|
||||||
from codelist.models import KonovaCode
|
from codelist.models import KonovaCode
|
||||||
from codelist.settings import CODELIST_COMPENSATION_FUNDING_ID
|
from codelist.settings import CODELIST_COMPENSATION_FUNDING_ID, CODELIST_CONSERVATION_OFFICE_ID
|
||||||
from compensation.models import Compensation
|
from compensation.models import Compensation, EcoAccount
|
||||||
from intervention.inputs import GenerateInput
|
from intervention.inputs import GenerateInput
|
||||||
from intervention.models import Intervention
|
from intervention.models import Intervention, ResponsibilityData
|
||||||
from konova.forms import BaseForm, SimpleGeomForm
|
from konova.forms import BaseForm, SimpleGeomForm
|
||||||
from user.models import UserActionLogEntry, UserAction
|
from user.models import UserActionLogEntry, UserAction
|
||||||
|
|
||||||
|
|
||||||
class NewCompensationForm(BaseForm):
|
class AbstractCompensationForm(BaseForm):
|
||||||
""" Form for creating new compensations.
|
""" 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(
|
identifier = forms.CharField(
|
||||||
@ -35,7 +35,7 @@ class NewCompensationForm(BaseForm):
|
|||||||
widget=GenerateInput(
|
widget=GenerateInput(
|
||||||
attrs={
|
attrs={
|
||||||
"class": "form-control",
|
"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(
|
fundings = forms.ModelMultipleChoiceField(
|
||||||
label=_("Fundings"),
|
label=_("Fundings"),
|
||||||
label_suffix="",
|
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):
|
def __init__(self, *args, **kwargs):
|
||||||
intervention_id = kwargs.pop("intervention_id", None)
|
intervention_id = kwargs.pop("intervention_id", None)
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
@ -114,8 +134,9 @@ class NewCompensationForm(BaseForm):
|
|||||||
self.cancel_redirect = reverse("compensation:index")
|
self.cancel_redirect = reverse("compensation:index")
|
||||||
|
|
||||||
tmp = Compensation()
|
tmp = Compensation()
|
||||||
identifier = tmp._generate_new_identifier()
|
identifier = tmp.generate_new_identifier()
|
||||||
self.initialize_form_field("identifier", 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):
|
def save(self, user: User, geom_form: SimpleGeomForm):
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
@ -200,3 +221,124 @@ class EditCompensationForm(NewCompensationForm):
|
|||||||
|
|
||||||
self.instance.log.add(action)
|
self.instance.log.add(action)
|
||||||
return self.instance
|
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):
|
def save(self, *args, **kwargs):
|
||||||
if self.identifier is None or len(self.identifier) == 0:
|
if self.identifier is None or len(self.identifier) == 0:
|
||||||
# Create new identifier
|
# Create new identifier
|
||||||
new_id = self._generate_new_identifier()
|
new_id = self.generate_new_identifier()
|
||||||
while Compensation.objects.filter(identifier=new_id).exists():
|
while Compensation.objects.filter(identifier=new_id).exists():
|
||||||
new_id = self._generate_new_identifier()
|
new_id = self.generate_new_identifier()
|
||||||
self.identifier = new_id
|
self.identifier = new_id
|
||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
|
|
||||||
@ -322,9 +322,9 @@ class EcoAccount(AbstractCompensation):
|
|||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
if self.identifier is None or len(self.identifier) == 0:
|
if self.identifier is None or len(self.identifier) == 0:
|
||||||
# Create new identifier
|
# Create new identifier
|
||||||
new_id = self._generate_new_identifier()
|
new_id = self.generate_new_identifier()
|
||||||
while EcoAccount.objects.filter(identifier=new_id).exists():
|
while EcoAccount.objects.filter(identifier=new_id).exists():
|
||||||
new_id = self._generate_new_identifier()
|
new_id = self.generate_new_identifier()
|
||||||
self.identifier = new_id
|
self.identifier = new_id
|
||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
|
|
||||||
@ -355,28 +355,28 @@ class EcoAccount(AbstractCompensation):
|
|||||||
"""
|
"""
|
||||||
return self.after_states.all().aggregate(Sum("surface"))["surface__sum"] or 0
|
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
|
""" Calculates available rest surface of the eco account
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
as_percentage (bool): Whether to return the result as m² or %
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
ret_val_total (float): Total amount
|
||||||
|
ret_val_relative (float): Amount as percentage (0-100)
|
||||||
"""
|
"""
|
||||||
deductions = self.deductions.filter(
|
deductions = self.deductions.filter(
|
||||||
intervention__deleted=None,
|
intervention__deleted=None,
|
||||||
)
|
)
|
||||||
deductions_surfaces = deductions.aggregate(Sum("surface"))["surface__sum"] or 0
|
deductions_surfaces = deductions.aggregate(Sum("surface"))["surface__sum"] or 0
|
||||||
available_surfaces = self.deductable_surface or deductions_surfaces ## no division by zero
|
available_surfaces = self.deductable_surface or deductions_surfaces ## no division by zero
|
||||||
ret_val = available_surfaces - deductions_surfaces
|
ret_val_total = available_surfaces - deductions_surfaces
|
||||||
|
|
||||||
if as_percentage:
|
|
||||||
if available_surfaces > 0:
|
if available_surfaces > 0:
|
||||||
ret_val = int((ret_val / available_surfaces) * 100)
|
ret_val_relative = int((ret_val_total / available_surfaces) * 100)
|
||||||
else:
|
else:
|
||||||
ret_val = 0
|
ret_val_relative = 0
|
||||||
return ret_val
|
|
||||||
|
return ret_val_total, ret_val_relative
|
||||||
|
|
||||||
def get_LANIS_link(self) -> str:
|
def get_LANIS_link(self) -> str:
|
||||||
""" Generates a link for LANIS depending on the geometry
|
""" Generates a link for LANIS depending on the geometry
|
||||||
|
@ -239,8 +239,8 @@ class EcoAccountTable(BaseTable):
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
value = record.get_available_rest(as_percentage=True)
|
value_total, value_relative = record.get_available_rest()
|
||||||
html = render_to_string("konova/custom_widgets/progressbar.html", {"value": value})
|
html = render_to_string("konova/custom_widgets/progressbar.html", {"value": value_relative})
|
||||||
return format_html(html)
|
return format_html(html)
|
||||||
|
|
||||||
def render_r(self, value, record: EcoAccount):
|
def render_r(self, value, record: EcoAccount):
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{% trans 'Available' %}</th>
|
<th scope="row">{% trans 'Available' %}</th>
|
||||||
<td class="align-middle">
|
<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 %}
|
{% with available as value %}
|
||||||
{% include 'konova/custom_widgets/progressbar.html' %}
|
{% include 'konova/custom_widgets/progressbar.html' %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
@ -97,9 +97,9 @@ def new_id_view(request: HttpRequest):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
tmp = Compensation()
|
tmp = Compensation()
|
||||||
identifier = tmp._generate_new_identifier()
|
identifier = tmp.generate_new_identifier()
|
||||||
while Compensation.objects.filter(identifier=identifier).exists():
|
while Compensation.objects.filter(identifier=identifier).exists():
|
||||||
identifier = tmp._generate_new_identifier()
|
identifier = tmp.generate_new_identifier()
|
||||||
return JsonResponse(
|
return JsonResponse(
|
||||||
data={
|
data={
|
||||||
"identifier": identifier
|
"identifier": identifier
|
||||||
|
@ -5,14 +5,16 @@ Contact: michel.peltriaux@sgdnord.rlp.de
|
|||||||
Created on: 09.08.21
|
Created on: 09.08.21
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
from django.contrib import messages
|
||||||
from django.db.models import Sum
|
from django.db.models import Sum
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
from django.http import HttpRequest, Http404
|
from django.http import HttpRequest, Http404, JsonResponse
|
||||||
from django.shortcuts import render, get_object_or_404
|
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.forms.modalForms import NewStateModalForm, NewActionModalForm, NewDeadlineModalForm
|
||||||
from compensation.models import EcoAccount, EcoAccountDocument
|
from compensation.models import EcoAccount, EcoAccountDocument
|
||||||
from compensation.tables import EcoAccountTable
|
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.forms import RemoveModalForm, SimpleGeomForm, NewDocumentForm, RecordModalForm
|
||||||
from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
|
from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
|
||||||
from konova.utils.documents import get_document, remove_document
|
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
|
from konova.utils.user_checks import in_group
|
||||||
|
|
||||||
|
|
||||||
@ -56,8 +59,62 @@ def index_view(request: HttpRequest):
|
|||||||
@login_required
|
@login_required
|
||||||
@default_group_required
|
@default_group_required
|
||||||
def new_view(request: HttpRequest):
|
def new_view(request: HttpRequest):
|
||||||
# ToDo
|
"""
|
||||||
|
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
|
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
|
@login_required
|
||||||
@ -96,7 +153,7 @@ def open_view(request: HttpRequest, id: str):
|
|||||||
diff_states = abs(sum_before_states - sum_after_states)
|
diff_states = abs(sum_before_states - sum_after_states)
|
||||||
|
|
||||||
# Calculate rest of available surface for deductions
|
# 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(
|
deductions = acc.deductions.filter(
|
||||||
intervention__deleted=None,
|
intervention__deleted=None,
|
||||||
@ -111,7 +168,8 @@ def open_view(request: HttpRequest, id: str):
|
|||||||
"sum_before_states": sum_before_states,
|
"sum_before_states": sum_before_states,
|
||||||
"sum_after_states": sum_after_states,
|
"sum_after_states": sum_after_states,
|
||||||
"diff_states": diff_states,
|
"diff_states": diff_states,
|
||||||
"available": available,
|
"available": available_relative,
|
||||||
|
"available_total": available_total,
|
||||||
"is_default_member": in_group(_user, DEFAULT_GROUP),
|
"is_default_member": in_group(_user, DEFAULT_GROUP),
|
||||||
"is_zb_member": in_group(_user, ZB_GROUP),
|
"is_zb_member": in_group(_user, ZB_GROUP),
|
||||||
"is_ets_member": in_group(_user, ETS_GROUP),
|
"is_ets_member": in_group(_user, ETS_GROUP),
|
||||||
|
@ -49,9 +49,9 @@ class Ema(AbstractCompensation):
|
|||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
if self.identifier is None or len(self.identifier) == 0:
|
if self.identifier is None or len(self.identifier) == 0:
|
||||||
# Create new identifier
|
# Create new identifier
|
||||||
new_id = self._generate_new_identifier()
|
new_id = self.generate_new_identifier()
|
||||||
while Ema.objects.filter(identifier=new_id).exists():
|
while Ema.objects.filter(identifier=new_id).exists():
|
||||||
new_id = self._generate_new_identifier()
|
new_id = self.generate_new_identifier()
|
||||||
self.identifier = new_id
|
self.identifier = new_id
|
||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ class NewInterventionForm(BaseForm):
|
|||||||
self.cancel_redirect = reverse("intervention:index")
|
self.cancel_redirect = reverse("intervention:index")
|
||||||
|
|
||||||
tmp_intervention = Intervention()
|
tmp_intervention = Intervention()
|
||||||
identifier = tmp_intervention._generate_new_identifier()
|
identifier = tmp_intervention.generate_new_identifier()
|
||||||
self.initialize_form_field("identifier", identifier)
|
self.initialize_form_field("identifier", identifier)
|
||||||
|
|
||||||
def save(self, user: User, geom_form: SimpleGeomForm):
|
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:
|
if self.identifier is None or len(self.identifier) == 0:
|
||||||
# No identifier given
|
# 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
|
# Before saving, make sure the set identifier is not used, yet
|
||||||
while Intervention.objects.filter(identifier=self.identifier).exists():
|
while Intervention.objects.filter(identifier=self.identifier).exists():
|
||||||
self.identifier = self._generate_new_identifier()
|
self.identifier = self.generate_new_identifier()
|
||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
|
|
||||||
def delete(self, using=None, keep_parents=False):
|
def delete(self, using=None, keep_parents=False):
|
||||||
|
@ -97,9 +97,9 @@ def new_id_view(request: HttpRequest):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
tmp_intervention = Intervention()
|
tmp_intervention = Intervention()
|
||||||
identifier = tmp_intervention._generate_new_identifier()
|
identifier = tmp_intervention.generate_new_identifier()
|
||||||
while Intervention.objects.filter(identifier=identifier).exists():
|
while Intervention.objects.filter(identifier=identifier).exists():
|
||||||
identifier = tmp_intervention._generate_new_identifier()
|
identifier = tmp_intervention.generate_new_identifier()
|
||||||
return JsonResponse(
|
return JsonResponse(
|
||||||
data={
|
data={
|
||||||
"identifier": identifier
|
"identifier": identifier
|
||||||
|
@ -285,18 +285,17 @@ class SimpleGeomForm(BaseForm):
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if self.instance.geometry is None:
|
try:
|
||||||
geometry = Geometry.objects.create(
|
|
||||||
geom=self.cleaned_data.get("geom", MultiPolygon(srid=DEFAULT_SRID)),
|
|
||||||
created=action,
|
|
||||||
)
|
|
||||||
self.instance.geometry = geometry
|
|
||||||
self.instance.save()
|
|
||||||
else:
|
|
||||||
geometry = self.instance.geometry
|
geometry = self.instance.geometry
|
||||||
geometry.geom = self.cleaned_data.get("geom", MultiPolygon(srid=DEFAULT_SRID))
|
geometry.geom = self.cleaned_data.get("geom", MultiPolygon(srid=DEFAULT_SRID))
|
||||||
geometry.modified = action
|
geometry.modified = action
|
||||||
geometry.save()
|
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
|
return geometry
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ class Command(BaseCommand):
|
|||||||
len_ids = len(identifiers)
|
len_ids = len(identifiers)
|
||||||
while len_ids < max_iterations:
|
while len_ids < max_iterations:
|
||||||
tmp_intervention = Intervention()
|
tmp_intervention = Intervention()
|
||||||
_id = tmp_intervention._generate_new_identifier()
|
_id = tmp_intervention.generate_new_identifier()
|
||||||
len_ids = len(identifiers)
|
len_ids = len(identifiers)
|
||||||
if _id not in identifiers:
|
if _id not in identifiers:
|
||||||
if len_ids % (max_iterations/5) == 0:
|
if len_ids % (max_iterations/5) == 0:
|
||||||
|
@ -153,7 +153,7 @@ class BaseObject(BaseResource):
|
|||||||
else:
|
else:
|
||||||
return User.objects.none()
|
return User.objects.none()
|
||||||
|
|
||||||
def _generate_new_identifier(self) -> str:
|
def generate_new_identifier(self) -> str:
|
||||||
""" Generates a new identifier for the intervention object
|
""" Generates a new identifier for the intervention object
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
Binary file not shown.
@ -11,15 +11,15 @@
|
|||||||
#: intervention/forms/forms.py:53 intervention/forms/forms.py:151
|
#: intervention/forms/forms.py:53 intervention/forms/forms.py:151
|
||||||
#: intervention/forms/forms.py:163 intervention/forms/modalForms.py:107
|
#: intervention/forms/forms.py:163 intervention/forms/modalForms.py:107
|
||||||
#: intervention/forms/modalForms.py:120 intervention/forms/modalForms.py:133
|
#: 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:140 konova/forms.py:244 konova/forms.py:311
|
||||||
#: konova/forms.py:320 konova/forms.py:330 konova/forms.py:343
|
#: konova/forms.py:338 konova/forms.py:348 konova/forms.py:361
|
||||||
#: konova/forms.py:355 konova/forms.py:376 user/forms.py:38
|
#: konova/forms.py:373 konova/forms.py:394 user/forms.py:38
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \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"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -33,18 +33,18 @@ msgstr ""
|
|||||||
msgid "Show only unrecorded"
|
msgid "Show only unrecorded"
|
||||||
msgstr "Nur unverzeichnete anzeigen"
|
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
|
#: compensation/tables.py:167 ema/tables.py:28 intervention/forms/forms.py:27
|
||||||
#: intervention/tables.py:23
|
#: intervention/tables.py:23
|
||||||
#: intervention/templates/intervention/detail/includes/compensations.html:30
|
#: intervention/templates/intervention/detail/includes/compensations.html:30
|
||||||
msgid "Identifier"
|
msgid "Identifier"
|
||||||
msgstr "Kennung"
|
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"
|
msgid "Generated automatically"
|
||||||
msgstr "Automatisch generiert"
|
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/tables.py:172
|
||||||
#: compensation/templates/compensation/detail/compensation/includes/documents.html:28
|
#: compensation/templates/compensation/detail/compensation/includes/documents.html:28
|
||||||
#: compensation/templates/compensation/detail/compensation/view.html:31
|
#: compensation/templates/compensation/detail/compensation/view.html:31
|
||||||
@ -55,49 +55,34 @@ msgstr "Automatisch generiert"
|
|||||||
#: intervention/tables.py:28
|
#: intervention/tables.py:28
|
||||||
#: intervention/templates/intervention/detail/includes/compensations.html:33
|
#: intervention/templates/intervention/detail/includes/compensations.html:33
|
||||||
#: intervention/templates/intervention/detail/includes/documents.html:28
|
#: 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"
|
msgid "Title"
|
||||||
msgstr "Bezeichnung"
|
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"
|
msgid "An explanatory name"
|
||||||
msgstr "Aussagekräftiger Titel"
|
msgstr "Aussagekräftiger Titel"
|
||||||
|
|
||||||
#: compensation/forms/forms.py:44
|
#: compensation/forms/forms.py:49
|
||||||
msgid "Compensation XY; Location ABC"
|
msgid "Compensation XY; Location ABC"
|
||||||
msgstr "Kompensation XY; Flur ABC"
|
msgstr "Kompensation XY; Flur ABC"
|
||||||
|
|
||||||
#: compensation/forms/forms.py:50
|
#: compensation/forms/forms.py:55
|
||||||
#: 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
|
|
||||||
msgid "Fundings"
|
msgid "Fundings"
|
||||||
msgstr "Förderungen"
|
msgstr "Förderungen"
|
||||||
|
|
||||||
#: compensation/forms/forms.py:68
|
#: compensation/forms/forms.py:58
|
||||||
msgid "Select fundings for this compensation"
|
msgid "Select fundings for this compensation"
|
||||||
msgstr "Wählen Sie ggf. Fördermittelprojekte"
|
msgstr "Wählen Sie ggf. Fördermittelprojekte"
|
||||||
|
|
||||||
#: compensation/forms/forms.py:77
|
#: compensation/forms/forms.py:67
|
||||||
msgid "Funding by..."
|
msgid "Funding by..."
|
||||||
msgstr "Gefördert mit..."
|
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/forms/modalForms.py:272 compensation/forms/modalForms.py:366
|
||||||
#: compensation/templates/compensation/detail/compensation/includes/actions.html:34
|
#: 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/deadlines.html:34
|
||||||
#: compensation/templates/compensation/detail/compensation/includes/documents.html:31
|
#: compensation/templates/compensation/detail/compensation/includes/documents.html:31
|
||||||
#: compensation/templates/compensation/detail/eco_account/includes/actions.html:34
|
#: 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/deadlines.html:34
|
||||||
#: ema/templates/ema/detail/includes/documents.html:31
|
#: ema/templates/ema/detail/includes/documents.html:31
|
||||||
#: intervention/forms/forms.py:175 intervention/forms/modalForms.py:132
|
#: 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/documents.html:31
|
||||||
#: intervention/templates/intervention/detail/includes/payments.html:34
|
#: intervention/templates/intervention/detail/includes/payments.html:34
|
||||||
#: intervention/templates/intervention/detail/includes/revocation.html:38
|
#: intervention/templates/intervention/detail/includes/revocation.html:38
|
||||||
#: konova/forms.py:354
|
#: konova/forms.py:372
|
||||||
msgid "Comment"
|
msgid "Comment"
|
||||||
msgstr "Kommentar"
|
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"
|
msgid "Additional comment"
|
||||||
msgstr "Zusätzlicher Kommentar"
|
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"
|
msgid "New compensation"
|
||||||
msgstr "Neue Kompensation"
|
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
|
#: compensation/forms/modalForms.py:36
|
||||||
msgid "in Euro"
|
msgid "in Euro"
|
||||||
msgstr "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:62 compensation/forms/modalForms.py:274
|
||||||
#: compensation/forms/modalForms.py:368 intervention/forms/modalForms.py:134
|
#: compensation/forms/modalForms.py:368 intervention/forms/modalForms.py:134
|
||||||
#: konova/forms.py:356
|
#: konova/forms.py:374
|
||||||
msgid "Additional comment, maximum {} letters"
|
msgid "Additional comment, maximum {} letters"
|
||||||
msgstr "Zusätzlicher Kommentar, maximal {} Zeichen"
|
msgstr "Zusätzlicher Kommentar, maximal {} Zeichen"
|
||||||
|
|
||||||
@ -532,7 +587,7 @@ msgstr "Dokumente"
|
|||||||
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:14
|
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:14
|
||||||
#: ema/templates/ema/detail/includes/documents.html:14
|
#: ema/templates/ema/detail/includes/documents.html:14
|
||||||
#: intervention/templates/intervention/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"
|
msgid "Add new document"
|
||||||
msgstr "Neues Dokument hinzufügen"
|
msgstr "Neues Dokument hinzufügen"
|
||||||
|
|
||||||
@ -624,6 +679,12 @@ msgstr "Verzeichnet am"
|
|||||||
msgid "Funded by"
|
msgid "Funded by"
|
||||||
msgstr "Gefördert mit"
|
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/compensation/view.html:84
|
||||||
#: compensation/templates/compensation/detail/eco_account/view.html:83
|
#: compensation/templates/compensation/detail/eco_account/view.html:83
|
||||||
#: ema/templates/ema/detail/view.html:67
|
#: ema/templates/ema/detail/view.html:67
|
||||||
@ -693,91 +754,82 @@ msgstr "Abbuchung entfernen"
|
|||||||
msgid "Missing"
|
msgid "Missing"
|
||||||
msgstr "Fehlt"
|
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
|
#: compensation/templates/compensation/detail/eco_account/view.html:66
|
||||||
#: ema/templates/ema/detail/view.html:50 intervention/forms/forms.py:137
|
#: ema/templates/ema/detail/view.html:50 intervention/forms/forms.py:137
|
||||||
#: intervention/templates/intervention/detail/view.html:64
|
#: intervention/templates/intervention/detail/view.html:64
|
||||||
msgid "Intervention handler"
|
msgid "Intervention handler"
|
||||||
msgstr "Eingriffsverursacher"
|
msgstr "Eingriffsverursacher"
|
||||||
|
|
||||||
#: compensation/templates/compensation/detail/eco_account/view.html:78
|
#: compensation/views/compensation_views.py:76
|
||||||
#: ema/templates/ema/detail/view.html:62
|
|
||||||
msgid "None"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: compensation/views/compensation_views.py:74
|
|
||||||
msgid "Compensation {} added"
|
msgid "Compensation {} added"
|
||||||
msgstr "Kompensation {} hinzugefügt"
|
msgstr "Kompensation {} hinzugefügt"
|
||||||
|
|
||||||
#: compensation/views/compensation_views.py:179
|
#: compensation/views/compensation_views.py:132
|
||||||
#: compensation/views/eco_account_views.py:190 ema/views.py:128
|
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
|
#: intervention/views.py:428
|
||||||
msgid "Log"
|
msgid "Log"
|
||||||
msgstr "Log"
|
msgstr "Log"
|
||||||
|
|
||||||
#: compensation/views/compensation_views.py:200
|
#: compensation/views/compensation_views.py:232
|
||||||
msgid "Compensation removed"
|
msgid "Compensation removed"
|
||||||
msgstr "Kompensation entfernt"
|
msgstr "Kompensation entfernt"
|
||||||
|
|
||||||
#: compensation/views/compensation_views.py:219
|
#: compensation/views/compensation_views.py:251
|
||||||
#: compensation/views/eco_account_views.py:289 ema/views.py:250
|
#: compensation/views/eco_account_views.py:347 ema/views.py:250
|
||||||
#: intervention/views.py:124
|
#: intervention/views.py:124
|
||||||
msgid "Document added"
|
msgid "Document added"
|
||||||
msgstr "Dokument hinzugefügt"
|
msgstr "Dokument hinzugefügt"
|
||||||
|
|
||||||
#: compensation/views/compensation_views.py:275
|
#: compensation/views/compensation_views.py:307
|
||||||
#: compensation/views/eco_account_views.py:233 ema/views.py:194
|
#: compensation/views/eco_account_views.py:291 ema/views.py:194
|
||||||
msgid "State added"
|
msgid "State added"
|
||||||
msgstr "Zustand hinzugefügt"
|
msgstr "Zustand hinzugefügt"
|
||||||
|
|
||||||
#: compensation/views/compensation_views.py:294
|
#: compensation/views/compensation_views.py:326
|
||||||
#: compensation/views/eco_account_views.py:252 ema/views.py:213
|
#: compensation/views/eco_account_views.py:310 ema/views.py:213
|
||||||
msgid "Action added"
|
msgid "Action added"
|
||||||
msgstr "Maßnahme hinzugefügt"
|
msgstr "Maßnahme hinzugefügt"
|
||||||
|
|
||||||
#: compensation/views/compensation_views.py:313
|
#: compensation/views/compensation_views.py:345
|
||||||
#: compensation/views/eco_account_views.py:271 ema/views.py:232
|
#: compensation/views/eco_account_views.py:329 ema/views.py:232
|
||||||
msgid "Deadline added"
|
msgid "Deadline added"
|
||||||
msgstr "Frist/Termin hinzugefügt"
|
msgstr "Frist/Termin hinzugefügt"
|
||||||
|
|
||||||
#: compensation/views/compensation_views.py:332
|
#: compensation/views/compensation_views.py:364
|
||||||
msgid "State removed"
|
msgid "State removed"
|
||||||
msgstr "Zustand gelöscht"
|
msgstr "Zustand gelöscht"
|
||||||
|
|
||||||
#: compensation/views/compensation_views.py:351
|
#: compensation/views/compensation_views.py:383
|
||||||
msgid "Action removed"
|
msgid "Action removed"
|
||||||
msgstr "Maßnahme entfernt"
|
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"
|
msgid "Eco-account removed"
|
||||||
msgstr "Ökokonto entfernt"
|
msgstr "Ökokonto entfernt"
|
||||||
|
|
||||||
#: compensation/views/eco_account_views.py:167
|
#: compensation/views/eco_account_views.py:225
|
||||||
msgid "Deduction removed"
|
msgid "Deduction removed"
|
||||||
msgstr "Abbuchung entfernt"
|
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
|
#: intervention/views.py:468
|
||||||
msgid "{} unrecorded"
|
msgid "{} unrecorded"
|
||||||
msgstr "{} entzeichnet"
|
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
|
#: intervention/views.py:468
|
||||||
msgid "{} recorded"
|
msgid "{} recorded"
|
||||||
msgstr "{} verzeichnet"
|
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"
|
msgid "Deduction added"
|
||||||
msgstr "Abbuchung hinzugefügt"
|
msgstr "Abbuchung hinzugefügt"
|
||||||
|
|
||||||
@ -861,18 +913,10 @@ msgstr "Aktenzeichen Zulassungsbehörde"
|
|||||||
msgid "ZB-123/ABC.456"
|
msgid "ZB-123/ABC.456"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: intervention/forms/forms.py:131
|
|
||||||
msgid "ETS-123/ABC.456"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: intervention/forms/forms.py:141
|
#: intervention/forms/forms.py:141
|
||||||
msgid "Who performs the intervention"
|
msgid "Who performs the intervention"
|
||||||
msgstr "Wer führt den Eingriff durch"
|
msgstr "Wer führt den Eingriff durch"
|
||||||
|
|
||||||
#: intervention/forms/forms.py:144
|
|
||||||
msgid "Company Mustermann"
|
|
||||||
msgstr "Firma Mustermann"
|
|
||||||
|
|
||||||
#: intervention/forms/forms.py:150
|
#: intervention/forms/forms.py:150
|
||||||
#: intervention/templates/intervention/detail/view.html:96
|
#: intervention/templates/intervention/detail/view.html:96
|
||||||
msgid "Registration date"
|
msgid "Registration date"
|
||||||
@ -921,7 +965,7 @@ msgstr "Datum des Widerspruchs"
|
|||||||
msgid "Document"
|
msgid "Document"
|
||||||
msgstr "Dokument"
|
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"
|
msgid "Must be smaller than 15 Mb"
|
||||||
msgstr "Muss kleiner als 15 Mb sein"
|
msgstr "Muss kleiner als 15 Mb sein"
|
||||||
|
|
||||||
@ -943,7 +987,7 @@ msgstr "Kompensationen und Zahlungen geprüft"
|
|||||||
msgid "Run check"
|
msgid "Run check"
|
||||||
msgstr "Prüfung vornehmen"
|
msgstr "Prüfung vornehmen"
|
||||||
|
|
||||||
#: intervention/forms/modalForms.py:201 konova/forms.py:429
|
#: intervention/forms/modalForms.py:201 konova/forms.py:447
|
||||||
msgid ""
|
msgid ""
|
||||||
"I, {} {}, confirm that all necessary control steps have been performed by "
|
"I, {} {}, confirm that all necessary control steps have been performed by "
|
||||||
"myself."
|
"myself."
|
||||||
@ -1138,15 +1182,15 @@ msgstr "Widerspruch hinzugefügt"
|
|||||||
msgid "There are errors on this intervention:"
|
msgid "There are errors on this intervention:"
|
||||||
msgstr "Es liegen Fehler in diesem Eingriff vor:"
|
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!"
|
msgid "You need to be staff to perform this action!"
|
||||||
msgstr "Hierfür müssen Sie Mitarbeiter sein!"
|
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!"
|
msgid "You need to be administrator to perform this action!"
|
||||||
msgstr "Hierfür müssen Sie Administrator sein!"
|
msgstr "Hierfür müssen Sie Administrator sein!"
|
||||||
|
|
||||||
#: konova/decorators.py:62
|
#: konova/decorators.py:63
|
||||||
msgid ""
|
msgid ""
|
||||||
"+++ Attention: You are not part of any group. You won't be able to create, "
|
"+++ Attention: You are not part of any group. You won't be able to create, "
|
||||||
"edit or do anything. Please contact an administrator. +++"
|
"edit or do anything. Please contact an administrator. +++"
|
||||||
@ -1155,19 +1199,15 @@ msgstr ""
|
|||||||
"somit nichts eingeben, bearbeiten oder sonstige Aktionen ausführen. "
|
"somit nichts eingeben, bearbeiten oder sonstige Aktionen ausführen. "
|
||||||
"Kontaktieren Sie bitte einen Administrator. +++"
|
"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
|
#: konova/forms.py:69
|
||||||
msgid "Not editable"
|
msgid "Not editable"
|
||||||
msgstr "Nicht editierbar"
|
msgstr "Nicht editierbar"
|
||||||
|
|
||||||
#: konova/forms.py:139 konova/forms.py:292
|
#: konova/forms.py:139 konova/forms.py:310
|
||||||
msgid "Confirm"
|
msgid "Confirm"
|
||||||
msgstr "Bestätige"
|
msgstr "Bestätige"
|
||||||
|
|
||||||
#: konova/forms.py:151 konova/forms.py:301
|
#: konova/forms.py:151 konova/forms.py:319
|
||||||
msgid "Remove"
|
msgid "Remove"
|
||||||
msgstr "Löschen"
|
msgstr "Löschen"
|
||||||
|
|
||||||
@ -1179,44 +1219,44 @@ msgstr "Sie sind dabei {} {} zu löschen"
|
|||||||
msgid "Geometry"
|
msgid "Geometry"
|
||||||
msgstr "Geometrie"
|
msgstr "Geometrie"
|
||||||
|
|
||||||
#: konova/forms.py:302
|
#: konova/forms.py:320
|
||||||
msgid "Are you sure?"
|
msgid "Are you sure?"
|
||||||
msgstr "Sind Sie sicher?"
|
msgstr "Sind Sie sicher?"
|
||||||
|
|
||||||
#: konova/forms.py:329
|
#: konova/forms.py:347
|
||||||
msgid "Created on"
|
msgid "Created on"
|
||||||
msgstr "Erstellt"
|
msgstr "Erstellt"
|
||||||
|
|
||||||
#: konova/forms.py:331
|
#: konova/forms.py:349
|
||||||
msgid "When has this file been created? Important for photos."
|
msgid "When has this file been created? Important for photos."
|
||||||
msgstr "Wann wurde diese Datei erstellt oder das Foto aufgenommen?"
|
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
|
#: venv/lib/python3.7/site-packages/django/db/models/fields/files.py:231
|
||||||
msgid "File"
|
msgid "File"
|
||||||
msgstr "Datei"
|
msgstr "Datei"
|
||||||
|
|
||||||
#: konova/forms.py:406
|
#: konova/forms.py:424
|
||||||
msgid "Added document"
|
msgid "Added document"
|
||||||
msgstr "Dokument hinzugefügt"
|
msgstr "Dokument hinzugefügt"
|
||||||
|
|
||||||
#: konova/forms.py:420
|
#: konova/forms.py:438
|
||||||
msgid "Confirm record"
|
msgid "Confirm record"
|
||||||
msgstr "Verzeichnen bestätigen"
|
msgstr "Verzeichnen bestätigen"
|
||||||
|
|
||||||
#: konova/forms.py:428
|
#: konova/forms.py:446
|
||||||
msgid "Record data"
|
msgid "Record data"
|
||||||
msgstr "Daten verzeichnen"
|
msgstr "Daten verzeichnen"
|
||||||
|
|
||||||
#: konova/forms.py:435
|
#: konova/forms.py:453
|
||||||
msgid "Confirm unrecord"
|
msgid "Confirm unrecord"
|
||||||
msgstr "Entzeichnen bestätigen"
|
msgstr "Entzeichnen bestätigen"
|
||||||
|
|
||||||
#: konova/forms.py:436
|
#: konova/forms.py:454
|
||||||
msgid "Unrecord data"
|
msgid "Unrecord data"
|
||||||
msgstr "Daten entzeichnen"
|
msgstr "Daten entzeichnen"
|
||||||
|
|
||||||
#: konova/forms.py:437
|
#: konova/forms.py:455
|
||||||
msgid "I, {} {}, confirm that this data must be unrecorded."
|
msgid "I, {} {}, confirm that this data must be unrecorded."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Ich, {} {}, bestätige, dass diese Daten wieder entzeichnet werden müssen."
|
"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 "
|
"Die Kennung '{}' musste zu '{}' geändert werden, da ein anderer Eintrag in "
|
||||||
"der Zwischenzeit angelegt wurde, welcher diese Kennung nun bereits verwendet"
|
"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
|
#: konova/utils/messenger.py:69
|
||||||
msgid "{} checked"
|
msgid "{} checked"
|
||||||
msgstr "{} geprüft"
|
msgstr "{} geprüft"
|
||||||
@ -1452,7 +1500,7 @@ msgstr "Zeitpunkt"
|
|||||||
msgid "User"
|
msgid "User"
|
||||||
msgstr "Nutzer"
|
msgstr "Nutzer"
|
||||||
|
|
||||||
#: templates/map/geom_form.html:8
|
#: templates/map/geom_form.html:9
|
||||||
msgid "No geometry added, yet."
|
msgid "No geometry added, yet."
|
||||||
msgstr "Keine Geometrie vorhanden"
|
msgstr "Keine Geometrie vorhanden"
|
||||||
|
|
||||||
@ -2849,9 +2897,6 @@ msgstr ""
|
|||||||
#~ msgid "Edit eco account"
|
#~ msgid "Edit eco account"
|
||||||
#~ msgstr "Ökokonto bearbeiten"
|
#~ msgstr "Ökokonto bearbeiten"
|
||||||
|
|
||||||
#~ msgid "Delete eco account"
|
|
||||||
#~ msgstr "Ökokonto löschen"
|
|
||||||
|
|
||||||
#~ msgid "Add new EMA"
|
#~ msgid "Add new EMA"
|
||||||
#~ msgstr "Neue EMA hinzufügen"
|
#~ msgstr "Neue EMA hinzufügen"
|
||||||
|
|
||||||
@ -2885,9 +2930,6 @@ msgstr ""
|
|||||||
#~ msgid "Show eco-accounts"
|
#~ msgid "Show eco-accounts"
|
||||||
#~ msgstr "Zeige Ökokonten"
|
#~ msgstr "Zeige Ökokonten"
|
||||||
|
|
||||||
#~ msgid "New eco-account"
|
|
||||||
#~ msgstr "Neues Ökokonto"
|
|
||||||
|
|
||||||
#~ msgid "Deduct from eco-account"
|
#~ msgid "Deduct from eco-account"
|
||||||
#~ msgstr "Von Konto abbuchen"
|
#~ msgstr "Von Konto abbuchen"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user