diff --git a/analysis/__init__.py b/analysis/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/analysis/admin.py b/analysis/admin.py new file mode 100644 index 00000000..8c38f3f3 --- /dev/null +++ b/analysis/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/analysis/apps.py b/analysis/apps.py new file mode 100644 index 00000000..126ab0e5 --- /dev/null +++ b/analysis/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class AnalysisConfig(AppConfig): + name = 'analysis' diff --git a/analysis/models.py b/analysis/models.py new file mode 100644 index 00000000..71a83623 --- /dev/null +++ b/analysis/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/analysis/templates/analysis/reports/detail.html b/analysis/templates/analysis/reports/detail.html new file mode 100644 index 00000000..219ad46d --- /dev/null +++ b/analysis/templates/analysis/reports/detail.html @@ -0,0 +1,17 @@ +{% extends 'base.html' %} +{% load i18n fontawesome_5 %} + +{% block body %} +
+
+

{% trans 'Report' %}

+
{{office.long_name}}
+
+
+
+ {% include 'analysis/reports/includes/intervention/card_intervention.html' %} + {% include 'analysis/reports/includes/card_compensation.html' %} + {% include 'analysis/reports/includes/card_eco_account.html' %} + {% include 'analysis/reports/includes/card_old_interventions.html' %} +
+{% endblock %} \ No newline at end of file diff --git a/analysis/templates/analysis/reports/includes/card_compensation.html b/analysis/templates/analysis/reports/includes/card_compensation.html new file mode 100644 index 00000000..24d0eabf --- /dev/null +++ b/analysis/templates/analysis/reports/includes/card_compensation.html @@ -0,0 +1,23 @@ +{% load i18n fontawesome_5 %} + +
+
+
+
+
+
+
+ {% fa5_icon 'leaf' %} + {% trans 'Compensations' %} +
+
+
+
+
+
+ {% include 'form/table/generic_table_form_body.html' %} +
+
+
+
+
\ No newline at end of file diff --git a/analysis/templates/analysis/reports/includes/card_eco_account.html b/analysis/templates/analysis/reports/includes/card_eco_account.html new file mode 100644 index 00000000..744ce07f --- /dev/null +++ b/analysis/templates/analysis/reports/includes/card_eco_account.html @@ -0,0 +1,23 @@ +{% load i18n fontawesome_5 %} + +
+
+
+
+
+
+
+ {% fa5_icon 'tree' %} + {% trans 'Eco-Accounts' %} +
+
+
+
+
+
+ {% include 'form/table/generic_table_form_body.html' %} +
+
+
+
+
\ No newline at end of file diff --git a/analysis/templates/analysis/reports/includes/card_old_interventions.html b/analysis/templates/analysis/reports/includes/card_old_interventions.html new file mode 100644 index 00000000..400d0085 --- /dev/null +++ b/analysis/templates/analysis/reports/includes/card_old_interventions.html @@ -0,0 +1,24 @@ +{% load i18n fontawesome_5 %} + +
+
+
+
+
+
+
+ {% fa5_icon 'pencil-ruler' %} + {% trans 'Old interventions' %} +
+ {% trans 'Before' %} 16.06.2018 +
+
+
+
+
+ {% include 'form/table/generic_table_form_body.html' %} +
+
+
+
+
\ No newline at end of file diff --git a/analysis/templates/analysis/reports/includes/intervention/amount.html b/analysis/templates/analysis/reports/includes/intervention/amount.html new file mode 100644 index 00000000..a146d4b2 --- /dev/null +++ b/analysis/templates/analysis/reports/includes/intervention/amount.html @@ -0,0 +1,30 @@ +{% load i18n fontawesome_5 %} + +

{% trans 'Amount' %}

+ + {% blocktrans %} + Checked = Has been checked by the registration office according to LKompVzVo + {% endblocktrans %} +
+ {% blocktrans %} + Recorded = Has been checked and published by the conservation office + {% endblocktrans %} +
+
+ + + + + + + + + + + + + + + +
{% trans 'Total' %}{% fa5_icon 'star' %} {% trans 'Checked' %}{% fa5_icon 'bookmark' %} {% trans 'Recorded' %}
{{report.intervention_report.queryset.count}}{{report.intervention_report.queryset_checked.count}}{{report.intervention_report.queryset_recorded.count}}
+
\ No newline at end of file diff --git a/analysis/templates/analysis/reports/includes/intervention/card_intervention.html b/analysis/templates/analysis/reports/includes/intervention/card_intervention.html new file mode 100644 index 00000000..13c22892 --- /dev/null +++ b/analysis/templates/analysis/reports/includes/intervention/card_intervention.html @@ -0,0 +1,26 @@ +{% load i18n fontawesome_5 %} +
+
+
+
+
+
+
+ {% fa5_icon 'pencil-ruler' %} + {% trans 'Interventions' %} +
+
+
+
+
+
+ {% include 'analysis/reports/includes/intervention/amount.html' %} +
+ {% include 'analysis/reports/includes/intervention/laws.html' %} +
+ {% include 'analysis/reports/includes/intervention/compensated_by.html' %} +
+
+
+
+
\ No newline at end of file diff --git a/analysis/templates/analysis/reports/includes/intervention/compensated_by.html b/analysis/templates/analysis/reports/includes/intervention/compensated_by.html new file mode 100644 index 00000000..87dfc570 --- /dev/null +++ b/analysis/templates/analysis/reports/includes/intervention/compensated_by.html @@ -0,0 +1,34 @@ +{% load i18n fontawesome_5 %} +

