diff --git a/codelist/models.py b/codelist/models.py index d5be5b10..de7a2100 100644 --- a/codelist/models.py +++ b/codelist/models.py @@ -65,6 +65,26 @@ class KonovaCode(models.Model): ret_val += ", " + self.parent.long_name return ret_val + def add_children(self): + """ Adds all children (resurcively until leaf) as .children to the KonovaCode + + Returns: + code (KonovaCode): The manipulated KonovaCode instance + """ + if self.is_leaf: + return None + + children = KonovaCode.objects.filter( + code_lists__in=self.code_lists.all(), + parent=self + ).order_by( + "long_name" + ) + self.children = children + for child in children: + child.add_children() + return self + class KonovaCodeList(models.Model): """ diff --git a/compensation/forms/modalForms.py b/compensation/forms/modalForms.py index 6dc0c98e..a8d38aa2 100644 --- a/compensation/forms/modalForms.py +++ b/compensation/forms/modalForms.py @@ -11,14 +11,13 @@ from django import forms from django.contrib import messages from django.http import HttpRequest, HttpResponseRedirect from django.shortcuts import render -from django.urls import reverse from django.utils.translation import pgettext_lazy as _con, gettext_lazy as _ from codelist.models import KonovaCode from codelist.settings import CODELIST_BIOTOPES_ID, CODELIST_COMPENSATION_ACTION_ID, CODELIST_BIOTOPES_EXTRA_CODES_ID, \ CODELIST_COMPENSATION_ACTION_DETAIL_ID from compensation.models import CompensationDocument, EcoAccountDocument -from intervention.inputs import TreeSelectMultiple +from intervention.inputs import CompensationActionTreeCheckboxSelectMultiple from konova.contexts import BaseContext from konova.forms import BaseModalForm, NewDocumentModalForm, RemoveModalForm from konova.models import DeadlineType @@ -407,18 +406,13 @@ class NewActionModalForm(BaseModalForm): """ from compensation.models import UnitChoices - action_type = forms.ModelMultipleChoiceField( + action_type = forms.MultipleChoiceField( label=_("Action Type"), label_suffix="", required=True, help_text=_("Select the action type"), - queryset=KonovaCode.objects.filter( - code_lists__in=[CODELIST_COMPENSATION_ACTION_ID], - is_archived=False, - ), - widget=TreeSelectMultiple( - url=None, - ), + choices=[], + widget=CompensationActionTreeCheckboxSelectMultiple(), ) action_type_details = forms.ModelMultipleChoiceField( label=_("Action Type detail"), @@ -480,14 +474,16 @@ class NewActionModalForm(BaseModalForm): super().__init__(*args, **kwargs) self.form_title = _("New action") self.form_caption = _("Insert data for the new action") - url = reverse("codes-action-children") - self.fields["action_type"].widget.attrs = { - "url": url, - } - - def is_valid(self): - super_valid = super().is_valid() - return super_valid + choices =KonovaCode.objects.filter( + code_lists__in=[CODELIST_COMPENSATION_ACTION_ID], + is_archived=False, + is_leaf=True, + ).values_list("id", flat=True) + choices = [ + (choice, choice) + for choice in choices + ] + self.fields["action_type"].choices = choices def save(self): action = self.instance.add_action(self) @@ -502,7 +498,7 @@ class EditCompensationActionModalForm(NewActionModalForm): self.action = kwargs.pop("action", None) super().__init__(*args, **kwargs) form_data = { - "action_type": self.action.action_type.all(), + "action_type": list(self.action.action_type.values_list("id", flat=True)), "action_type_details": self.action.action_type_details.all(), "amount": self.action.amount, "unit": self.action.unit, diff --git a/compensation/templates/compensation/detail/compensation/includes/actions.html b/compensation/templates/compensation/detail/compensation/includes/actions.html index 18e9304b..87f49141 100644 --- a/compensation/templates/compensation/detail/compensation/includes/actions.html +++ b/compensation/templates/compensation/detail/compensation/includes/actions.html @@ -47,17 +47,15 @@ {% for action in actions %} - - {% if action.action_type_details.count > 0 %} -
- {% for detail in action.action_type_details.all %} - {{detail.long_name}} - {% endfor %} - {% endif %} + {% for type in action.action_type.all %} +
{{type.parent.parent.long_name}} {% fa5_icon 'angle-right' %} {{type.parent.long_name}} {% fa5_icon 'angle-right' %} {{type.long_name}}
+
+ {% endfor %} + {% for detail in action.action_type_details.all %} + {{detail.long_name}} + {% empty %} + {% trans 'No action type details' %} + {% endfor %} {{ action.amount|floatformat:2|intcomma }} {{ action.unit_humanize }} diff --git a/compensation/templates/compensation/detail/compensation/view.html b/compensation/templates/compensation/detail/compensation/view.html index 17f79bc8..c5ff41d6 100644 --- a/compensation/templates/compensation/detail/compensation/view.html +++ b/compensation/templates/compensation/detail/compensation/view.html @@ -2,10 +2,6 @@ {% load i18n l10n static fontawesome_5 humanize ksp_filters %} {% block head %} - {% comment %} - Needed for custom Checkbox Tree Select Widget - {% endcomment %} - {% include 'form/scripts/jstree-scripts.html' %} {% comment %} dal documentation (django-autocomplete-light) states using form.media for adding needed scripts. diff --git a/compensation/templates/compensation/detail/eco_account/includes/actions.html b/compensation/templates/compensation/detail/eco_account/includes/actions.html index 092c5e8d..8ae7c8fd 100644 --- a/compensation/templates/compensation/detail/eco_account/includes/actions.html +++ b/compensation/templates/compensation/detail/eco_account/includes/actions.html @@ -46,17 +46,15 @@ {% for action in actions %} - - {% if action.action_type_details.count > 0 %} -
- {% for detail in action.action_type_details.all %} - {{detail.long_name}} - {% endfor %} - {% endif %} + {% for type in action.action_type.all %} +
{{type.parent.parent.long_name}} {% fa5_icon 'angle-right' %} {{type.parent.long_name}} {% fa5_icon 'angle-right' %} {{type.long_name}}
+
+ {% endfor %} + {% for detail in action.action_type_details.all %} + {{detail.long_name}} + {% empty %} + {% trans 'No action type details' %} + {% endfor %} {{ action.amount|floatformat:2|intcomma }} {{ action.unit_humanize }} diff --git a/compensation/templates/compensation/detail/eco_account/view.html b/compensation/templates/compensation/detail/eco_account/view.html index 132e0b61..288b971d 100644 --- a/compensation/templates/compensation/detail/eco_account/view.html +++ b/compensation/templates/compensation/detail/eco_account/view.html @@ -2,10 +2,6 @@ {% load i18n l10n static fontawesome_5 humanize %} {% block head %} - {% comment %} - Needed for custom Checkbox Tree Select Widget - {% endcomment %} - {% include 'form/scripts/jstree-scripts.html' %} {% comment %} dal documentation (django-autocomplete-light) states using form.media for adding needed scripts. diff --git a/ema/templates/ema/detail/includes/actions.html b/ema/templates/ema/detail/includes/actions.html index 9d91caf0..0c352c11 100644 --- a/ema/templates/ema/detail/includes/actions.html +++ b/ema/templates/ema/detail/includes/actions.html @@ -44,17 +44,15 @@ {% for action in obj.actions.all %} - - {% if action.action_type_details.count > 0 %} -
- {% for detail in action.action_type_details.all %} - {{detail.long_name}} - {% endfor %} - {% endif %} + {% for type in action.action_type.all %} +
{{type.parent.parent.long_name}} {% fa5_icon 'angle-right' %} {{type.parent.long_name}} {% fa5_icon 'angle-right' %} {{type.long_name}}
+
+ {% endfor %} + {% for detail in action.action_type_details.all %} + {{detail.long_name}} + {% empty %} + {% trans 'No action type details' %} + {% endfor %} {{ action.amount|floatformat:2|intcomma }} {{ action.unit_humanize }} diff --git a/ema/templates/ema/detail/view.html b/ema/templates/ema/detail/view.html index cdab570d..32ddd66b 100644 --- a/ema/templates/ema/detail/view.html +++ b/ema/templates/ema/detail/view.html @@ -2,11 +2,6 @@ {% load i18n l10n static fontawesome_5 humanize %} {% block head %} - {% comment %} - Needed for custom Checkbox Tree Select Widget - {% endcomment %} - {% include 'form/scripts/jstree-scripts.html' %} - {% 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. diff --git a/intervention/inputs.py b/intervention/inputs.py index 9cf8e5ab..34fe0434 100644 --- a/intervention/inputs.py +++ b/intervention/inputs.py @@ -1,5 +1,6 @@ from django import forms -from django.urls import reverse +from codelist.models import KonovaCode +from codelist.settings import CODELIST_COMPENSATION_ACTION_ID class DummyFilterInput(forms.HiddenInput): @@ -33,15 +34,49 @@ class GenerateInput(forms.TextInput): template_name = "konova/widgets/generate-content-input.html" -class TreeSelectMultiple(forms.SelectMultiple): +class TreeCheckboxSelectMultiple(forms.CheckboxSelectMultiple): """ Provides multiple selection of parent-child data """ - template_name = "konova/widgets/checkbox-tree-select-base.html" - url = None + template_name = "konova/widgets/checkbox-tree-select.html" + + class meta: + abstract = True + + +class KonovaCodeTreeCheckboxSelectMultiple(TreeCheckboxSelectMultiple): + """ Provides multiple selection of KonovaCodes + + """ + filter = None def __init__(self, *args, **kwargs): - self.url = kwargs.pop("url", None) - if self.url: - self.url = reverse(self.url) + self.code_list = kwargs.pop("code_list", None) + self.filter = kwargs.pop("filter", {}) super().__init__(*args, **kwargs) + + def get_context(self, name, value, attrs): + context = super().get_context(name, value, attrs) + codes = KonovaCode.objects.filter( + **self.filter, + ) + codes = [ + parent_code.add_children() + for parent_code in codes + ] + context["codes"] = codes + return context + + +class CompensationActionTreeCheckboxSelectMultiple(KonovaCodeTreeCheckboxSelectMultiple): + """ Provides multiple selection of CompensationActions + + """ + filter = None + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.filter = { + "code_lists__in": [CODELIST_COMPENSATION_ACTION_ID], + "parent": None, + } \ No newline at end of file diff --git a/konova/templates/konova/widgets/checkbox-tree-select-base.html b/konova/templates/konova/widgets/checkbox-tree-select-base.html deleted file mode 100644 index 6a10ff02..00000000 --- a/konova/templates/konova/widgets/checkbox-tree-select-base.html +++ /dev/null @@ -1,29 +0,0 @@ - -
- - - \ No newline at end of file diff --git a/konova/templates/konova/widgets/checkbox-tree-select-content.html b/konova/templates/konova/widgets/checkbox-tree-select-content.html deleted file mode 100644 index 13b3a34d..00000000 --- a/konova/templates/konova/widgets/checkbox-tree-select-content.html +++ /dev/null @@ -1,9 +0,0 @@ -{% load l10n %} - - \ No newline at end of file diff --git a/konova/templates/konova/widgets/checkbox-tree-select.html b/konova/templates/konova/widgets/checkbox-tree-select.html new file mode 100644 index 00000000..5b40d3f1 --- /dev/null +++ b/konova/templates/konova/widgets/checkbox-tree-select.html @@ -0,0 +1,23 @@ +{% load l10n fontawesome_5 %} + +
+ {% for code in codes %} +
+ + {% if not code.is_leaf %} +
+ {% with code.children as codes %} + {% include 'konova/widgets/checkbox-tree-select.html' %} + {% endwith %} +
+ {% endif %} +
+ {% endfor %} +
\ No newline at end of file diff --git a/konova/urls.py b/konova/urls.py index 734be3cd..68256e7a 100644 --- a/konova/urls.py +++ b/konova/urls.py @@ -23,7 +23,7 @@ from konova.autocompletes import EcoAccountAutocomplete, \ ShareUserAutocomplete, BiotopeExtraCodeAutocomplete, CompensationActionDetailCodeAutocomplete from konova.settings import SSO_SERVER, SSO_PUBLIC_KEY, SSO_PRIVATE_KEY, DEBUG from konova.sso.sso import KonovaSSOClient -from konova.views import logout_view, home_view, get_konova_code_action_children +from konova.views import logout_view, home_view sso_client = KonovaSSOClient(SSO_SERVER, SSO_PUBLIC_KEY, SSO_PRIVATE_KEY) urlpatterns = [ @@ -40,8 +40,6 @@ urlpatterns = [ path('analysis/', include("analysis.urls")), path('api/', include("api.urls")), - path("codes/comp/action/children", get_konova_code_action_children, name="codes-action-children"), - # Autocomplete paths for all apps path("atcmplt/eco-accounts", EcoAccountAutocomplete.as_view(), name="accounts-autocomplete"), path("atcmplt/interventions", InterventionAutocomplete.as_view(), name="interventions-autocomplete"), diff --git a/konova/views.py b/konova/views.py index 2eac8b20..f3c53f01 100644 --- a/konova/views.py +++ b/konova/views.py @@ -127,24 +127,3 @@ def get_500_view(request: HttpRequest): """ context = BaseContext.context return render(request, "500.html", context, status=500) - - -@login_required -def get_konova_code_action_children(request: HttpRequest): - template = "konova/widgets/checkbox-tree-select-content.html" - _id = request.GET.get("id", None) - if _id == "#": - # Return all! - codes = KonovaCode.objects.filter( - code_lists__in=[CODELIST_COMPENSATION_ACTION_ID], - parent=None, - ) - else: - codes = KonovaCode.objects.filter( - code_lists__in=[CODELIST_COMPENSATION_ACTION_ID], - parent__id=_id, - ) - context = { - "codes": codes - } - return render(request, template, context) \ No newline at end of file diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index 99058358..e9a94ccb 100644 Binary files a/locale/de/LC_MESSAGES/django.mo and b/locale/de/LC_MESSAGES/django.mo differ diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index cd7cd88f..9e5c6bb4 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -3,9 +3,9 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -#: compensation/filters.py:122 compensation/forms/modalForms.py:35 -#: compensation/forms/modalForms.py:46 compensation/forms/modalForms.py:62 -#: compensation/forms/modalForms.py:355 compensation/forms/modalForms.py:471 +#: compensation/filters.py:122 compensation/forms/modalForms.py:37 +#: compensation/forms/modalForms.py:48 compensation/forms/modalForms.py:64 +#: compensation/forms/modalForms.py:357 compensation/forms/modalForms.py:469 #: intervention/forms/forms.py:54 intervention/forms/forms.py:156 #: intervention/forms/forms.py:168 intervention/forms/modalForms.py:127 #: intervention/forms/modalForms.py:140 intervention/forms/modalForms.py:153 @@ -26,7 +26,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-02-10 13:31+0100\n" +"POT-Creation-Date: 2022-02-15 10:08+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -45,7 +45,7 @@ msgid "To" msgstr "Bis" #: analysis/forms.py:47 compensation/forms/forms.py:77 -#: compensation/templates/compensation/detail/eco_account/view.html:58 +#: compensation/templates/compensation/detail/eco_account/view.html:59 #: compensation/templates/compensation/report/eco_account/report.html:16 #: compensation/utils/quality.py:100 ema/templates/ema/detail/view.html:49 #: ema/templates/ema/report/report.html:16 ema/utils/quality.py:26 @@ -95,7 +95,7 @@ msgstr "" #: analysis/templates/analysis/reports/includes/eco_account/amount.html:3 #: analysis/templates/analysis/reports/includes/intervention/amount.html:3 #: analysis/templates/analysis/reports/includes/old_data/amount.html:3 -#: compensation/forms/modalForms.py:455 +#: compensation/forms/modalForms.py:453 #: compensation/templates/compensation/detail/eco_account/includes/deductions.html:34 #: intervention/templates/intervention/detail/includes/deductions.html:31 msgid "Amount" @@ -137,7 +137,7 @@ msgstr "Zuständigkeitsbereich" #: analysis/templates/analysis/reports/includes/intervention/compensated_by.html:8 #: analysis/templates/analysis/reports/includes/intervention/laws.html:17 #: compensation/tables.py:40 -#: compensation/templates/compensation/detail/compensation/view.html:63 +#: compensation/templates/compensation/detail/compensation/view.html:64 #: intervention/tables.py:39 #: intervention/templates/intervention/detail/view.html:68 #: user/models/user_action.py:20 @@ -153,9 +153,9 @@ msgstr "Geprüft" #: analysis/templates/analysis/reports/includes/intervention/laws.html:20 #: analysis/templates/analysis/reports/includes/old_data/amount.html:18 #: compensation/tables.py:46 compensation/tables.py:222 -#: compensation/templates/compensation/detail/compensation/view.html:77 +#: compensation/templates/compensation/detail/compensation/view.html:78 #: compensation/templates/compensation/detail/eco_account/includes/deductions.html:31 -#: compensation/templates/compensation/detail/eco_account/view.html:44 +#: compensation/templates/compensation/detail/eco_account/view.html:45 #: ema/tables.py:44 ema/templates/ema/detail/view.html:35 #: intervention/tables.py:45 #: intervention/templates/intervention/detail/view.html:82 @@ -213,7 +213,7 @@ msgstr "Abbuchungen" #: analysis/templates/analysis/reports/includes/eco_account/deductions.html:9 #: analysis/templates/analysis/reports/includes/eco_account/deductions.html:11 -#: compensation/forms/modalForms.py:193 +#: compensation/forms/modalForms.py:195 #: compensation/templates/compensation/detail/compensation/includes/states-after.html:36 #: compensation/templates/compensation/detail/compensation/includes/states-before.html:36 #: compensation/templates/compensation/detail/eco_account/includes/states-after.html:36 @@ -239,14 +239,14 @@ msgstr "Kompensationsart" #: analysis/templates/analysis/reports/includes/intervention/compensated_by.html:15 #: analysis/templates/analysis/reports/includes/old_data/amount.html:29 -#: compensation/templates/compensation/detail/compensation/view.html:19 +#: compensation/templates/compensation/detail/compensation/view.html:20 #: konova/templates/konova/includes/quickstart/compensations.html:4 #: templates/navbars/navbar.html:28 msgid "Compensation" msgstr "Kompensation" #: analysis/templates/analysis/reports/includes/intervention/compensated_by.html:21 -#: compensation/forms/modalForms.py:75 +#: compensation/forms/modalForms.py:77 msgid "Payment" msgstr "Zahlung" @@ -293,7 +293,7 @@ msgstr "Eingriff" #: analysis/templates/analysis/reports/includes/old_data/amount.html:34 #: compensation/tables.py:266 -#: compensation/templates/compensation/detail/eco_account/view.html:19 +#: compensation/templates/compensation/detail/eco_account/view.html:20 #: intervention/forms/modalForms.py:322 intervention/forms/modalForms.py:329 #: konova/templates/konova/includes/quickstart/ecoaccounts.html:4 #: templates/navbars/navbar.html:34 @@ -327,9 +327,9 @@ msgstr "Automatisch generiert" #: compensation/forms/forms.py:44 compensation/tables.py:30 #: compensation/tables.py:202 #: compensation/templates/compensation/detail/compensation/includes/documents.html:28 -#: compensation/templates/compensation/detail/compensation/view.html:31 +#: compensation/templates/compensation/detail/compensation/view.html:32 #: 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:32 #: compensation/templates/compensation/report/compensation/report.html:12 #: compensation/templates/compensation/report/eco_account/report.html:12 #: ema/tables.py:34 ema/templates/ema/detail/includes/documents.html:28 @@ -352,8 +352,8 @@ msgstr "Aussagekräftiger Titel" msgid "Compensation XY; Location ABC" msgstr "Kompensation XY; Flur ABC" -#: compensation/forms/forms.py:57 compensation/forms/modalForms.py:61 -#: compensation/forms/modalForms.py:354 compensation/forms/modalForms.py:470 +#: compensation/forms/forms.py:57 compensation/forms/modalForms.py:63 +#: compensation/forms/modalForms.py:356 compensation/forms/modalForms.py:468 #: compensation/templates/compensation/detail/compensation/includes/actions.html:35 #: compensation/templates/compensation/detail/compensation/includes/deadlines.html:34 #: compensation/templates/compensation/detail/compensation/includes/documents.html:34 @@ -371,13 +371,13 @@ msgstr "Kompensation XY; Flur ABC" msgid "Comment" msgstr "Kommentar" -#: compensation/forms/forms.py:59 compensation/forms/modalForms.py:472 +#: compensation/forms/forms.py:59 compensation/forms/modalForms.py:470 #: intervention/forms/forms.py:182 msgid "Additional comment" msgstr "Zusätzlicher Kommentar" #: compensation/forms/forms.py:93 -#: compensation/templates/compensation/detail/eco_account/view.html:62 +#: compensation/templates/compensation/detail/eco_account/view.html:63 #: compensation/templates/compensation/report/eco_account/report.html:20 #: compensation/utils/quality.py:102 ema/templates/ema/detail/view.html:53 #: ema/templates/ema/report/report.html:20 ema/utils/quality.py:28 @@ -422,7 +422,7 @@ msgid "" msgstr "Optional: Handelt es sich um eine Kohärenzsicherungsmaßnahme?" #: compensation/forms/forms.py:156 -#: compensation/templates/compensation/detail/compensation/view.html:35 +#: compensation/templates/compensation/detail/compensation/view.html:36 #: compensation/templates/compensation/report/compensation/report.html:16 msgid "compensates intervention" msgstr "kompensiert Eingriff" @@ -448,7 +448,7 @@ msgid "The amount that can be used for deductions" msgstr "Die für Abbuchungen zur Verfügung stehende Menge" #: compensation/forms/forms.py:328 -#: compensation/templates/compensation/detail/eco_account/view.html:66 +#: compensation/templates/compensation/detail/eco_account/view.html:67 #: compensation/utils/quality.py:72 msgid "Agreement date" msgstr "Vereinbarungsdatum" @@ -469,73 +469,73 @@ msgstr "Ökokonto XY; Flur ABC" msgid "Edit Eco-Account" msgstr "Ökokonto bearbeiten" -#: compensation/forms/modalForms.py:36 +#: compensation/forms/modalForms.py:38 msgid "in Euro" msgstr "in Euro" -#: compensation/forms/modalForms.py:45 +#: compensation/forms/modalForms.py:47 #: intervention/templates/intervention/detail/includes/payments.html:31 msgid "Due on" msgstr "Fällig am" -#: compensation/forms/modalForms.py:48 +#: compensation/forms/modalForms.py:50 msgid "Due on which date" msgstr "Zahlung wird an diesem Datum erwartet" -#: compensation/forms/modalForms.py:63 compensation/forms/modalForms.py:356 +#: compensation/forms/modalForms.py:65 compensation/forms/modalForms.py:358 #: intervention/forms/modalForms.py:154 konova/forms.py:395 msgid "Additional comment, maximum {} letters" msgstr "Zusätzlicher Kommentar, maximal {} Zeichen" -#: compensation/forms/modalForms.py:76 +#: compensation/forms/modalForms.py:78 msgid "Add a payment for intervention '{}'" msgstr "Neue Ersatzzahlung zu Eingriff '{}' hinzufügen" -#: compensation/forms/modalForms.py:96 +#: compensation/forms/modalForms.py:98 msgid "If there is no date you can enter, please explain why." msgstr "Falls Sie kein Datum angeben können, erklären Sie bitte weshalb." -#: compensation/forms/modalForms.py:157 compensation/forms/modalForms.py:169 +#: compensation/forms/modalForms.py:159 compensation/forms/modalForms.py:171 msgid "Biotope Type" msgstr "Biotoptyp" -#: compensation/forms/modalForms.py:160 +#: compensation/forms/modalForms.py:162 msgid "Select the biotope type" msgstr "Biotoptyp wählen" -#: compensation/forms/modalForms.py:174 compensation/forms/modalForms.py:186 +#: compensation/forms/modalForms.py:176 compensation/forms/modalForms.py:188 msgid "Biotope additional type" msgstr "Zusatzbezeichnung" -#: compensation/forms/modalForms.py:177 +#: compensation/forms/modalForms.py:179 msgid "Select an additional biotope type" msgstr "Zusatzbezeichnung wählen" -#: compensation/forms/modalForms.py:196 intervention/forms/modalForms.py:340 +#: compensation/forms/modalForms.py:198 intervention/forms/modalForms.py:340 msgid "in m²" msgstr "" -#: compensation/forms/modalForms.py:207 +#: compensation/forms/modalForms.py:209 msgid "New state" msgstr "Neuer Zustand" -#: compensation/forms/modalForms.py:208 +#: compensation/forms/modalForms.py:210 msgid "Insert data for the new state" msgstr "Geben Sie die Daten des neuen Zustandes ein" -#: compensation/forms/modalForms.py:215 konova/forms.py:193 +#: compensation/forms/modalForms.py:217 konova/forms.py:193 msgid "Object removed" msgstr "Objekt entfernt" -#: compensation/forms/modalForms.py:326 +#: compensation/forms/modalForms.py:328 msgid "Deadline Type" msgstr "Fristart" -#: compensation/forms/modalForms.py:329 +#: compensation/forms/modalForms.py:331 msgid "Select the deadline type" msgstr "Fristart wählen" -#: compensation/forms/modalForms.py:338 +#: compensation/forms/modalForms.py:340 #: compensation/templates/compensation/detail/compensation/includes/deadlines.html:31 #: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:31 #: ema/templates/ema/detail/includes/deadlines.html:31 @@ -543,101 +543,75 @@ msgstr "Fristart wählen" msgid "Date" msgstr "Datum" -#: compensation/forms/modalForms.py:341 +#: compensation/forms/modalForms.py:343 msgid "Select date" msgstr "Datum wählen" -#: compensation/forms/modalForms.py:368 +#: compensation/forms/modalForms.py:370 msgid "New deadline" msgstr "Neue Frist" -#: compensation/forms/modalForms.py:369 +#: compensation/forms/modalForms.py:371 msgid "Insert data for the new deadline" msgstr "Geben Sie die Daten der neuen Frist ein" -#: compensation/forms/modalForms.py:409 +#: compensation/forms/modalForms.py:411 msgid "Action Type" msgstr "Maßnahmentyp" -#: compensation/forms/modalForms.py:412 +#: compensation/forms/modalForms.py:414 msgid "Select the action type" msgstr "Maßnahmentyp wählen" -#: compensation/forms/modalForms.py:421 -#: compensation/templates/compensation/detail/compensation/includes/actions.html:40 -#: compensation/templates/compensation/detail/compensation/includes/deadlines.html:39 -#: compensation/templates/compensation/detail/compensation/includes/documents.html:39 -#: compensation/templates/compensation/detail/compensation/includes/states-after.html:41 -#: compensation/templates/compensation/detail/compensation/includes/states-before.html:41 -#: compensation/templates/compensation/detail/eco_account/includes/actions.html:39 -#: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:38 -#: compensation/templates/compensation/detail/eco_account/includes/deductions.html:41 -#: compensation/templates/compensation/detail/eco_account/includes/documents.html:38 -#: compensation/templates/compensation/detail/eco_account/includes/states-after.html:41 -#: compensation/templates/compensation/detail/eco_account/includes/states-before.html:41 -#: ema/templates/ema/detail/includes/actions.html:38 -#: ema/templates/ema/detail/includes/deadlines.html:38 -#: ema/templates/ema/detail/includes/documents.html:38 -#: ema/templates/ema/detail/includes/states-after.html:40 -#: ema/templates/ema/detail/includes/states-before.html:40 -#: intervention/templates/intervention/detail/includes/compensations.html:38 -#: intervention/templates/intervention/detail/includes/deductions.html:39 -#: intervention/templates/intervention/detail/includes/documents.html:39 -#: intervention/templates/intervention/detail/includes/payments.html:39 -#: intervention/templates/intervention/detail/includes/revocation.html:43 -#: templates/log.html:10 -msgid "Action" -msgstr "Aktionen" - -#: compensation/forms/modalForms.py:426 compensation/forms/modalForms.py:438 +#: compensation/forms/modalForms.py:424 compensation/forms/modalForms.py:436 msgid "Action Type detail" msgstr "Zusatzmerkmal" -#: compensation/forms/modalForms.py:429 +#: compensation/forms/modalForms.py:427 msgid "Select the action type detail" msgstr "Zusatzmerkmal wählen" -#: compensation/forms/modalForms.py:443 +#: compensation/forms/modalForms.py:441 msgid "Unit" msgstr "Einheit" -#: compensation/forms/modalForms.py:446 +#: compensation/forms/modalForms.py:444 msgid "Select the unit" msgstr "Einheit wählen" -#: compensation/forms/modalForms.py:458 +#: compensation/forms/modalForms.py:456 msgid "Insert the amount" msgstr "Menge eingeben" -#: compensation/forms/modalForms.py:483 +#: compensation/forms/modalForms.py:481 msgid "New action" msgstr "Neue Maßnahme" -#: compensation/forms/modalForms.py:484 +#: compensation/forms/modalForms.py:482 msgid "Insert data for the new action" msgstr "Geben Sie die Daten der neuen Maßnahme ein" -#: compensation/models/action.py:22 +#: compensation/models/action.py:20 msgid "cm" msgstr "" -#: compensation/models/action.py:23 +#: compensation/models/action.py:21 msgid "m" msgstr "" -#: compensation/models/action.py:24 +#: compensation/models/action.py:22 msgid "km" msgstr "" -#: compensation/models/action.py:25 +#: compensation/models/action.py:23 msgid "m²" msgstr "" -#: compensation/models/action.py:26 +#: compensation/models/action.py:24 msgid "ha" msgstr "" -#: compensation/models/action.py:27 +#: compensation/models/action.py:25 msgid "Pieces" msgstr "Stück" @@ -685,9 +659,9 @@ msgid "Checked on {} by {}" msgstr "Am {} von {} geprüft worden" #: compensation/tables.py:160 -#: compensation/templates/compensation/detail/compensation/view.html:80 +#: compensation/templates/compensation/detail/compensation/view.html:81 #: compensation/templates/compensation/detail/eco_account/includes/deductions.html:58 -#: compensation/templates/compensation/detail/eco_account/view.html:47 +#: compensation/templates/compensation/detail/eco_account/view.html:48 #: ema/tables.py:131 ema/templates/ema/detail/view.html:38 #: intervention/tables.py:157 #: intervention/templates/intervention/detail/view.html:85 @@ -710,7 +684,7 @@ msgid "Access not granted" msgstr "Nicht freigegeben - Datensatz nur lesbar" #: compensation/tables.py:212 -#: compensation/templates/compensation/detail/eco_account/view.html:35 +#: compensation/templates/compensation/detail/eco_account/view.html:36 #: konova/templates/konova/widgets/progressbar.html:3 msgid "Available" msgstr "Verfügbar" @@ -750,15 +724,45 @@ msgctxt "Compensation" msgid "Amount" msgstr "Menge" -#: compensation/templates/compensation/detail/compensation/includes/actions.html:66 -#: compensation/templates/compensation/detail/eco_account/includes/actions.html:65 -#: ema/templates/ema/detail/includes/actions.html:63 +#: compensation/templates/compensation/detail/compensation/includes/actions.html:40 +#: compensation/templates/compensation/detail/compensation/includes/deadlines.html:39 +#: compensation/templates/compensation/detail/compensation/includes/documents.html:39 +#: compensation/templates/compensation/detail/compensation/includes/states-after.html:41 +#: compensation/templates/compensation/detail/compensation/includes/states-before.html:41 +#: compensation/templates/compensation/detail/eco_account/includes/actions.html:39 +#: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:38 +#: compensation/templates/compensation/detail/eco_account/includes/deductions.html:41 +#: compensation/templates/compensation/detail/eco_account/includes/documents.html:38 +#: compensation/templates/compensation/detail/eco_account/includes/states-after.html:41 +#: compensation/templates/compensation/detail/eco_account/includes/states-before.html:41 +#: ema/templates/ema/detail/includes/actions.html:38 +#: ema/templates/ema/detail/includes/deadlines.html:38 +#: ema/templates/ema/detail/includes/documents.html:38 +#: ema/templates/ema/detail/includes/states-after.html:40 +#: ema/templates/ema/detail/includes/states-before.html:40 +#: intervention/templates/intervention/detail/includes/compensations.html:38 +#: intervention/templates/intervention/detail/includes/deductions.html:39 +#: intervention/templates/intervention/detail/includes/documents.html:39 +#: intervention/templates/intervention/detail/includes/payments.html:39 +#: intervention/templates/intervention/detail/includes/revocation.html:43 +#: templates/log.html:10 +msgid "Action" +msgstr "Aktionen" + +#: compensation/templates/compensation/detail/compensation/includes/actions.html:57 +#: compensation/templates/compensation/detail/eco_account/includes/actions.html:56 +msgid "No action type details" +msgstr "Keine Zusatzmerkmale" + +#: compensation/templates/compensation/detail/compensation/includes/actions.html:68 +#: compensation/templates/compensation/detail/eco_account/includes/actions.html:67 +#: ema/templates/ema/detail/includes/actions.html:67 msgid "Edit action" msgstr "Maßnahme bearbeiten" -#: compensation/templates/compensation/detail/compensation/includes/actions.html:69 -#: compensation/templates/compensation/detail/eco_account/includes/actions.html:68 -#: ema/templates/ema/detail/includes/actions.html:66 +#: compensation/templates/compensation/detail/compensation/includes/actions.html:71 +#: compensation/templates/compensation/detail/eco_account/includes/actions.html:70 +#: ema/templates/ema/detail/includes/actions.html:70 msgid "Remove action" msgstr "Maßnahme entfernen" @@ -924,50 +928,50 @@ msgstr "Neuen Ausgangszustand hinzufügen" msgid "Missing surfaces according to states after: " msgstr "Fehlende Flächenmengen laut Zielzustand: " -#: compensation/templates/compensation/detail/compensation/view.html:43 +#: compensation/templates/compensation/detail/compensation/view.html:44 msgid "Is CEF compensation" msgstr "Ist CEF Maßnahme" -#: compensation/templates/compensation/detail/compensation/view.html:46 -#: compensation/templates/compensation/detail/compensation/view.html:56 +#: compensation/templates/compensation/detail/compensation/view.html:47 +#: compensation/templates/compensation/detail/compensation/view.html:57 #: venv/lib/python3.7/site-packages/django/forms/widgets.py:710 msgid "Yes" msgstr "Ja" -#: compensation/templates/compensation/detail/compensation/view.html:48 -#: compensation/templates/compensation/detail/compensation/view.html:58 +#: compensation/templates/compensation/detail/compensation/view.html:49 +#: compensation/templates/compensation/detail/compensation/view.html:59 #: venv/lib/python3.7/site-packages/django/forms/widgets.py:711 msgid "No" msgstr "Nein" -#: compensation/templates/compensation/detail/compensation/view.html:53 +#: compensation/templates/compensation/detail/compensation/view.html:54 msgid "Is Coherence keeping compensation" msgstr "Ist Kohärenzsicherungsmaßnahme" -#: compensation/templates/compensation/detail/compensation/view.html:70 +#: compensation/templates/compensation/detail/compensation/view.html:71 #: intervention/templates/intervention/detail/view.html:75 msgid "Checked on " msgstr "Geprüft am " -#: compensation/templates/compensation/detail/compensation/view.html:70 -#: compensation/templates/compensation/detail/compensation/view.html:84 +#: compensation/templates/compensation/detail/compensation/view.html:71 +#: compensation/templates/compensation/detail/compensation/view.html:85 #: compensation/templates/compensation/detail/eco_account/includes/deductions.html:56 -#: compensation/templates/compensation/detail/eco_account/view.html:51 +#: compensation/templates/compensation/detail/eco_account/view.html:52 #: ema/templates/ema/detail/view.html:42 #: intervention/templates/intervention/detail/view.html:75 #: intervention/templates/intervention/detail/view.html:89 msgid "by" msgstr "von" -#: compensation/templates/compensation/detail/compensation/view.html:84 -#: compensation/templates/compensation/detail/eco_account/view.html:51 +#: compensation/templates/compensation/detail/compensation/view.html:85 +#: compensation/templates/compensation/detail/eco_account/view.html:52 #: ema/templates/ema/detail/view.html:42 #: intervention/templates/intervention/detail/view.html:89 msgid "Recorded on " msgstr "Verzeichnet am" -#: compensation/templates/compensation/detail/compensation/view.html:91 -#: compensation/templates/compensation/detail/eco_account/view.html:74 +#: compensation/templates/compensation/detail/compensation/view.html:92 +#: compensation/templates/compensation/detail/eco_account/view.html:75 #: compensation/templates/compensation/report/compensation/report.html:24 #: compensation/templates/compensation/report/eco_account/report.html:41 #: ema/templates/ema/detail/view.html:61 @@ -977,8 +981,8 @@ msgstr "Verzeichnet am" msgid "Last modified" msgstr "Zuletzt bearbeitet" -#: compensation/templates/compensation/detail/compensation/view.html:99 -#: compensation/templates/compensation/detail/eco_account/view.html:82 +#: compensation/templates/compensation/detail/compensation/view.html:100 +#: compensation/templates/compensation/detail/eco_account/view.html:83 #: ema/templates/ema/detail/view.html:76 intervention/forms/modalForms.py:56 #: intervention/templates/intervention/detail/view.html:116 msgid "Shared with" @@ -1037,14 +1041,14 @@ msgstr "Abbuchung bearbeiten" msgid "Remove Deduction" msgstr "Abbuchung entfernen" -#: compensation/templates/compensation/detail/eco_account/view.html:34 +#: compensation/templates/compensation/detail/eco_account/view.html:35 msgid "No surface deductable" msgstr "Keine Flächenmenge für Abbuchungen eingegeben. Bitte bearbeiten." -#: compensation/templates/compensation/detail/eco_account/view.html:57 -#: compensation/templates/compensation/detail/eco_account/view.html:61 -#: compensation/templates/compensation/detail/eco_account/view.html:65 -#: compensation/templates/compensation/detail/eco_account/view.html:69 +#: compensation/templates/compensation/detail/eco_account/view.html:58 +#: compensation/templates/compensation/detail/eco_account/view.html:62 +#: compensation/templates/compensation/detail/eco_account/view.html:66 +#: compensation/templates/compensation/detail/eco_account/view.html:70 #: ema/templates/ema/detail/view.html:48 ema/templates/ema/detail/view.html:52 #: ema/templates/ema/detail/view.html:56 #: intervention/templates/intervention/detail/view.html:30 @@ -1060,7 +1064,7 @@ msgstr "Keine Flächenmenge für Abbuchungen eingegeben. Bitte bearbeiten." msgid "Missing" msgstr "fehlt" -#: compensation/templates/compensation/detail/eco_account/view.html:70 +#: compensation/templates/compensation/detail/eco_account/view.html:71 #: compensation/templates/compensation/report/eco_account/report.html:24 #: ema/templates/ema/detail/view.html:57 #: ema/templates/ema/report/report.html:24 @@ -1976,7 +1980,7 @@ msgstr "{} wurde erfolgreich vom Nutzer {} geprüft! {}" msgid "missing" msgstr "fehlt" -#: konova/views.py:96 templates/navbars/navbar.html:16 +#: konova/views.py:99 templates/navbars/navbar.html:16 msgid "Home" msgstr "Home" @@ -3993,9 +3997,6 @@ msgstr "" #~ msgid "General data edited" #~ msgstr "Allgemeine Daten bearbeitet" -#~ msgid "Action type details" -#~ msgstr "Zusatzmerkmale" - #~ msgid "On registered data edited" #~ msgstr "Wenn meine freigegebenen Daten bearbeitet wurden" diff --git a/templates/form/scripts/jstree-scripts.html b/templates/form/scripts/jstree-scripts.html deleted file mode 100644 index c9367609..00000000 --- a/templates/form/scripts/jstree-scripts.html +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file