Compare commits
5 Commits
631b5d0ea6
...
d33cf5ad4e
Author | SHA1 | Date | |
---|---|---|---|
|
d33cf5ad4e | ||
|
24a6b7fd37 | ||
|
2469bde7ee | ||
|
e9aea7bcc4 | ||
|
41c9ed106c |
0
codelist/__init__.py
Normal file
0
codelist/__init__.py
Normal file
36
codelist/admin.py
Normal file
36
codelist/admin.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
from django.contrib import admin
|
||||||
|
|
||||||
|
from codelist.models import KonovaCode, KonovaCodeList
|
||||||
|
|
||||||
|
|
||||||
|
class KonovaCodeListAdmin(admin.ModelAdmin):
|
||||||
|
list_display = [
|
||||||
|
"id",
|
||||||
|
]
|
||||||
|
readonly_fields = [
|
||||||
|
"id",
|
||||||
|
"codes",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
class KonovaCodeAdmin(admin.ModelAdmin):
|
||||||
|
list_display = [
|
||||||
|
"id",
|
||||||
|
"parent",
|
||||||
|
"short_name",
|
||||||
|
"long_name",
|
||||||
|
"is_leaf",
|
||||||
|
"is_active",
|
||||||
|
]
|
||||||
|
|
||||||
|
readonly_fields = [
|
||||||
|
"id",
|
||||||
|
"short_name",
|
||||||
|
"long_name",
|
||||||
|
"is_leaf",
|
||||||
|
"parent",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
#admin.site.register(KonovaCodeList, KonovaCodeListAdmin)
|
||||||
|
admin.site.register(KonovaCode, KonovaCodeAdmin)
|
5
codelist/apps.py
Normal file
5
codelist/apps.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class CodelistConfig(AppConfig):
|
||||||
|
name = 'codelist'
|
157
codelist/management/commands/update_codelist.py
Normal file
157
codelist/management/commands/update_codelist.py
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
"""
|
||||||
|
Author: Michel Peltriaux
|
||||||
|
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
||||||
|
Contact: michel.peltriaux@sgdnord.rlp.de
|
||||||
|
Created on: 23.08.21
|
||||||
|
|
||||||
|
"""
|
||||||
|
import requests
|
||||||
|
from django.core.management import BaseCommand
|
||||||
|
from xml.etree import ElementTree as etree
|
||||||
|
|
||||||
|
from codelist.models import KonovaCode, KonovaCodeList
|
||||||
|
from codelist.settings import CODELIST_INTERVENTION_HANDLER_ID, CODELIST_CONSERVATION_OFFICE_ID, \
|
||||||
|
CODELIST_REGISTRATION_OFFICE_ID, CODELIST_BIOTOPES_ID, CODELIST_LAW_ID, CODELIST_COMPENSATION_HANDLER_ID, \
|
||||||
|
CODELIST_COMPENSATION_ACTION_ID, CODELIST_COMPENSATION_ACTION_CLASS_ID, CODELIST_COMPENSATION_ADDITIONAL_TYPE_ID, \
|
||||||
|
CODELIST_COMPENSATION_COMBINATION_ID, CODELIST_BASE_URL
|
||||||
|
|
||||||
|
|
||||||
|
class Command(BaseCommand):
|
||||||
|
help = "Performs test on collisions using the identifier generation"
|
||||||
|
|
||||||
|
def handle(self, *args, **options):
|
||||||
|
try:
|
||||||
|
codelist_ids = [
|
||||||
|
CODELIST_INTERVENTION_HANDLER_ID,
|
||||||
|
CODELIST_CONSERVATION_OFFICE_ID,
|
||||||
|
CODELIST_REGISTRATION_OFFICE_ID,
|
||||||
|
CODELIST_BIOTOPES_ID,
|
||||||
|
CODELIST_LAW_ID,
|
||||||
|
CODELIST_COMPENSATION_HANDLER_ID,
|
||||||
|
CODELIST_COMPENSATION_ACTION_ID,
|
||||||
|
CODELIST_COMPENSATION_ACTION_CLASS_ID,
|
||||||
|
CODELIST_COMPENSATION_ADDITIONAL_TYPE_ID,
|
||||||
|
CODELIST_COMPENSATION_COMBINATION_ID,
|
||||||
|
]
|
||||||
|
self._write_warning("Fetching codes...")
|
||||||
|
|
||||||
|
for list_id in codelist_ids:
|
||||||
|
_url = CODELIST_BASE_URL + "/" + str(list_id)
|
||||||
|
result = requests.get(url=_url)
|
||||||
|
|
||||||
|
if result.status_code != 200:
|
||||||
|
self._write_error("Error on codelist url '{}'".format(_url))
|
||||||
|
continue
|
||||||
|
self._write_warning("Fetch codes for list id {}".format(list_id))
|
||||||
|
content = result.content.decode("utf-8")
|
||||||
|
root = etree.fromstring(content)
|
||||||
|
items = root.findall("item")
|
||||||
|
self._write_warning("Found {} codes. Process now...".format(len(items)))
|
||||||
|
|
||||||
|
code_list = KonovaCodeList.objects.get_or_create(
|
||||||
|
id=list_id,
|
||||||
|
)[0]
|
||||||
|
self._rec_xml_code_fetch(
|
||||||
|
items=items,
|
||||||
|
code_list=code_list,
|
||||||
|
parent=None,
|
||||||
|
)
|
||||||
|
"""
|
||||||
|
for element in items:
|
||||||
|
atom_id = element.find("atomid").text
|
||||||
|
parent = element.find("vaterid").text
|
||||||
|
short_name = element.find("shortname").text
|
||||||
|
long_name = element.find("longname").text
|
||||||
|
is_archived = bool(element.find("archive").text)
|
||||||
|
|
||||||
|
# If a parent has been set, we need to fetch/create this entry. Otherwise ("0") we ignore it.
|
||||||
|
if parent == "0":
|
||||||
|
parent = None
|
||||||
|
else:
|
||||||
|
parent = KonovaCode.objects.get_or_create(
|
||||||
|
id=parent,
|
||||||
|
)[0]
|
||||||
|
|
||||||
|
code = KonovaCode.objects.get_or_create(
|
||||||
|
id=atom_id,
|
||||||
|
)
|
||||||
|
created = code[1]
|
||||||
|
if created:
|
||||||
|
num_created += 1
|
||||||
|
else:
|
||||||
|
num_updated += 1
|
||||||
|
code = code[0]
|
||||||
|
code.short_name = short_name
|
||||||
|
code.long_name = long_name
|
||||||
|
code.parent = parent
|
||||||
|
code.is_active = is_archived
|
||||||
|
|
||||||
|
code.save()
|
||||||
|
if code not in code_list.codes.all():
|
||||||
|
code_list.codes.add(code)
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
self._break_line()
|
||||||
|
exit(-1)
|
||||||
|
|
||||||
|
def _rec_xml_code_fetch(self, items: list, code_list: KonovaCodeList, parent: KonovaCode):
|
||||||
|
if items is None:
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
for element in items:
|
||||||
|
children = element.find("items")
|
||||||
|
atom_id = element.find("atomid").text
|
||||||
|
short_name = element.find("shortname").text
|
||||||
|
long_name = element.find("longname").text
|
||||||
|
is_archived = bool(element.find("archive").text)
|
||||||
|
|
||||||
|
code = KonovaCode.objects.get_or_create(
|
||||||
|
id=atom_id,
|
||||||
|
)
|
||||||
|
code = code[0]
|
||||||
|
code.short_name = short_name
|
||||||
|
code.long_name = long_name
|
||||||
|
code.parent = parent
|
||||||
|
code.is_active = is_archived
|
||||||
|
code.is_leaf = children is None
|
||||||
|
|
||||||
|
code.save()
|
||||||
|
if code not in code_list.codes.all():
|
||||||
|
code_list.codes.add(code)
|
||||||
|
|
||||||
|
self._rec_xml_code_fetch(
|
||||||
|
items=children,
|
||||||
|
code_list=code_list,
|
||||||
|
parent=code
|
||||||
|
)
|
||||||
|
|
||||||
|
def _break_line(self):
|
||||||
|
""" Simply prints a line break
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
"""
|
||||||
|
self.stdout.write("\n")
|
||||||
|
|
||||||
|
def _write_warning(self, txt: str):
|
||||||
|
self.stdout.write(
|
||||||
|
self.style.WARNING(
|
||||||
|
txt
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
def _write_success(self, txt: str):
|
||||||
|
self.stdout.write(
|
||||||
|
self.style.SUCCESS(
|
||||||
|
txt
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
def _write_error(self, txt: str):
|
||||||
|
self.stdout.write(
|
||||||
|
self.style.ERROR(
|
||||||
|
txt
|
||||||
|
)
|
||||||
|
)
|
66
codelist/models.py
Normal file
66
codelist/models.py
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
|
class KonovaCode(models.Model):
|
||||||
|
"""
|
||||||
|
Representation of the OSIRIS Codelisten codes.
|
||||||
|
|
||||||
|
KonovaCodes will be updated using a command regularly to provide all codes, which are provided by the
|
||||||
|
Codelisten application itself. To reduce traffic, we store them in our own database.
|
||||||
|
"""
|
||||||
|
id = models.IntegerField(
|
||||||
|
primary_key=True,
|
||||||
|
help_text="AtomId; Identifies this code uniquely over all NatIT projects"
|
||||||
|
)
|
||||||
|
parent = models.ForeignKey(
|
||||||
|
"KonovaCode",
|
||||||
|
on_delete=models.CASCADE,
|
||||||
|
null=True,
|
||||||
|
blank=True,
|
||||||
|
)
|
||||||
|
short_name = models.CharField(
|
||||||
|
max_length=500,
|
||||||
|
null=True,
|
||||||
|
blank=True,
|
||||||
|
help_text="Short version of long name",
|
||||||
|
)
|
||||||
|
long_name = models.CharField(
|
||||||
|
max_length=1000,
|
||||||
|
null=True,
|
||||||
|
blank=True,
|
||||||
|
help_text="",
|
||||||
|
)
|
||||||
|
is_leaf = models.BooleanField(
|
||||||
|
default=False,
|
||||||
|
help_text="Whether this code has children or not"
|
||||||
|
)
|
||||||
|
is_active = models.BooleanField(
|
||||||
|
default=False,
|
||||||
|
help_text="Whether this code is archived or not"
|
||||||
|
)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
if self.short_name:
|
||||||
|
return "{} ({})".format(self.long_name, self.short_name)
|
||||||
|
else:
|
||||||
|
return self.long_name
|
||||||
|
|
||||||
|
|
||||||
|
class KonovaCodeList(models.Model):
|
||||||
|
"""
|
||||||
|
The codelist itself
|
||||||
|
"""
|
||||||
|
id = models.IntegerField(
|
||||||
|
primary_key=True,
|
||||||
|
help_text="List identifier",
|
||||||
|
)
|
||||||
|
codes = models.ManyToManyField(
|
||||||
|
KonovaCode,
|
||||||
|
null=True,
|
||||||
|
blank=True,
|
||||||
|
help_text="Codes for this list",
|
||||||
|
related_name="code_lists"
|
||||||
|
)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return str(self.id)
|
23
codelist/settings.py
Normal file
23
codelist/settings.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
"""
|
||||||
|
Author: Michel Peltriaux
|
||||||
|
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
||||||
|
Contact: michel.peltriaux@sgdnord.rlp.de
|
||||||
|
Created on: 23.08.21
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Codelist definitions
|
||||||
|
CODELIST_BASE_URL = "https://codelisten.naturschutz.rlp.de/repository/referenzliste"
|
||||||
|
|
||||||
|
# Identifier
|
||||||
|
CODELIST_INTERVENTION_HANDLER_ID = 903 # CLMassnahmeträger
|
||||||
|
CODELIST_CONSERVATION_OFFICE_ID = 907 # CLNaturschutzbehörden
|
||||||
|
CODELIST_REGISTRATION_OFFICE_ID = 1053 # CLZulassungsbehörden
|
||||||
|
CODELIST_BIOTOPES_ID = 974 # CL_EIV_Biotoptypen
|
||||||
|
CODELIST_LAW_ID = 1048 # CLVerfahrensrecht
|
||||||
|
|
||||||
|
CODELIST_COMPENSATION_HANDLER_ID = 1052 # CLEingreifer
|
||||||
|
CODELIST_COMPENSATION_ACTION_ID = 1026 # CLMassnahmedetail
|
||||||
|
CODELIST_COMPENSATION_ACTION_CLASS_ID = 1034 # CLMassnahmeklasse
|
||||||
|
CODELIST_COMPENSATION_ADDITIONAL_TYPE_ID = 1028 # CLMassnahmetyp
|
||||||
|
CODELIST_COMPENSATION_COMBINATION_ID = 1049 # CLKombimassnahme
|
3
codelist/tests.py
Normal file
3
codelist/tests.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
# Create your tests here.
|
14
codelist/urls.py
Normal file
14
codelist/urls.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
"""
|
||||||
|
Author: Michel Peltriaux
|
||||||
|
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
||||||
|
Contact: michel.peltriaux@sgdnord.rlp.de
|
||||||
|
Created on: 23.08.21
|
||||||
|
|
||||||
|
"""
|
||||||
|
from django.urls import path
|
||||||
|
|
||||||
|
|
||||||
|
app_name = "codelist"
|
||||||
|
urlpatterns = [
|
||||||
|
|
||||||
|
]
|
0
codelist/views.py
Normal file
0
codelist/views.py
Normal file
31
compensation/account_urls.py
Normal file
31
compensation/account_urls.py
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
"""
|
||||||
|
Author: Michel Peltriaux
|
||||||
|
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
||||||
|
Contact: michel.peltriaux@sgdnord.rlp.de
|
||||||
|
Created on: 24.08.21
|
||||||
|
|
||||||
|
"""
|
||||||
|
from django.urls import path
|
||||||
|
from compensation.views.eco_account_views import *
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
path("", index_view, name="acc-index"),
|
||||||
|
path('new/', new_view, name='acc-new'),
|
||||||
|
path('<id>', open_view, name='acc-open'),
|
||||||
|
path('<id>/log', log_view, name='acc-log'),
|
||||||
|
path('<id>/record', record_view, name='acc-record'),
|
||||||
|
path('<id>/edit', edit_view, name='acc-edit'),
|
||||||
|
path('<id>/remove', remove_view, name='acc-remove'),
|
||||||
|
path('<id>/state/new', state_new_view, name='acc-new-state'),
|
||||||
|
path('<id>/action/new', action_new_view, name='acc-new-action'),
|
||||||
|
path('<id>/deadline/new', deadline_new_view, name="acc-new-deadline"),
|
||||||
|
|
||||||
|
# Documents
|
||||||
|
# Document remove route can be found in konova/urls.py
|
||||||
|
path('<id>/document/new/', new_document_view, name='acc-new-doc'),
|
||||||
|
|
||||||
|
# Eco-account withdraws
|
||||||
|
path('<id>/remove/<withdraw_id>', withdraw_remove_view, name='withdraw-remove'),
|
||||||
|
path('<id>/withdraw/new', new_withdraw_view, name='acc-new-withdraw'),
|
||||||
|
|
||||||
|
]
|
33
compensation/comp_urls.py
Normal file
33
compensation/comp_urls.py
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
"""
|
||||||
|
Author: Michel Peltriaux
|
||||||
|
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
||||||
|
Contact: michel.peltriaux@sgdnord.rlp.de
|
||||||
|
Created on: 24.08.21
|
||||||
|
|
||||||
|
"""
|
||||||
|
from django.urls import path
|
||||||
|
from compensation.views.compensation_views import *
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
# Main compensation
|
||||||
|
path("", index_view, name="index"),
|
||||||
|
path('new', new_view, name='new'),
|
||||||
|
path('<id>', open_view, name='open'),
|
||||||
|
path('<id>/log', log_view, name='log'),
|
||||||
|
path('<id>/edit', edit_view, name='edit'),
|
||||||
|
path('<id>/remove', remove_view, name='remove'),
|
||||||
|
path('<id>/state/new', state_new_view, name='new-state'),
|
||||||
|
path('<id>/action/new', action_new_view, name='new-action'),
|
||||||
|
path('<id>/deadline/new', deadline_new_view, name="new-deadline"),
|
||||||
|
|
||||||
|
# Documents
|
||||||
|
# Document remove route can be found in konova/urls.py
|
||||||
|
path('<id>/document/new/', new_document_view, name='new-doc'),
|
||||||
|
|
||||||
|
# Generic state routes
|
||||||
|
path('state/<id>/remove', state_remove_view, name='state-remove'),
|
||||||
|
|
||||||
|
# Generic action routes
|
||||||
|
path('action/<id>/remove', action_remove_view, name='action-remove'),
|
||||||
|
|
||||||
|
]
|
@ -6,13 +6,17 @@ Created on: 04.12.20
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
from bootstrap_modal_forms.utils import is_ajax
|
from bootstrap_modal_forms.utils import is_ajax
|
||||||
|
from dal import autocomplete
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
from django.http import HttpRequest, HttpResponseRedirect
|
from django.http import HttpRequest, HttpResponseRedirect
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
from django.utils.translation import pgettext_lazy as _con
|
||||||
|
|
||||||
|
from codelist.models import KonovaCode
|
||||||
|
from codelist.settings import CODELIST_BIOTOPES_ID
|
||||||
from compensation.models import Payment, CompensationState, CompensationAction, UnitChoices
|
from compensation.models import Payment, CompensationState, CompensationAction, UnitChoices
|
||||||
from konova.contexts import BaseContext
|
from konova.contexts import BaseContext
|
||||||
from konova.forms import BaseForm, BaseModalForm
|
from konova.forms import BaseForm, BaseModalForm
|
||||||
@ -39,13 +43,14 @@ class NewPaymentForm(BaseModalForm):
|
|||||||
amount = forms.DecimalField(
|
amount = forms.DecimalField(
|
||||||
min_value=0.00,
|
min_value=0.00,
|
||||||
decimal_places=2,
|
decimal_places=2,
|
||||||
label=_("Amount"),
|
label=_con("money", "Amount"), # contextual translation
|
||||||
label_suffix=_(""),
|
label_suffix=_(""),
|
||||||
help_text=_("Amount in Euro"),
|
help_text=_("in Euro"),
|
||||||
)
|
)
|
||||||
due = forms.DateField(
|
due = forms.DateField(
|
||||||
label=_("Due on"),
|
label=_("Due on"),
|
||||||
label_suffix=_(""),
|
label_suffix=_(""),
|
||||||
|
required=False,
|
||||||
help_text=_("Due on which date"),
|
help_text=_("Due on which date"),
|
||||||
widget=forms.DateInput(
|
widget=forms.DateInput(
|
||||||
attrs={
|
attrs={
|
||||||
@ -95,11 +100,22 @@ class NewPaymentForm(BaseModalForm):
|
|||||||
|
|
||||||
|
|
||||||
class NewStateModalForm(BaseModalForm):
|
class NewStateModalForm(BaseModalForm):
|
||||||
biotope_type = forms.CharField(
|
biotope_type = forms.ModelChoiceField(
|
||||||
label=_("Biotope Type"),
|
label=_("Biotope Type"),
|
||||||
label_suffix="",
|
label_suffix="",
|
||||||
required=True,
|
required=True,
|
||||||
help_text=_("Select the biotope type")
|
help_text=_("Select the biotope type"),
|
||||||
|
queryset=KonovaCode.objects.filter(
|
||||||
|
is_active=True,
|
||||||
|
is_leaf=True,
|
||||||
|
code_lists__in=[CODELIST_BIOTOPES_ID],
|
||||||
|
),
|
||||||
|
widget=autocomplete.ModelSelect2(
|
||||||
|
url="codes-biotope-autocomplete",
|
||||||
|
attrs={
|
||||||
|
"data-placeholder": _("Biotope Type"),
|
||||||
|
}
|
||||||
|
),
|
||||||
)
|
)
|
||||||
surface = forms.DecimalField(
|
surface = forms.DecimalField(
|
||||||
min_value=0.00,
|
min_value=0.00,
|
||||||
@ -256,11 +272,21 @@ class NewDeadlineModalForm(BaseModalForm):
|
|||||||
|
|
||||||
|
|
||||||
class NewActionModalForm(BaseModalForm):
|
class NewActionModalForm(BaseModalForm):
|
||||||
action_type = forms.CharField(
|
action_type = forms.ModelChoiceField(
|
||||||
label=_("Action Type"),
|
label=_("Action Type"),
|
||||||
label_suffix="",
|
label_suffix="",
|
||||||
required=True,
|
required=True,
|
||||||
help_text=_("Select the action type"),
|
help_text=_("Select the action type"),
|
||||||
|
queryset=KonovaCode.objects.filter(
|
||||||
|
is_active=True,
|
||||||
|
),
|
||||||
|
widget=autocomplete.ModelSelect2(
|
||||||
|
url="codes-compensation-action-autocomplete",
|
||||||
|
attrs={
|
||||||
|
"data-placeholder": _("Action"),
|
||||||
|
"data-class": "w-100",
|
||||||
|
}
|
||||||
|
),
|
||||||
)
|
)
|
||||||
unit = forms.ChoiceField(
|
unit = forms.ChoiceField(
|
||||||
label=_("Unit"),
|
label=_("Unit"),
|
||||||
@ -290,8 +316,8 @@ class NewActionModalForm(BaseModalForm):
|
|||||||
help_text=_("Additional comment, maximum {} letters").format(200),
|
help_text=_("Additional comment, maximum {} letters").format(200),
|
||||||
widget=forms.Textarea(
|
widget=forms.Textarea(
|
||||||
attrs={
|
attrs={
|
||||||
"cols": 30,
|
|
||||||
"rows": 5,
|
"rows": 5,
|
||||||
|
"class": "w-100"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -11,6 +11,7 @@ from django.core.validators import MinValueValidator
|
|||||||
from django.db.models import Sum
|
from django.db.models import Sum
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
|
from codelist.models import KonovaCode
|
||||||
from intervention.models import Intervention, ResponsibilityData
|
from intervention.models import Intervention, ResponsibilityData
|
||||||
from konova.models import BaseObject, BaseResource, Geometry, UuidModel
|
from konova.models import BaseObject, BaseResource, Geometry, UuidModel
|
||||||
from konova.settings import DEFAULT_SRID_RLP, LANIS_LINK_TEMPLATE
|
from konova.settings import DEFAULT_SRID_RLP, LANIS_LINK_TEMPLATE
|
||||||
@ -22,7 +23,7 @@ class Payment(BaseResource):
|
|||||||
Holds data on a payment for an intervention (alternative to a classic compensation)
|
Holds data on a payment for an intervention (alternative to a classic compensation)
|
||||||
"""
|
"""
|
||||||
amount = models.FloatField(validators=[MinValueValidator(limit_value=0.00)])
|
amount = models.FloatField(validators=[MinValueValidator(limit_value=0.00)])
|
||||||
due_on = models.DateField(null=True)
|
due_on = models.DateField(null=True, blank=True)
|
||||||
comment = models.CharField(
|
comment = models.CharField(
|
||||||
max_length=1000,
|
max_length=1000,
|
||||||
null=True,
|
null=True,
|
||||||
@ -37,12 +38,22 @@ class Payment(BaseResource):
|
|||||||
related_name='payments'
|
related_name='payments'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
ordering = [
|
||||||
|
"-amount",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
class CompensationState(UuidModel):
|
class CompensationState(UuidModel):
|
||||||
"""
|
"""
|
||||||
Compensations must define the state of an area before and after the compensation.
|
Compensations must define the state of an area before and after the compensation.
|
||||||
"""
|
"""
|
||||||
biotope_type = models.CharField(max_length=500, null=True, blank=True)
|
biotope_type = models.ForeignKey(
|
||||||
|
KonovaCode,
|
||||||
|
on_delete=models.SET_NULL,
|
||||||
|
null=True,
|
||||||
|
blank=True
|
||||||
|
)
|
||||||
surface = models.FloatField()
|
surface = models.FloatField()
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
@ -65,7 +76,12 @@ class CompensationAction(BaseResource):
|
|||||||
"""
|
"""
|
||||||
Compensations include actions like planting trees, refreshing rivers and so on.
|
Compensations include actions like planting trees, refreshing rivers and so on.
|
||||||
"""
|
"""
|
||||||
action_type = models.CharField(max_length=500, null=True, blank=True)
|
action_type = models.ForeignKey(
|
||||||
|
KonovaCode,
|
||||||
|
on_delete=models.SET_NULL,
|
||||||
|
null=True,
|
||||||
|
blank=True
|
||||||
|
)
|
||||||
amount = models.FloatField()
|
amount = models.FloatField()
|
||||||
unit = models.CharField(max_length=100, null=True, blank=True, choices=UnitChoices.choices)
|
unit = models.CharField(max_length=100, null=True, blank=True, choices=UnitChoices.choices)
|
||||||
comment = models.TextField(blank=True, null=True, help_text="Additional comment")
|
comment = models.TextField(blank=True, null=True, help_text="Additional comment")
|
||||||
|
14
compensation/payment_urls.py
Normal file
14
compensation/payment_urls.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
"""
|
||||||
|
Author: Michel Peltriaux
|
||||||
|
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
||||||
|
Contact: michel.peltriaux@sgdnord.rlp.de
|
||||||
|
Created on: 24.08.21
|
||||||
|
|
||||||
|
"""
|
||||||
|
from django.urls import path
|
||||||
|
from compensation.views.payment_views import *
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
path('<intervention_id>/new', new_payment_view, name='pay-new'),
|
||||||
|
path('<id>/remove', payment_remove_view, name='pay-remove'),
|
||||||
|
]
|
@ -2,7 +2,13 @@
|
|||||||
{% load i18n l10n static fontawesome_5 humanize %}
|
{% load i18n l10n static fontawesome_5 humanize %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
|
{% comment %}
|
||||||
|
dal documentation (django-autocomplete-light) states using form.media for adding needed scripts.
|
||||||
|
This does not work properly with modal forms, as the scripts are not loaded properly inside the modal.
|
||||||
|
Therefore the script linkages from form.media have been extracted and put inside dal/scripts.html to ensure
|
||||||
|
these scripts are loaded when needed.
|
||||||
|
{% endcomment %}
|
||||||
|
{% include 'dal/scripts.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
@ -5,64 +5,11 @@ Contact: michel.peltriaux@sgdnord.rlp.de
|
|||||||
Created on: 30.11.20
|
Created on: 30.11.20
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from django.urls import path
|
from django.urls import path, include
|
||||||
|
|
||||||
from compensation.views import compensation_views
|
|
||||||
from compensation.views import payment_views
|
|
||||||
from compensation.views import eco_account_views
|
|
||||||
|
|
||||||
app_name = "compensation"
|
app_name = "compensation"
|
||||||
|
urlpatterns = [
|
||||||
# Split lists for each sub-component for better overview
|
path("", include("compensation.comp_urls")),
|
||||||
urlpatterns_payment = [
|
path("acc/", include("compensation.account_urls")),
|
||||||
path('pay/<intervention_id>/new', payment_views.new_payment_view, name='pay-new'),
|
path("pay/", include("compensation.payment_urls")),
|
||||||
path('pay/<id>/remove', payment_views.payment_remove_view, name='pay-remove'),
|
]
|
||||||
]
|
|
||||||
|
|
||||||
urlaptterns_eco_acc = [
|
|
||||||
path("acc/", eco_account_views.index_view, name="acc-index"),
|
|
||||||
path('acc/new/', eco_account_views.new_view, name='acc-new'),
|
|
||||||
path('acc/<id>', eco_account_views.open_view, name='acc-open'),
|
|
||||||
path('acc/<id>/log', eco_account_views.log_view, name='acc-log'),
|
|
||||||
path('acc/<id>/record', eco_account_views.record_view, name='acc-record'),
|
|
||||||
path('acc/<id>/edit', eco_account_views.edit_view, name='acc-edit'),
|
|
||||||
path('acc/<id>/remove', eco_account_views.remove_view, name='acc-remove'),
|
|
||||||
path('acc/<id>/state/new', eco_account_views.state_new_view, name='acc-new-state'),
|
|
||||||
path('acc/<id>/action/new', eco_account_views.action_new_view, name='acc-new-action'),
|
|
||||||
path('acc/<id>/deadline/new', eco_account_views.deadline_new_view, name="acc-new-deadline"),
|
|
||||||
|
|
||||||
# Documents
|
|
||||||
# Document remove route can be found in konova/urls.py
|
|
||||||
path('acc/<id>/document/new/', eco_account_views.new_document_view, name='acc-new-doc'),
|
|
||||||
|
|
||||||
# Eco-account withdraws
|
|
||||||
path('acc/<id>/remove/<withdraw_id>', eco_account_views.withdraw_remove_view, name='withdraw-remove'),
|
|
||||||
path('acc/<id>/withdraw/new', eco_account_views.new_withdraw_view, name='acc-new-withdraw'),
|
|
||||||
|
|
||||||
]
|
|
||||||
urlpatterns_compensation = [
|
|
||||||
# Main compensation
|
|
||||||
path("", compensation_views.index_view, name="index"),
|
|
||||||
path('new', compensation_views.new_view, name='new'),
|
|
||||||
path('<id>', compensation_views.open_view, name='open'),
|
|
||||||
path('<id>/log', compensation_views.log_view, name='log'),
|
|
||||||
path('<id>/edit', compensation_views.edit_view, name='edit'),
|
|
||||||
path('<id>/remove', compensation_views.remove_view, name='remove'),
|
|
||||||
path('<id>/state/new', compensation_views.state_new_view, name='new-state'),
|
|
||||||
path('<id>/action/new', compensation_views.action_new_view, name='new-action'),
|
|
||||||
path('<id>/deadline/new', compensation_views.deadline_new_view, name="new-deadline"),
|
|
||||||
|
|
||||||
# Documents
|
|
||||||
# Document remove route can be found in konova/urls.py
|
|
||||||
path('<id>/document/new/', compensation_views.new_document_view, name='new-doc'),
|
|
||||||
|
|
||||||
# Generic state routes
|
|
||||||
path('state/<id>/remove', compensation_views.state_remove_view, name='state-remove'),
|
|
||||||
|
|
||||||
# Generic action routes
|
|
||||||
path('action/<id>/remove', compensation_views.action_remove_view, name='action-remove'),
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
# Merge all together in the end
|
|
||||||
urlpatterns = urlpatterns_compensation + urlaptterns_eco_acc + urlpatterns_payment
|
|
@ -6,7 +6,10 @@ Created on: 07.12.20
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
from dal_select2.views import Select2QuerySetView
|
from dal_select2.views import Select2QuerySetView
|
||||||
|
from django.db.models import Q
|
||||||
|
|
||||||
|
from codelist.models import KonovaCode
|
||||||
|
from codelist.settings import CODELIST_COMPENSATION_ACTION_ID, CODELIST_BIOTOPES_ID
|
||||||
from compensation.models import EcoAccount
|
from compensation.models import EcoAccount
|
||||||
from intervention.models import Intervention
|
from intervention.models import Intervention
|
||||||
from organisation.models import Organisation
|
from organisation.models import Organisation
|
||||||
@ -73,4 +76,52 @@ class InterventionAutocomplete(Select2QuerySetView):
|
|||||||
qs = qs.order_by(
|
qs = qs.order_by(
|
||||||
"identifier"
|
"identifier"
|
||||||
)
|
)
|
||||||
return qs
|
return qs
|
||||||
|
|
||||||
|
|
||||||
|
class KonovaCodeAutocomplete(Select2QuerySetView):
|
||||||
|
"""
|
||||||
|
Provides simple autocomplete functionality for codes
|
||||||
|
|
||||||
|
Parameter support:
|
||||||
|
* q: Search for a word inside long_name of a code
|
||||||
|
* c: Search inside a special codelist
|
||||||
|
|
||||||
|
"""
|
||||||
|
def get_queryset(self):
|
||||||
|
if self.request.user.is_anonymous:
|
||||||
|
return KonovaCode.objects.none()
|
||||||
|
qs = KonovaCode.objects.filter(
|
||||||
|
is_active=True,
|
||||||
|
is_leaf=True,
|
||||||
|
).order_by(
|
||||||
|
"long_name"
|
||||||
|
)
|
||||||
|
if self.c:
|
||||||
|
qs = qs.filter(
|
||||||
|
code_lists__in=[self.c]
|
||||||
|
)
|
||||||
|
if self.q:
|
||||||
|
q_or = Q()
|
||||||
|
q_or |= Q(long_name__icontains=self.q)
|
||||||
|
q_or |= Q(short_name__icontains=self.q)
|
||||||
|
qs = qs.filter(q_or)
|
||||||
|
return qs
|
||||||
|
|
||||||
|
|
||||||
|
class CompensationActionCodeAutocomplete(KonovaCodeAutocomplete):
|
||||||
|
"""
|
||||||
|
Due to limitations of the django dal package, we need to subclass for each code list
|
||||||
|
"""
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
self.c = CODELIST_COMPENSATION_ACTION_ID
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
class BiotopeCodeAutocomplete(KonovaCodeAutocomplete):
|
||||||
|
"""
|
||||||
|
Due to limitations of the django dal package, we need to subclass for each code list
|
||||||
|
"""
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
self.c = CODELIST_BIOTOPES_ID
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
|
@ -155,6 +155,16 @@ class BaseModalForm(BaseForm, BSModalForm):
|
|||||||
render_submit = True
|
render_submit = True
|
||||||
template = "modal/modal_form.html"
|
template = "modal/modal_form.html"
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
|
# Automatically add bootstrap w-100 class for maximum width of form fields in modals
|
||||||
|
for key, val in self.fields.items():
|
||||||
|
val.widget.attrs.update(
|
||||||
|
{
|
||||||
|
"class": "w-100"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
def process_request(self, request: HttpRequest, msg_success: str = _("Object removed"), msg_error: str = FORM_INVALID, redirect_url: str = None):
|
def process_request(self, request: HttpRequest, msg_success: str = _("Object removed"), msg_error: str = FORM_INVALID, redirect_url: str = None):
|
||||||
""" Generic processing of request
|
""" Generic processing of request
|
||||||
|
|
||||||
@ -249,6 +259,8 @@ class RemoveModalForm(BaseModalForm):
|
|||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
self.form_title = _("Remove")
|
self.form_title = _("Remove")
|
||||||
self.form_caption = _("Are you sure?")
|
self.form_caption = _("Are you sure?")
|
||||||
|
# Disable automatic w-100 setting for this type of modal form. Looks kinda strange
|
||||||
|
self.fields["confirm"].widget.attrs["class"] = ""
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
if isinstance(self.instance, BaseObject):
|
if isinstance(self.instance, BaseObject):
|
||||||
|
@ -69,6 +69,7 @@ INSTALLED_APPS = [
|
|||||||
'news',
|
'news',
|
||||||
'user',
|
'user',
|
||||||
'ema',
|
'ema',
|
||||||
|
'codelist',
|
||||||
]
|
]
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
INSTALLED_APPS += [
|
INSTALLED_APPS += [
|
||||||
|
@ -18,7 +18,7 @@ from django.contrib import admin
|
|||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
|
|
||||||
from konova.autocompletes import OrganisationAutocomplete, NonOfficialOrganisationAutocomplete, EcoAccountAutocomplete, \
|
from konova.autocompletes import OrganisationAutocomplete, NonOfficialOrganisationAutocomplete, EcoAccountAutocomplete, \
|
||||||
InterventionAutocomplete
|
InterventionAutocomplete, CompensationActionCodeAutocomplete, BiotopeCodeAutocomplete
|
||||||
from konova.settings import SSO_SERVER, SSO_PUBLIC_KEY, SSO_PRIVATE_KEY, DEBUG
|
from konova.settings import SSO_SERVER, SSO_PUBLIC_KEY, SSO_PRIVATE_KEY, DEBUG
|
||||||
from konova.sso.sso import KonovaSSOClient
|
from konova.sso.sso import KonovaSSOClient
|
||||||
from konova.views import logout_view, home_view, get_document_view, remove_document_view, remove_deadline_view
|
from konova.views import logout_view, home_view, get_document_view, remove_document_view, remove_deadline_view
|
||||||
@ -35,6 +35,7 @@ urlpatterns = [
|
|||||||
path('organisation/', include("organisation.urls")),
|
path('organisation/', include("organisation.urls")),
|
||||||
path('user/', include("user.urls")),
|
path('user/', include("user.urls")),
|
||||||
path('news/', include("news.urls")),
|
path('news/', include("news.urls")),
|
||||||
|
path('news/', include("codelist.urls")),
|
||||||
|
|
||||||
# Generic documents routes
|
# Generic documents routes
|
||||||
path('document/<id>', get_document_view, name="doc-open"),
|
path('document/<id>', get_document_view, name="doc-open"),
|
||||||
@ -43,11 +44,13 @@ urlpatterns = [
|
|||||||
# Generic deadline routes
|
# Generic deadline routes
|
||||||
path('deadline/<id>/remove', remove_deadline_view, name="deadline-remove"),
|
path('deadline/<id>/remove', remove_deadline_view, name="deadline-remove"),
|
||||||
|
|
||||||
# Autocomplete paths
|
# Autocomplete paths for all apps
|
||||||
path("atcmplt/orgs", OrganisationAutocomplete.as_view(), name="orgs-autocomplete"),
|
path("atcmplt/orgs", OrganisationAutocomplete.as_view(), name="orgs-autocomplete"),
|
||||||
path("atcmplt/orgs/other", NonOfficialOrganisationAutocomplete.as_view(), name="other-orgs-autocomplete"),
|
path("atcmplt/orgs/other", NonOfficialOrganisationAutocomplete.as_view(), name="other-orgs-autocomplete"),
|
||||||
path("atcmplt/eco-accounts", EcoAccountAutocomplete.as_view(), name="accounts-autocomplete"),
|
path("atcmplt/eco-accounts", EcoAccountAutocomplete.as_view(), name="accounts-autocomplete"),
|
||||||
path("atcmplt/interventions", InterventionAutocomplete.as_view(), name="interventions-autocomplete"),
|
path("atcmplt/interventions", InterventionAutocomplete.as_view(), name="interventions-autocomplete"),
|
||||||
|
path("atcmplt/codes/compensation-action", CompensationActionCodeAutocomplete.as_view(), name="codes-compensation-action-autocomplete"),
|
||||||
|
path("atcmplt/codes/biotope", BiotopeCodeAutocomplete.as_view(), name="codes-biotope-autocomplete"),
|
||||||
]
|
]
|
||||||
|
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
|
Binary file not shown.
@ -3,8 +3,8 @@
|
|||||||
# This file is distributed under the same license as the PACKAGE package.
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
#
|
#
|
||||||
#: compensation/filters.py:71 compensation/forms.py:43 compensation/forms.py:48
|
#: compensation/filters.py:71 compensation/forms.py:46 compensation/forms.py:51
|
||||||
#: compensation/forms.py:61 compensation/forms.py:219 compensation/forms.py:289
|
#: compensation/forms.py:65 compensation/forms.py:234 compensation/forms.py:314
|
||||||
#: intervention/filters.py:26 intervention/filters.py:40
|
#: intervention/filters.py:26 intervention/filters.py:40
|
||||||
#: intervention/filters.py:47 intervention/filters.py:48
|
#: intervention/filters.py:47 intervention/filters.py:48
|
||||||
#: intervention/forms.py:322 intervention/forms.py:334
|
#: intervention/forms.py:322 intervention/forms.py:334
|
||||||
@ -16,7 +16,7 @@ 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-08-19 14:33+0200\n"
|
"POT-Creation-Date: 2021-08-24 14:26+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"
|
||||||
@ -30,54 +30,54 @@ msgstr ""
|
|||||||
msgid "Show only unrecorded"
|
msgid "Show only unrecorded"
|
||||||
msgstr "Nur unverzeichnete anzeigen"
|
msgstr "Nur unverzeichnete anzeigen"
|
||||||
|
|
||||||
#: compensation/forms.py:42 compensation/forms.py:278
|
#: compensation/forms.py:45 compensation/forms.py:303
|
||||||
#: compensation/templates/compensation/detail/eco_account/includes/withdraws.html:31
|
#: compensation/templates/compensation/detail/eco_account/includes/withdraws.html:31
|
||||||
#: intervention/templates/intervention/detail/includes/withdraws.html:31
|
#: intervention/templates/intervention/detail/includes/withdraws.html:31
|
||||||
msgid "Amount"
|
msgid "Amount"
|
||||||
msgstr "Menge"
|
msgstr "Menge"
|
||||||
|
|
||||||
#: compensation/forms.py:44
|
|
||||||
msgid "Amount in Euro"
|
|
||||||
msgstr "Betrag in Euro"
|
|
||||||
|
|
||||||
#: compensation/forms.py:47
|
#: compensation/forms.py:47
|
||||||
|
msgid "in Euro"
|
||||||
|
msgstr "in Euro"
|
||||||
|
|
||||||
|
#: compensation/forms.py:50
|
||||||
#: intervention/templates/intervention/detail/includes/payments.html:31
|
#: intervention/templates/intervention/detail/includes/payments.html:31
|
||||||
msgid "Due on"
|
msgid "Due on"
|
||||||
msgstr "Fällig am"
|
msgstr "Fällig am"
|
||||||
|
|
||||||
#: compensation/forms.py:49
|
#: compensation/forms.py:53
|
||||||
msgid "Due on which date"
|
msgid "Due on which date"
|
||||||
msgstr "Zahlung wird an diesem Datum erwartet"
|
msgstr "Zahlung wird an diesem Datum erwartet"
|
||||||
|
|
||||||
#: compensation/forms.py:62
|
#: compensation/forms.py:66
|
||||||
msgid "Transfer note"
|
msgid "Transfer note"
|
||||||
msgstr "Verwendungszweck"
|
msgstr "Verwendungszweck"
|
||||||
|
|
||||||
#: compensation/forms.py:63
|
#: compensation/forms.py:67
|
||||||
msgid "Note for money transfer"
|
msgid "Note for money transfer"
|
||||||
msgstr "Verwendungszweck für Überweisung"
|
msgstr "Verwendungszweck für Überweisung"
|
||||||
|
|
||||||
#: compensation/forms.py:69
|
#: compensation/forms.py:73
|
||||||
msgid "Payment"
|
msgid "Payment"
|
||||||
msgstr "Zahlung"
|
msgstr "Zahlung"
|
||||||
|
|
||||||
#: compensation/forms.py:70
|
#: compensation/forms.py:74
|
||||||
msgid "Add a payment for intervention '{}'"
|
msgid "Add a payment for intervention '{}'"
|
||||||
msgstr "Neue Ersatzzahlung zu Eingriff '{}' hinzufügen"
|
msgstr "Neue Ersatzzahlung zu Eingriff '{}' hinzufügen"
|
||||||
|
|
||||||
#: compensation/forms.py:82
|
#: compensation/forms.py:86
|
||||||
msgid "Added payment"
|
msgid "Added payment"
|
||||||
msgstr "Zahlung hinzufügen"
|
msgstr "Zahlung hinzufügen"
|
||||||
|
|
||||||
#: compensation/forms.py:99
|
#: compensation/forms.py:103 compensation/forms.py:115
|
||||||
msgid "Biotope Type"
|
msgid "Biotope Type"
|
||||||
msgstr "Biotoptyp"
|
msgstr "Biotoptyp"
|
||||||
|
|
||||||
#: compensation/forms.py:102
|
#: compensation/forms.py:106
|
||||||
msgid "Select the biotope type"
|
msgid "Select the biotope type"
|
||||||
msgstr "Biotoptyp wählen"
|
msgstr "Biotoptyp wählen"
|
||||||
|
|
||||||
#: compensation/forms.py:107
|
#: compensation/forms.py:122
|
||||||
#: compensation/templates/compensation/detail/compensation/includes/states-after.html:36
|
#: compensation/templates/compensation/detail/compensation/includes/states-after.html:36
|
||||||
#: compensation/templates/compensation/detail/compensation/includes/states-before.html:36
|
#: compensation/templates/compensation/detail/compensation/includes/states-before.html:36
|
||||||
#: compensation/templates/compensation/detail/eco_account/includes/states-after.html:36
|
#: compensation/templates/compensation/detail/eco_account/includes/states-after.html:36
|
||||||
@ -88,35 +88,35 @@ msgstr "Biotoptyp wählen"
|
|||||||
msgid "Surface"
|
msgid "Surface"
|
||||||
msgstr "Fläche"
|
msgstr "Fläche"
|
||||||
|
|
||||||
#: compensation/forms.py:110 intervention/forms.py:476
|
#: compensation/forms.py:125 intervention/forms.py:476
|
||||||
msgid "in m²"
|
msgid "in m²"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: compensation/forms.py:115
|
#: compensation/forms.py:130
|
||||||
msgid "New state"
|
msgid "New state"
|
||||||
msgstr "Neuer Zustand"
|
msgstr "Neuer Zustand"
|
||||||
|
|
||||||
#: compensation/forms.py:116
|
#: compensation/forms.py:131
|
||||||
msgid "Insert data for the new state"
|
msgid "Insert data for the new state"
|
||||||
msgstr "Geben Sie die Daten des neuen Zustandes ein"
|
msgstr "Geben Sie die Daten des neuen Zustandes ein"
|
||||||
|
|
||||||
#: compensation/forms.py:124
|
#: compensation/forms.py:139
|
||||||
msgid "Added state"
|
msgid "Added state"
|
||||||
msgstr "Zustand hinzugefügt"
|
msgstr "Zustand hinzugefügt"
|
||||||
|
|
||||||
#: compensation/forms.py:140 konova/forms.py:158
|
#: compensation/forms.py:155 konova/forms.py:158
|
||||||
msgid "Object removed"
|
msgid "Object removed"
|
||||||
msgstr "Objekt entfernt"
|
msgstr "Objekt entfernt"
|
||||||
|
|
||||||
#: compensation/forms.py:191
|
#: compensation/forms.py:206
|
||||||
msgid "Deadline Type"
|
msgid "Deadline Type"
|
||||||
msgstr "Fristart"
|
msgstr "Fristart"
|
||||||
|
|
||||||
#: compensation/forms.py:194
|
#: compensation/forms.py:209
|
||||||
msgid "Select the deadline type"
|
msgid "Select the deadline type"
|
||||||
msgstr "Fristart wählen"
|
msgstr "Fristart wählen"
|
||||||
|
|
||||||
#: compensation/forms.py:203
|
#: compensation/forms.py:218
|
||||||
#: compensation/templates/compensation/detail/compensation/includes/deadlines.html:31
|
#: compensation/templates/compensation/detail/compensation/includes/deadlines.html:31
|
||||||
#: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:31
|
#: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:31
|
||||||
#: ema/templates/ema/detail/includes/deadlines.html:31
|
#: ema/templates/ema/detail/includes/deadlines.html:31
|
||||||
@ -124,11 +124,11 @@ msgstr "Fristart wählen"
|
|||||||
msgid "Date"
|
msgid "Date"
|
||||||
msgstr "Datum"
|
msgstr "Datum"
|
||||||
|
|
||||||
#: compensation/forms.py:206
|
#: compensation/forms.py:221
|
||||||
msgid "Select date"
|
msgid "Select date"
|
||||||
msgstr "Datum wählen"
|
msgstr "Datum wählen"
|
||||||
|
|
||||||
#: compensation/forms.py:218 compensation/forms.py:288
|
#: compensation/forms.py:233 compensation/forms.py:313
|
||||||
#: compensation/templates/compensation/detail/compensation/includes/actions.html:34
|
#: compensation/templates/compensation/detail/compensation/includes/actions.html:34
|
||||||
#: 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
|
||||||
@ -145,52 +145,78 @@ msgstr "Datum wählen"
|
|||||||
msgid "Comment"
|
msgid "Comment"
|
||||||
msgstr "Kommentar"
|
msgstr "Kommentar"
|
||||||
|
|
||||||
#: compensation/forms.py:220 compensation/forms.py:290
|
#: compensation/forms.py:235 compensation/forms.py:315
|
||||||
#: intervention/forms.py:347 konova/forms.py:305
|
#: intervention/forms.py:347 konova/forms.py:305
|
||||||
msgid "Additional comment, maximum {} letters"
|
msgid "Additional comment, maximum {} letters"
|
||||||
msgstr "Zusätzlicher Kommentar, maximal {} Zeichen"
|
msgstr "Zusätzlicher Kommentar, maximal {} Zeichen"
|
||||||
|
|
||||||
#: compensation/forms.py:231
|
#: compensation/forms.py:246
|
||||||
msgid "New deadline"
|
msgid "New deadline"
|
||||||
msgstr "Neue Frist"
|
msgstr "Neue Frist"
|
||||||
|
|
||||||
#: compensation/forms.py:232
|
#: compensation/forms.py:247
|
||||||
msgid "Insert data for the new deadline"
|
msgid "Insert data for the new deadline"
|
||||||
msgstr "Geben Sie die Daten der neuen Frist ein"
|
msgstr "Geben Sie die Daten der neuen Frist ein"
|
||||||
|
|
||||||
#: compensation/forms.py:249
|
#: compensation/forms.py:264
|
||||||
msgid "Added deadline"
|
msgid "Added deadline"
|
||||||
msgstr "Frist/Termin hinzugefügt"
|
msgstr "Frist/Termin hinzugefügt"
|
||||||
|
|
||||||
#: compensation/forms.py:260
|
#: compensation/forms.py:275
|
||||||
msgid "Action Type"
|
msgid "Action Type"
|
||||||
msgstr "Maßnahmentyp"
|
msgstr "Maßnahmentyp"
|
||||||
|
|
||||||
#: compensation/forms.py:263
|
#: compensation/forms.py:278
|
||||||
msgid "Select the action type"
|
msgid "Select the action type"
|
||||||
msgstr "Maßnahmentyp wählen"
|
msgstr "Maßnahmentyp wählen"
|
||||||
|
|
||||||
#: compensation/forms.py:266
|
#: compensation/forms.py:285
|
||||||
|
#: compensation/templates/compensation/detail/compensation/includes/actions.html:37
|
||||||
|
#: compensation/templates/compensation/detail/compensation/includes/deadlines.html:37
|
||||||
|
#: compensation/templates/compensation/detail/compensation/includes/documents.html:34
|
||||||
|
#: compensation/templates/compensation/detail/compensation/includes/states-after.html:39
|
||||||
|
#: compensation/templates/compensation/detail/compensation/includes/states-before.html:39
|
||||||
|
#: compensation/templates/compensation/detail/eco_account/includes/actions.html:37
|
||||||
|
#: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:37
|
||||||
|
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:34
|
||||||
|
#: compensation/templates/compensation/detail/eco_account/includes/states-after.html:39
|
||||||
|
#: compensation/templates/compensation/detail/eco_account/includes/states-before.html:39
|
||||||
|
#: compensation/templates/compensation/detail/eco_account/includes/withdraws.html:37
|
||||||
|
#: ema/templates/ema/detail/includes/actions.html:37
|
||||||
|
#: ema/templates/ema/detail/includes/deadlines.html:37
|
||||||
|
#: ema/templates/ema/detail/includes/documents.html:34
|
||||||
|
#: ema/templates/ema/detail/includes/states-after.html:39
|
||||||
|
#: ema/templates/ema/detail/includes/states-before.html:39
|
||||||
|
#: intervention/templates/intervention/detail/includes/compensations.html:36
|
||||||
|
#: intervention/templates/intervention/detail/includes/documents.html:34
|
||||||
|
#: intervention/templates/intervention/detail/includes/payments.html:37
|
||||||
|
#: intervention/templates/intervention/detail/includes/revocation.html:41
|
||||||
|
#: intervention/templates/intervention/detail/includes/withdraws.html:37
|
||||||
|
#: templates/log.html:10
|
||||||
|
msgid "Action"
|
||||||
|
msgstr "Aktionen"
|
||||||
|
|
||||||
|
#: compensation/forms.py:291
|
||||||
msgid "Unit"
|
msgid "Unit"
|
||||||
msgstr "Einheit"
|
msgstr "Einheit"
|
||||||
|
|
||||||
#: compensation/forms.py:269
|
#: compensation/forms.py:294
|
||||||
msgid "Select the unit"
|
msgid "Select the unit"
|
||||||
msgstr "Einheit wählen"
|
msgstr "Einheit wählen"
|
||||||
|
|
||||||
#: compensation/forms.py:281
|
#: compensation/forms.py:306
|
||||||
msgid "Insert the amount"
|
msgid "Insert the amount"
|
||||||
msgstr "Menge eingeben"
|
msgstr "Menge eingeben"
|
||||||
|
|
||||||
#: compensation/forms.py:301
|
#: compensation/forms.py:326
|
||||||
msgid "New action"
|
msgid "New action"
|
||||||
msgstr "Neue Maßnahme"
|
msgstr "Neue Maßnahme"
|
||||||
|
|
||||||
#: compensation/forms.py:302
|
#: compensation/forms.py:327
|
||||||
msgid "Insert data for the new action"
|
msgid "Insert data for the new action"
|
||||||
msgstr "Geben Sie die Daten der neuen Maßnahme ein"
|
msgstr "Geben Sie die Daten der neuen Maßnahme ein"
|
||||||
|
|
||||||
#: compensation/forms.py:321
|
#: compensation/forms.py:346
|
||||||
msgid "Added action"
|
msgid "Added action"
|
||||||
msgstr "Maßnahme hinzugefügt"
|
msgstr "Maßnahme hinzugefügt"
|
||||||
|
|
||||||
@ -226,7 +252,7 @@ msgstr "Kennung"
|
|||||||
|
|
||||||
#: compensation/tables.py:29 compensation/tables.py:169
|
#: compensation/tables.py:29 compensation/tables.py:169
|
||||||
#: 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:24
|
#: compensation/templates/compensation/detail/compensation/view.html:31
|
||||||
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:28
|
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:28
|
||||||
#: compensation/templates/compensation/detail/eco_account/view.html:31
|
#: compensation/templates/compensation/detail/eco_account/view.html:31
|
||||||
#: ema/tables.py:33 ema/templates/ema/detail/includes/documents.html:28
|
#: ema/tables.py:33 ema/templates/ema/detail/includes/documents.html:28
|
||||||
@ -239,14 +265,14 @@ msgid "Title"
|
|||||||
msgstr "Bezeichnung"
|
msgstr "Bezeichnung"
|
||||||
|
|
||||||
#: compensation/tables.py:34
|
#: compensation/tables.py:34
|
||||||
#: compensation/templates/compensation/detail/compensation/view.html:36
|
#: compensation/templates/compensation/detail/compensation/view.html:43
|
||||||
#: intervention/tables.py:33
|
#: intervention/tables.py:33
|
||||||
#: intervention/templates/intervention/detail/view.html:63 user/models.py:48
|
#: intervention/templates/intervention/detail/view.html:63 user/models.py:48
|
||||||
msgid "Checked"
|
msgid "Checked"
|
||||||
msgstr "Geprüft"
|
msgstr "Geprüft"
|
||||||
|
|
||||||
#: compensation/tables.py:40 compensation/tables.py:179
|
#: compensation/tables.py:40 compensation/tables.py:179
|
||||||
#: compensation/templates/compensation/detail/compensation/view.html:50
|
#: compensation/templates/compensation/detail/compensation/view.html:57
|
||||||
#: compensation/templates/compensation/detail/eco_account/view.html:43
|
#: compensation/templates/compensation/detail/eco_account/view.html:43
|
||||||
#: ema/tables.py:38 ema/templates/ema/detail/view.html:28
|
#: ema/tables.py:38 ema/templates/ema/detail/view.html:28
|
||||||
#: intervention/tables.py:39
|
#: intervention/tables.py:39
|
||||||
@ -275,7 +301,7 @@ msgid "Open {}"
|
|||||||
msgstr "Öffne {}"
|
msgstr "Öffne {}"
|
||||||
|
|
||||||
#: compensation/tables.py:83
|
#: compensation/tables.py:83
|
||||||
#: compensation/templates/compensation/detail/compensation/view.html:12
|
#: compensation/templates/compensation/detail/compensation/view.html:19
|
||||||
#: konova/templates/konova/home.html:49 templates/navbar.html:28
|
#: konova/templates/konova/home.html:49 templates/navbar.html:28
|
||||||
msgid "Compensation"
|
msgid "Compensation"
|
||||||
msgstr "Kompensation"
|
msgstr "Kompensation"
|
||||||
@ -289,7 +315,7 @@ msgid "Checked on {} by {}"
|
|||||||
msgstr "Am {} von {} geprüft worden"
|
msgstr "Am {} von {} geprüft worden"
|
||||||
|
|
||||||
#: compensation/tables.py:128
|
#: compensation/tables.py:128
|
||||||
#: compensation/templates/compensation/detail/compensation/view.html:53
|
#: compensation/templates/compensation/detail/compensation/view.html:60
|
||||||
#: compensation/templates/compensation/detail/eco_account/view.html:46
|
#: compensation/templates/compensation/detail/eco_account/view.html:46
|
||||||
#: ema/tables.py:101 ema/templates/ema/detail/view.html:31
|
#: ema/tables.py:101 ema/templates/ema/detail/view.html:31
|
||||||
#: intervention/tables.py:135
|
#: intervention/tables.py:135
|
||||||
@ -360,31 +386,6 @@ msgctxt "Compensation"
|
|||||||
msgid "Amount"
|
msgid "Amount"
|
||||||
msgstr "Menge"
|
msgstr "Menge"
|
||||||
|
|
||||||
#: compensation/templates/compensation/detail/compensation/includes/actions.html:37
|
|
||||||
#: compensation/templates/compensation/detail/compensation/includes/deadlines.html:37
|
|
||||||
#: compensation/templates/compensation/detail/compensation/includes/documents.html:34
|
|
||||||
#: compensation/templates/compensation/detail/compensation/includes/states-after.html:39
|
|
||||||
#: compensation/templates/compensation/detail/compensation/includes/states-before.html:39
|
|
||||||
#: compensation/templates/compensation/detail/eco_account/includes/actions.html:37
|
|
||||||
#: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:37
|
|
||||||
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:34
|
|
||||||
#: compensation/templates/compensation/detail/eco_account/includes/states-after.html:39
|
|
||||||
#: compensation/templates/compensation/detail/eco_account/includes/states-before.html:39
|
|
||||||
#: compensation/templates/compensation/detail/eco_account/includes/withdraws.html:37
|
|
||||||
#: ema/templates/ema/detail/includes/actions.html:37
|
|
||||||
#: ema/templates/ema/detail/includes/deadlines.html:37
|
|
||||||
#: ema/templates/ema/detail/includes/documents.html:34
|
|
||||||
#: ema/templates/ema/detail/includes/states-after.html:39
|
|
||||||
#: ema/templates/ema/detail/includes/states-before.html:39
|
|
||||||
#: intervention/templates/intervention/detail/includes/compensations.html:36
|
|
||||||
#: intervention/templates/intervention/detail/includes/documents.html:34
|
|
||||||
#: intervention/templates/intervention/detail/includes/payments.html:37
|
|
||||||
#: intervention/templates/intervention/detail/includes/revocation.html:41
|
|
||||||
#: intervention/templates/intervention/detail/includes/withdraws.html:37
|
|
||||||
#: templates/log.html:10
|
|
||||||
msgid "Action"
|
|
||||||
msgstr "Aktionen"
|
|
||||||
|
|
||||||
#: compensation/templates/compensation/detail/compensation/includes/actions.html:51
|
#: compensation/templates/compensation/detail/compensation/includes/actions.html:51
|
||||||
#: compensation/templates/compensation/detail/eco_account/includes/actions.html:51
|
#: compensation/templates/compensation/detail/eco_account/includes/actions.html:51
|
||||||
#: ema/templates/ema/detail/includes/actions.html:51
|
#: ema/templates/ema/detail/includes/actions.html:51
|
||||||
@ -527,17 +528,17 @@ msgstr "Neuen Ausgangszustand hinzufügen"
|
|||||||
msgid "Missing surfaces according to states after: "
|
msgid "Missing surfaces according to states after: "
|
||||||
msgstr "Fehlende Flächenmengen laut Zielzustand: "
|
msgstr "Fehlende Flächenmengen laut Zielzustand: "
|
||||||
|
|
||||||
#: compensation/templates/compensation/detail/compensation/view.html:28
|
#: compensation/templates/compensation/detail/compensation/view.html:35
|
||||||
msgid "compensates intervention"
|
msgid "compensates intervention"
|
||||||
msgstr "kompensiert Eingriff"
|
msgstr "kompensiert Eingriff"
|
||||||
|
|
||||||
#: compensation/templates/compensation/detail/compensation/view.html:43
|
#: compensation/templates/compensation/detail/compensation/view.html:50
|
||||||
#: intervention/templates/intervention/detail/view.html:70
|
#: intervention/templates/intervention/detail/view.html:70
|
||||||
msgid "Checked on "
|
msgid "Checked on "
|
||||||
msgstr "Geprüft am "
|
msgstr "Geprüft am "
|
||||||
|
|
||||||
#: compensation/templates/compensation/detail/compensation/view.html:43
|
#: compensation/templates/compensation/detail/compensation/view.html:50
|
||||||
#: compensation/templates/compensation/detail/compensation/view.html:57
|
#: compensation/templates/compensation/detail/compensation/view.html:64
|
||||||
#: compensation/templates/compensation/detail/eco_account/view.html:50
|
#: compensation/templates/compensation/detail/eco_account/view.html:50
|
||||||
#: ema/templates/ema/detail/view.html:35
|
#: ema/templates/ema/detail/view.html:35
|
||||||
#: intervention/templates/intervention/detail/view.html:70
|
#: intervention/templates/intervention/detail/view.html:70
|
||||||
@ -545,21 +546,21 @@ msgstr "Geprüft am "
|
|||||||
msgid "by"
|
msgid "by"
|
||||||
msgstr "von"
|
msgstr "von"
|
||||||
|
|
||||||
#: compensation/templates/compensation/detail/compensation/view.html:57
|
#: compensation/templates/compensation/detail/compensation/view.html:64
|
||||||
#: compensation/templates/compensation/detail/eco_account/view.html:50
|
#: compensation/templates/compensation/detail/eco_account/view.html:50
|
||||||
#: ema/templates/ema/detail/view.html:35
|
#: ema/templates/ema/detail/view.html:35
|
||||||
#: intervention/templates/intervention/detail/view.html:84
|
#: intervention/templates/intervention/detail/view.html:84
|
||||||
msgid "Recorded on "
|
msgid "Recorded on "
|
||||||
msgstr "Verzeichnet am"
|
msgstr "Verzeichnet am"
|
||||||
|
|
||||||
#: compensation/templates/compensation/detail/compensation/view.html:64
|
#: compensation/templates/compensation/detail/compensation/view.html:71
|
||||||
#: compensation/templates/compensation/detail/eco_account/view.html:69
|
#: compensation/templates/compensation/detail/eco_account/view.html:69
|
||||||
#: ema/templates/ema/detail/view.html:54
|
#: ema/templates/ema/detail/view.html:54
|
||||||
#: intervention/templates/intervention/detail/view.html:103
|
#: intervention/templates/intervention/detail/view.html:103
|
||||||
msgid "Last modified"
|
msgid "Last modified"
|
||||||
msgstr "Zuletzt bearbeitet"
|
msgstr "Zuletzt bearbeitet"
|
||||||
|
|
||||||
#: compensation/templates/compensation/detail/compensation/view.html:72
|
#: compensation/templates/compensation/detail/compensation/view.html:79
|
||||||
#: compensation/templates/compensation/detail/eco_account/view.html:77
|
#: compensation/templates/compensation/detail/eco_account/view.html:77
|
||||||
#: ema/templates/ema/detail/view.html:69 intervention/forms.py:255
|
#: ema/templates/ema/detail/view.html:69 intervention/forms.py:255
|
||||||
#: intervention/templates/intervention/detail/view.html:111
|
#: intervention/templates/intervention/detail/view.html:111
|
||||||
@ -903,7 +904,8 @@ msgid ""
|
|||||||
"Eco-account {} is not recorded yet. You can only withdraw from recorded "
|
"Eco-account {} is not recorded yet. You can only withdraw from recorded "
|
||||||
"accounts."
|
"accounts."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Ökokonto {} ist noch nicht verzeichnet. Abbuchungen können nur von verzeichneten Ökokonten erfolgen."
|
"Ökokonto {} ist noch nicht verzeichnet. Abbuchungen können nur von "
|
||||||
|
"verzeichneten Ökokonten erfolgen."
|
||||||
|
|
||||||
#: intervention/forms.py:544
|
#: intervention/forms.py:544
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
The modal wrapper, which can be used on every view can stay on the base.html template
|
The modal wrapper, which can be used on every view can stay on the base.html template
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
<div class="modal fade" tabindex="-1" role="dialog" id="modal">
|
<div class="modal fade" tabindex="-1" role="dialog" id="modal">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog modal-md modal-lg" role="document">
|
||||||
<div class="modal-content"></div>
|
<div class="modal-content"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user