{% trans 'Compensated by' %}

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{% trans 'Compensation type' %}{% trans 'Total' %}{% trans 'Checked' %}{% trans 'Recorded' %}
{% trans 'Compensation' %}{{report.intervention_report.compensation_sum}}{{report.intervention_report.compensation_sum_checked}}{{report.intervention_report.compensation_sum_recorded}}
{% trans 'Payment' %}{{report.intervention_report.payment_sum}}{{report.intervention_report.payment_sum_checked}}{{report.intervention_report.payment_sum_recorded}}
{% trans 'Deductions' %}{{report.intervention_report.deduction_sum}}{{report.intervention_report.deduction_sum_checked}}{{report.intervention_report.deduction_sum_recorded}}
+
\ No newline at end of file diff --git a/analysis/templates/analysis/reports/includes/intervention/laws.html b/analysis/templates/analysis/reports/includes/intervention/laws.html new file mode 100644 index 00000000..d373c681 --- /dev/null +++ b/analysis/templates/analysis/reports/includes/intervention/laws.html @@ -0,0 +1,50 @@ +{% load i18n fontawesome_5 %} +

{% trans 'Law usage' %}

+ + {% blocktrans %} + Please note: One intervention can be based on multiple laws. This table therefore does not + count + {% endblocktrans %} + +
+ + + + + + + + + + + {% for law in report.intervention_report.evaluated_laws %} + + + + + + + {% endfor %} + + + + + + + +
+ {% trans 'Law' %} + + {% trans 'Checked' %} + + {% trans 'Recorded' %} + + {% trans 'Total' %} +
+ {{law.short_name}} +
+ + {{law.long_name}} + +
{{law.num_checked}}{{law.num_recorded}}{{law.num}}
{% trans 'Total' %}{{report.intervention_report.law_sum_checked}}{{report.intervention_report.law_sum_recorded}}{{report.intervention_report.law_sum}}
+
\ No newline at end of file diff --git a/analysis/templates/analysis/reports/index.html b/analysis/templates/analysis/reports/index.html new file mode 100644 index 00000000..4f7d8bd0 --- /dev/null +++ b/analysis/templates/analysis/reports/index.html @@ -0,0 +1,8 @@ +{% extends 'base.html' %} +{% load i18n fontawesome_5 %} + +{% block body %} +
+

{% trans 'Reports' %}

+
+{% endblock %} \ No newline at end of file diff --git a/analysis/tests.py b/analysis/tests.py new file mode 100644 index 00000000..7ce503c2 --- /dev/null +++ b/analysis/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/analysis/urls.py b/analysis/urls.py new file mode 100644 index 00000000..71eb6665 --- /dev/null +++ b/analysis/urls.py @@ -0,0 +1,15 @@ +""" +Author: Michel Peltriaux +Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany +Contact: michel.peltriaux@sgdnord.rlp.de +Created on: 15.10.21 + +""" +from django.urls import path +from analysis.views import * + +app_name = "analysis" +urlpatterns = [ + path("reports/", index_reports_view, name="reports"), + path("reports/", detail_report_view, name="report-detail"), +] \ No newline at end of file diff --git a/analysis/utils/report.py b/analysis/utils/report.py new file mode 100644 index 00000000..fbc88520 --- /dev/null +++ b/analysis/utils/report.py @@ -0,0 +1,127 @@ +""" +Author: Michel Peltriaux +Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany +Contact: michel.peltriaux@sgdnord.rlp.de +Created on: 18.10.21 + +""" +from django.db.models import Count, Sum, Q + +from codelist.models import KonovaCode +from codelist.settings import CODELIST_LAW_ID +from compensation.models import Compensation, Payment, EcoAccountDeduction +from intervention.models import Intervention + + +class TimespanReport: + office_id = -1 + + class InterventionReport: + queryset = Intervention.objects.none() + queryset_checked = Intervention.objects.none() + queryset_recorded = Intervention.objects.none() + + # Law related + law_sum = -1 + law_sum_checked = -1 + law_sum_recorded = -1 + evaluated_laws = None + + # Compensations related + compensation_sum = -1 + compensation_sum_checked = -1 + compensation_sum_recorded = -1 + payment_sum = -1 + payment_sum_checked = -1 + payment_sum_recorded = -1 + deduction_sum = -1 + deduction_sum_checked = -1 + deduction_sum_recorded = -1 + + def __init__(self, id: str): + self.queryset = Intervention.objects.filter( + responsible__conservation_office__id=id, + deleted=None, + ) + self.queryset_checked = self.queryset.filter( + checked__isnull=False + ) + self.queryset_recorded = self.queryset.filter( + recorded__isnull=False + ) + self._create_report() + + def _create_report(self): + """ Creates all report information + + Returns: + + """ + self._evaluate_laws() + self._evaluate_compensations() + + def _evaluate_laws(self): + """ Analyzes the intervention-law distribution + + Returns: + + """ + # Count interventions based on law + # Fetch all KonovaCodes for laws, sorted alphabetically + laws = KonovaCode.objects.filter( + is_archived=False, + is_leaf=True, + code_lists__in=[CODELIST_LAW_ID], + ).order_by( + "long_name" + ) + # Fetch all law ids which are used by any .legal object of an intervention object + intervention_laws_total = self.queryset.values_list("legal__laws__id") + intervention_laws_checked = self.queryset.filter(checked__isnull=False).values_list("legal__laws__id") + intervention_laws_recorded = self.queryset.filter(recorded__isnull=False).values_list( + "legal__laws__id") + # Count how often which law id appears in the above list, return only the long_name of the law and the resulting + # count (here 'num'). This is for keeping the db fetch as small as possible + # Compute the sum for total, checked and recorded + self.evaluated_laws = laws.annotate( + num=Count("id", filter=Q(id__in=intervention_laws_total)), + num_checked=Count("id", filter=Q(id__in=intervention_laws_checked)), + num_recorded=Count("id", filter=Q(id__in=intervention_laws_recorded)), + ).values_list("short_name", "long_name", "num_checked", "num_recorded", "num", named=True) + self.law_sum = self.evaluated_laws.aggregate(sum_num=Sum("num"))["sum_num"] + self.law_sum_checked = self.evaluated_laws.aggregate(sum_num_checked=Sum("num_checked"))["sum_num_checked"] + self.law_sum_recorded = self.evaluated_laws.aggregate(sum_num_recorded=Sum("num_recorded"))["sum_num_recorded"] + + def _evaluate_compensations(self): + """ Analyzes the types of compensation distribution + + Returns: + + """ + # Count all compensations + comps = Compensation.objects.filter( + intervention__in=self.queryset + ) + self.compensation_sum = comps.count() + self.compensation_sum_checked = comps.filter(intervention__checked__isnull=False).count() + self.compensation_sum_recorded = comps.filter(intervention__recorded__isnull=False).count() + + # Count all payments + payments = Payment.objects.filter( + intervention__in=self.queryset + ) + self.payment_sum = payments.count() + self.payment_sum_checked = payments.filter(intervention__checked__isnull=False).count() + self.payment_sum_recorded = payments.filter(intervention__recorded__isnull=False).count() + + # Count all deductions + deductions = EcoAccountDeduction.objects.filter( + intervention__in=self.queryset + ) + self.deduction_sum = deductions.count() + self.deduction_sum_checked = deductions.filter(intervention__checked__isnull=False).count() + self.deduction_sum_recorded = deductions.filter(intervention__recorded__isnull=False).count() + + def __init__(self, office_id: str): + self.office_id = office_id + self.intervention_report = self.InterventionReport(self.office_id) diff --git a/analysis/views.py b/analysis/views.py new file mode 100644 index 00000000..43dd061b --- /dev/null +++ b/analysis/views.py @@ -0,0 +1,59 @@ +from django.contrib.auth.decorators import login_required +from django.db.models import Count, Q, Sum +from django.http import HttpRequest +from django.shortcuts import render, get_object_or_404 + +from analysis.utils.report import TimespanReport +from codelist.models import KonovaCode +from codelist.settings import CODELIST_LAW_ID +from compensation.models import EcoAccount, Compensation +from ema.models import Ema +from intervention.models import Intervention +from konova.contexts import BaseContext +from konova.decorators import conservation_office_group_required + + +@login_required +@conservation_office_group_required +def index_reports_view(request: HttpRequest): + """ + + Args: + request (HttpRequest): The incoming request + + Returns: + + """ + template = "analysis/reports/index.html" + context = {} + context = BaseContext(request, context).context + return render(request, template, context) + + +def detail_report_view(request: HttpRequest, id: str): + cons_office = get_object_or_404( + KonovaCode, + id=id, + ) + cons_interventions = Intervention.objects.filter( + responsible__conservation_office__id=id, + deleted=None, + ) + cons_comps = Compensation.objects.filter( + intervention__in=cons_interventions, + deleted=None, + ) + cons_eco_account = EcoAccount.objects.filter( + responsible__conservation_office__id=id, + deleted=None, + ) + + report = TimespanReport(id) + + template = "analysis/reports/detail.html" + context = { + "office": cons_office, + "report": report, + } + context = BaseContext(request, context).context + return render(request, template, context) \ No newline at end of file diff --git a/konova/sub_settings/django_settings.py b/konova/sub_settings/django_settings.py index 29540d4b..df875a81 100644 --- a/konova/sub_settings/django_settings.py +++ b/konova/sub_settings/django_settings.py @@ -69,6 +69,7 @@ INSTALLED_APPS = [ 'user', 'ema', 'codelist', + 'analysis', ] if DEBUG: INSTALLED_APPS += [ diff --git a/konova/urls.py b/konova/urls.py index 8448cb4e..1aebcbcc 100644 --- a/konova/urls.py +++ b/konova/urls.py @@ -36,7 +36,8 @@ urlpatterns = [ path('ema/', include("ema.urls")), path('user/', include("user.urls")), path('news/', include("news.urls")), - path('news/', include("codelist.urls")), + path('cl/', include("codelist.urls")), + path('analysis/', include("analysis.urls")), # Generic deadline routes path('deadline//remove', remove_deadline_view, name="deadline-remove"), diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index b9d3ebde..c65e66dc 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 aebd7445..f02eced3 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-14 09:12+0200\n" +"POT-Creation-Date: 2021-10-18 14:59+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -29,12 +29,111 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: analysis/templates/analysis/reports/detail.html:7 +#: compensation/templates/compensation/report/compensation/report.html:7 +#: compensation/templates/compensation/report/eco_account/report.html:7 +#: ema/templates/ema/report/report.html:7 +#: intervention/templates/intervention/report/report.html:7 +msgid "Report" +msgstr "Bericht" + +#: analysis/templates/analysis/reports/includes/card_compensation.html:11 +#: compensation/tables.py:62 +#: intervention/templates/intervention/detail/includes/compensations.html:8 +#: intervention/templates/intervention/report/report.html:49 +msgid "Compensations" +msgstr "Kompensationen" + +#: analysis/templates/analysis/reports/includes/card_eco_account.html:11 +msgid "Eco-Accounts" +msgstr "Ökokonten" + +#: analysis/templates/analysis/reports/includes/card_intervention.html:10 +#: intervention/tables.py:66 +msgid "Interventions" +msgstr "Eingriffe" + +#: analysis/templates/analysis/reports/includes/card_intervention.html:17 +msgid "Total interventions" +msgstr "Insgesamt" + +#: analysis/templates/analysis/reports/includes/card_intervention.html:22 +msgid "Amount total" +msgstr "Anzahl insgesamt" + +#: analysis/templates/analysis/reports/includes/card_intervention.html:26 +msgid "Amount checked" +msgstr "Anzahl geprüft" + +#: analysis/templates/analysis/reports/includes/card_intervention.html:30 +msgid "Amount recorded" +msgstr "Anzahl verzeichnet" + +#: analysis/templates/analysis/reports/includes/card_intervention.html:37 +msgid "Law usage" +msgstr "Gesetzesanwendungen" + +#: analysis/templates/analysis/reports/includes/card_intervention.html:43 +#: intervention/forms/forms.py:68 +#: intervention/templates/intervention/detail/view.html:39 +#: intervention/templates/intervention/report/report.html:20 +msgid "Law" +msgstr "Gesetz" + +#: analysis/templates/analysis/reports/includes/card_intervention.html:46 +#: compensation/tables.py:35 +#: compensation/templates/compensation/detail/compensation/view.html:43 +#: intervention/tables.py:33 +#: intervention/templates/intervention/detail/view.html:68 user/models.py:48 +msgid "Checked" +msgstr "Geprüft" + +#: analysis/templates/analysis/reports/includes/card_intervention.html:49 +#: compensation/tables.py:41 compensation/tables.py:181 +#: compensation/templates/compensation/detail/compensation/view.html:57 +#: compensation/templates/compensation/detail/eco_account/includes/deductions.html:31 +#: compensation/templates/compensation/detail/eco_account/view.html:44 +#: ema/tables.py:38 ema/templates/ema/detail/view.html:28 +#: intervention/tables.py:39 +#: intervention/templates/intervention/detail/view.html:82 user/models.py:49 +msgid "Recorded" +msgstr "Verzeichnet" + +#: analysis/templates/analysis/reports/includes/card_intervention.html:52 +#: analysis/templates/analysis/reports/includes/card_intervention.html:72 +#: konova/templates/konova/home.html:23 konova/templates/konova/home.html:61 +#: konova/templates/konova/home.html:100 +msgid "Total" +msgstr "Insgesamt" + +#: analysis/templates/analysis/reports/includes/card_intervention.html:81 +msgid "" +"\n" +" Please note: One intervention can be based on " +"multiple laws. This table therefore does not\n" +" count\n" +" " +msgstr "" + +#: analysis/templates/analysis/reports/includes/card_old_interventions.html:11 +msgid "Old interventions" +msgstr "Altfälle" + +#: analysis/templates/analysis/reports/includes/card_old_interventions.html:13 +msgid "Before" +msgstr "Vor" + +#: analysis/templates/analysis/reports/index.html:6 +#: templates/navbars/navbar.html:46 +msgid "Reports" +msgstr "Berichte" + #: compensation/filters.py:70 msgid "Show only unrecorded" msgstr "Nur unverzeichnete anzeigen" #: compensation/forms/forms.py:31 compensation/tables.py:25 -#: compensation/tables.py:167 ema/tables.py:28 intervention/forms/forms.py:27 +#: compensation/tables.py:166 ema/tables.py:28 intervention/forms/forms.py:27 #: intervention/tables.py:23 #: intervention/templates/intervention/detail/includes/compensations.html:30 msgid "Identifier" @@ -45,7 +144,7 @@ msgid "Generated automatically" msgstr "Automatisch generiert" #: compensation/forms/forms.py:43 compensation/tables.py:30 -#: compensation/tables.py:172 +#: compensation/tables.py:171 #: compensation/templates/compensation/detail/compensation/includes/documents.html:28 #: compensation/templates/compensation/detail/compensation/view.html:31 #: compensation/templates/compensation/detail/eco_account/includes/documents.html:28 @@ -308,12 +407,12 @@ msgstr "Maßnahmentyp wählen" #: compensation/templates/compensation/detail/compensation/includes/documents.html:35 #: compensation/templates/compensation/detail/compensation/includes/states-after.html:40 #: compensation/templates/compensation/detail/compensation/includes/states-before.html:40 -#: compensation/templates/compensation/detail/eco_account/includes/actions.html:37 +#: compensation/templates/compensation/detail/eco_account/includes/actions.html:38 #: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:37 #: compensation/templates/compensation/detail/eco_account/includes/deductions.html:40 #: 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/states-after.html:40 +#: compensation/templates/compensation/detail/eco_account/includes/states-before.html:40 #: ema/templates/ema/detail/includes/actions.html:37 #: ema/templates/ema/detail/includes/deadlines.html:37 #: ema/templates/ema/detail/includes/documents.html:34 @@ -358,38 +457,38 @@ msgstr "Geben Sie die Daten der neuen Maßnahme ein" msgid "Added action" msgstr "Maßnahme hinzugefügt" -#: compensation/models.py:78 +#: compensation/models.py:82 msgid "cm" msgstr "" -#: compensation/models.py:79 +#: compensation/models.py:83 msgid "m" msgstr "" -#: compensation/models.py:80 +#: compensation/models.py:84 msgid "km" msgstr "" -#: compensation/models.py:81 +#: compensation/models.py:85 msgid "m²" msgstr "" -#: compensation/models.py:82 +#: compensation/models.py:86 msgid "ha" msgstr "" -#: compensation/models.py:83 +#: compensation/models.py:87 msgid "Pieces" msgstr "Stück" -#: compensation/models.py:311 +#: compensation/models.py:321 msgid "" "Deductable surface can not be larger than existing surfaces in after states" msgstr "" "Die abbuchbare Fläche darf die Gesamtfläche der Zielzustände nicht " "überschreiten" -#: compensation/models.py:318 +#: compensation/models.py:328 msgid "" "Deductable surface can not be smaller than the sum of already existing " "deductions. Please contact the responsible users for the deductions!" @@ -397,40 +496,17 @@ msgstr "" "Es wurde bereits mehr Fläche abgebucht, als Sie nun als abbuchbar einstellen " "wollen. Kontaktieren Sie die für die Abbuchungen verantwortlichen Nutzer!" -#: compensation/tables.py:35 -#: compensation/templates/compensation/detail/compensation/view.html:43 -#: intervention/tables.py:33 -#: intervention/templates/intervention/detail/view.html:68 user/models.py:48 -msgid "Checked" -msgstr "Geprüft" - -#: compensation/tables.py:41 compensation/tables.py:182 -#: compensation/templates/compensation/detail/compensation/view.html:57 -#: compensation/templates/compensation/detail/eco_account/includes/deductions.html:31 -#: compensation/templates/compensation/detail/eco_account/view.html:44 -#: ema/tables.py:38 ema/templates/ema/detail/view.html:28 -#: intervention/tables.py:39 -#: intervention/templates/intervention/detail/view.html:82 user/models.py:49 -msgid "Recorded" -msgstr "Verzeichnet" - -#: compensation/tables.py:47 compensation/tables.py:188 ema/tables.py:44 +#: compensation/tables.py:47 compensation/tables.py:187 ema/tables.py:44 #: intervention/tables.py:51 msgid "Editable" msgstr "Freigegeben" -#: compensation/tables.py:53 compensation/tables.py:194 ema/tables.py:50 +#: compensation/tables.py:53 compensation/tables.py:193 ema/tables.py:50 #: intervention/tables.py:57 msgid "Last edit" msgstr "Zuletzt bearbeitet" -#: compensation/tables.py:62 -#: intervention/templates/intervention/detail/includes/compensations.html:8 -#: intervention/templates/intervention/report/report.html:49 -msgid "Compensations" -msgstr "Kompensationen" - -#: compensation/tables.py:84 compensation/tables.py:225 ema/tables.py:82 +#: compensation/tables.py:84 compensation/tables.py:224 ema/tables.py:82 #: intervention/tables.py:88 msgid "Open {}" msgstr "Öffne {}" @@ -451,46 +527,47 @@ msgstr "Am {} von {} geprüft worden" #: compensation/tables.py:129 #: compensation/templates/compensation/detail/compensation/view.html:60 +#: compensation/templates/compensation/detail/eco_account/includes/deductions.html:56 #: compensation/templates/compensation/detail/eco_account/view.html:47 #: ema/tables.py:101 ema/templates/ema/detail/view.html:31 -#: intervention/models.py:384 intervention/tables.py:131 +#: intervention/tables.py:131 #: intervention/templates/intervention/detail/view.html:85 msgid "Not recorded yet" msgstr "Noch nicht verzeichnet" -#: compensation/tables.py:134 compensation/tables.py:263 ema/tables.py:106 -#: intervention/models.py:389 intervention/tables.py:136 +#: compensation/tables.py:134 compensation/tables.py:262 ema/tables.py:106 +#: intervention/tables.py:136 msgid "Recorded on {} by {}" msgstr "Am {} von {} verzeichnet worden" -#: compensation/tables.py:159 compensation/tables.py:286 ema/tables.py:129 +#: compensation/tables.py:158 compensation/tables.py:284 ema/tables.py:129 #: intervention/tables.py:159 msgid "Full access granted" msgstr "Für Sie freigegeben - Datensatz kann bearbeitet werden" -#: compensation/tables.py:159 compensation/tables.py:286 ema/tables.py:129 +#: compensation/tables.py:158 compensation/tables.py:284 ema/tables.py:129 #: intervention/tables.py:159 msgid "Access not granted" msgstr "Nicht freigegeben - Datensatz nur lesbar" -#: compensation/tables.py:177 +#: compensation/tables.py:176 #: compensation/templates/compensation/detail/eco_account/view.html:35 #: konova/templates/konova/widgets/progressbar.html:3 msgid "Available" msgstr "Verfügbar" -#: compensation/tables.py:203 +#: compensation/tables.py:202 msgid "Eco Accounts" msgstr "Ökokonten" -#: compensation/tables.py:225 +#: compensation/tables.py:224 #: compensation/templates/compensation/detail/eco_account/view.html:19 #: intervention/forms/modalForms.py:258 intervention/forms/modalForms.py:265 #: konova/templates/konova/home.html:88 templates/navbars/navbar.html:34 msgid "Eco-account" msgstr "Ökokonto" -#: compensation/tables.py:258 +#: compensation/tables.py:257 msgid "Not recorded yet. Can not be used for deductions, yet." msgstr "" "Noch nicht verzeichnet. Kann noch nicht für Abbuchungen genutzt werden." @@ -522,7 +599,7 @@ msgid "Amount" msgstr "Menge" #: compensation/templates/compensation/detail/compensation/includes/actions.html:53 -#: compensation/templates/compensation/detail/eco_account/includes/actions.html:51 +#: compensation/templates/compensation/detail/eco_account/includes/actions.html:53 #: ema/templates/ema/detail/includes/actions.html:51 msgid "Remove action" msgstr "Maßnahme entfernen" @@ -638,8 +715,8 @@ msgstr "Biotoptyp" #: compensation/templates/compensation/detail/compensation/includes/states-after.html:54 #: compensation/templates/compensation/detail/compensation/includes/states-before.html:54 -#: compensation/templates/compensation/detail/eco_account/includes/states-after.html:52 -#: compensation/templates/compensation/detail/eco_account/includes/states-before.html:52 +#: compensation/templates/compensation/detail/eco_account/includes/states-after.html:54 +#: compensation/templates/compensation/detail/eco_account/includes/states-before.html:54 #: ema/templates/ema/detail/includes/states-after.html:52 #: ema/templates/ema/detail/includes/states-before.html:52 msgid "Remove state" @@ -670,6 +747,7 @@ msgstr "Geprüft am " #: compensation/templates/compensation/detail/compensation/view.html:50 #: compensation/templates/compensation/detail/compensation/view.html:64 +#: compensation/templates/compensation/detail/eco_account/includes/deductions.html:54 #: compensation/templates/compensation/detail/eco_account/view.html:51 #: ema/templates/ema/detail/view.html:35 #: intervention/templates/intervention/detail/view.html:75 @@ -755,6 +833,12 @@ msgstr "Eingriffskennung" msgid "Created" msgstr "Erstellt" +#: compensation/templates/compensation/detail/eco_account/includes/deductions.html:54 +#, fuzzy +#| msgid "Recorded on " +msgid "Recorded on" +msgstr "Verzeichnet am" + #: compensation/templates/compensation/detail/eco_account/includes/deductions.html:63 #: intervention/templates/intervention/detail/includes/deductions.html:58 msgid "Remove Deduction" @@ -789,24 +873,17 @@ msgstr "Fehlt" msgid "Action handler" msgstr "Maßnahmenträger" -#: compensation/templates/compensation/report/compensation/report.html:7 -#: compensation/templates/compensation/report/eco_account/report.html:7 -#: ema/templates/ema/report/report.html:7 -#: intervention/templates/intervention/report/report.html:7 -msgid "Report" -msgstr "Bericht" - -#: compensation/templates/compensation/report/compensation/report.html:58 -#: compensation/templates/compensation/report/eco_account/report.html:75 -#: ema/templates/ema/report/report.html:62 -#: intervention/templates/intervention/report/report.html:108 +#: compensation/templates/compensation/report/compensation/report.html:55 +#: compensation/templates/compensation/report/eco_account/report.html:72 +#: ema/templates/ema/report/report.html:59 +#: intervention/templates/intervention/report/report.html:105 msgid "Open in browser" msgstr "Im Browser öffnen" -#: compensation/templates/compensation/report/compensation/report.html:62 -#: compensation/templates/compensation/report/eco_account/report.html:79 -#: ema/templates/ema/report/report.html:66 -#: intervention/templates/intervention/report/report.html:112 +#: compensation/templates/compensation/report/compensation/report.html:59 +#: compensation/templates/compensation/report/eco_account/report.html:76 +#: ema/templates/ema/report/report.html:63 +#: intervention/templates/intervention/report/report.html:109 msgid "View in LANIS" msgstr "In LANIS öffnen" @@ -823,8 +900,8 @@ msgid "Compensation {} edited" msgstr "Kompensation {} bearbeitet" #: compensation/views/compensation_views.py:213 -#: compensation/views/eco_account_views.py:278 ema/views.py:175 -#: intervention/views.py:428 +#: compensation/views/eco_account_views.py:287 ema/views.py:175 +#: intervention/views.py:437 msgid "Log" msgstr "Log" @@ -833,23 +910,23 @@ msgid "Compensation removed" msgstr "Kompensation entfernt" #: compensation/views/compensation_views.py:253 -#: compensation/views/eco_account_views.py:377 ema/views.py:328 -#: intervention/views.py:124 +#: compensation/views/eco_account_views.py:386 ema/views.py:328 +#: intervention/views.py:126 msgid "Document added" msgstr "Dokument hinzugefügt" #: compensation/views/compensation_views.py:309 -#: compensation/views/eco_account_views.py:321 ema/views.py:272 +#: compensation/views/eco_account_views.py:330 ema/views.py:272 msgid "State added" msgstr "Zustand hinzugefügt" #: compensation/views/compensation_views.py:328 -#: compensation/views/eco_account_views.py:340 ema/views.py:291 +#: compensation/views/eco_account_views.py:349 ema/views.py:291 msgid "Action added" msgstr "Maßnahme hinzugefügt" #: compensation/views/compensation_views.py:347 -#: compensation/views/eco_account_views.py:359 ema/views.py:310 +#: compensation/views/eco_account_views.py:368 ema/views.py:310 msgid "Deadline added" msgstr "Frist/Termin hinzugefügt" @@ -861,33 +938,33 @@ msgstr "Zustand gelöscht" msgid "Action removed" msgstr "Maßnahme entfernt" -#: compensation/views/eco_account_views.py:87 +#: compensation/views/eco_account_views.py:86 msgid "Eco-Account {} added" msgstr "Ökokonto {} hinzugefügt" -#: compensation/views/eco_account_views.py:142 +#: compensation/views/eco_account_views.py:141 msgid "Eco-Account {} edited" msgstr "Ökokonto {} bearbeitet" -#: compensation/views/eco_account_views.py:228 +#: compensation/views/eco_account_views.py:237 msgid "Eco-account removed" msgstr "Ökokonto entfernt" -#: compensation/views/eco_account_views.py:255 +#: compensation/views/eco_account_views.py:264 msgid "Deduction removed" msgstr "Abbuchung entfernt" -#: compensation/views/eco_account_views.py:298 ema/views.py:249 -#: intervention/views.py:468 +#: compensation/views/eco_account_views.py:307 ema/views.py:249 +#: intervention/views.py:477 msgid "{} unrecorded" msgstr "{} entzeichnet" -#: compensation/views/eco_account_views.py:298 ema/views.py:249 -#: intervention/views.py:468 +#: compensation/views/eco_account_views.py:307 ema/views.py:249 +#: intervention/views.py:477 msgid "{} recorded" msgstr "{} verzeichnet" -#: compensation/views/eco_account_views.py:434 intervention/views.py:450 +#: compensation/views/eco_account_views.py:443 intervention/views.py:459 msgid "Deduction added" msgstr "Abbuchung hinzugefügt" @@ -965,12 +1042,6 @@ msgstr "Bauvorhaben XY; Flur ABC" msgid "Process type" msgstr "Verfahrenstyp" -#: intervention/forms/forms.py:68 -#: intervention/templates/intervention/detail/view.html:39 -#: intervention/templates/intervention/report/report.html:20 -msgid "Law" -msgstr "Gesetz" - #: intervention/forms/forms.py:70 msgid "Multiple selection possible" msgstr "Mehrfachauswahl möglich" @@ -1120,31 +1191,31 @@ msgstr "" "Das Ökokonto {} hat für eine Abbuchung von {} m² nicht ausreichend " "Restfläche. Es stehen noch {} m² zur Verfügung." -#: intervention/models.py:324 +#: intervention/models.py:329 msgid "Registration office file number missing" msgstr "Aktenzeichen Zulassungsbehörde fehlt" -#: intervention/models.py:327 +#: intervention/models.py:332 msgid "Conservation office file number missing" msgstr "Aktenzeichen Naturschutzbehörde fehlt" -#: intervention/models.py:330 +#: intervention/models.py:335 msgid "Responsible data missing" msgstr "Daten zu Verantwortlichen fehlen" -#: intervention/models.py:344 +#: intervention/models.py:349 msgid "Revocation exists" msgstr "Widerspruch liegt vor" -#: intervention/models.py:347 +#: intervention/models.py:352 msgid "Registration date missing" msgstr "Datum Zulassung bzw. Satzungsbeschluss fehlt" -#: intervention/models.py:350 +#: intervention/models.py:355 msgid "Binding on missing" msgstr "Datum Bestandskraft fehlt" -#: intervention/models.py:352 +#: intervention/models.py:357 msgid "Legal data missing" msgstr "Rechtliche Daten fehlen" @@ -1155,10 +1226,6 @@ msgstr "Rechtliche Daten fehlen" msgid "Revocation" msgstr "Widerspruch" -#: intervention/tables.py:66 -msgid "Interventions" -msgstr "Eingriffe" - #: intervention/tables.py:176 msgid "No revocation" msgstr "Kein Widerspruch" @@ -1226,15 +1293,15 @@ msgstr "Abbuchungen von Ökokonten" msgid "Exist" msgstr "Vorhanden" -#: intervention/views.py:77 +#: intervention/views.py:79 msgid "Intervention {} added" msgstr "Eingriff {} hinzugefügt" -#: intervention/views.py:212 +#: intervention/views.py:221 msgid "This intervention has a revocation from {}" msgstr "Es existiert ein Widerspruch vom {}" -#: intervention/views.py:228 +#: intervention/views.py:237 msgid "" "Remember: This data has not been shared with you, yet. This means you can " "only read but can not edit or perform any actions like running a check or " @@ -1244,43 +1311,43 @@ msgstr "" "bedeutet, dass Sie nur lesenden Zugriff hierauf haben und weder bearbeiten, " "noch Prüfungen durchführen oder verzeichnen können." -#: intervention/views.py:255 +#: intervention/views.py:264 msgid "Intervention {} edited" msgstr "Eingriff {} bearbeitet" -#: intervention/views.py:287 +#: intervention/views.py:296 msgid "{} removed" msgstr "{} entfernt" -#: intervention/views.py:308 +#: intervention/views.py:317 msgid "Revocation removed" msgstr "Widerspruch entfernt" -#: intervention/views.py:334 +#: intervention/views.py:343 msgid "{} has already been shared with you" msgstr "{} wurde bereits für Sie freigegeben" -#: intervention/views.py:339 +#: intervention/views.py:348 msgid "{} has been shared with you" msgstr "{} ist nun für Sie freigegeben" -#: intervention/views.py:346 +#: intervention/views.py:355 msgid "Share link invalid" msgstr "Freigabelink ungültig" -#: intervention/views.py:367 +#: intervention/views.py:376 msgid "Share settings updated" msgstr "Freigabe Einstellungen aktualisiert" -#: intervention/views.py:386 +#: intervention/views.py:395 msgid "Check performed" msgstr "Prüfung durchgeführt" -#: intervention/views.py:406 +#: intervention/views.py:415 msgid "Revocation added" msgstr "Widerspruch hinzugefügt" -#: intervention/views.py:473 +#: intervention/views.py:482 msgid "There are errors on this intervention:" msgstr "Es liegen Fehler in diesem Eingriff vor:" @@ -1403,10 +1470,13 @@ msgstr "Kontrolle am" msgid "Other" msgstr "Sonstige" -#: konova/templates/konova/home.html:23 konova/templates/konova/home.html:61 -#: konova/templates/konova/home.html:100 -msgid "Total" -msgstr "Insgesamt" +#: konova/sub_settings/django_settings.py:154 +msgid "German" +msgstr "" + +#: konova/sub_settings/django_settings.py:155 +msgid "English" +msgstr "" #: konova/templates/konova/home.html:27 konova/templates/konova/home.html:65 #: konova/templates/konova/home.html:104 @@ -1634,10 +1704,6 @@ msgstr "" msgid "Export..." msgstr "" -#: templates/navbars/navbar.html:46 -msgid "Reports" -msgstr "Berichte" - #: templates/navbars/navbar.html:58 user/templates/user/index.html:31 msgid "Settings" msgstr "Einstellungen" @@ -2980,9 +3046,6 @@ msgstr "" #~ msgid "Transfer comment" #~ msgstr "Verwendungszweck" -#~ msgid "EMA recorded" -#~ msgstr "EMA verzeichnet" - #~ msgid "Edit {}" #~ msgstr "Bearbeite {}" diff --git a/templates/navbars/navbar.html b/templates/navbars/navbar.html index 39b622e1..46a274ff 100644 --- a/templates/navbars/navbar.html +++ b/templates/navbars/navbar.html @@ -43,7 +43,7 @@ {% fa5_icon 'euro-sign' %} {% trans 'EMA' %} {% fa5_icon 'file-import' %} {% trans 'Import...' %} {% fa5_icon 'file-export' %} {% trans 'Export...' %} - {% fa5_icon 'file-alt' %} {% trans 'Reports' %} + {% fa5_icon 'file-alt' %} {% trans 'Reports' %}