From 510d77422a944bb6058d7e8d09497ad8bff14629 Mon Sep 17 00:00:00 2001 From: mipel Date: Thu, 19 Aug 2021 13:02:31 +0200 Subject: [PATCH] EMA * adds Ema model (basically Compensation inherited) * adds index view for EMAs * fixes drop-down link bug for menu 'More' in navbar * refactors some more forms to use process_request() * adds modified attribute to BaseResource for easy last_modified check * adds setting of modified attribute in all places where UserAction.EDITED is added to log * adds EMA_ACCOUNT_IDENTIFIER_LENGTH and EMA_ACCOUNT_IDENTIFIER_TEMPLATE to ema/settings.py * adds EmaAdmin to ema/admin.py * fixes wrong title in intervention detail view html for revocations * adds support for subtitle variable to BaseTable and generic_index.html * drops next_version attribute from models * adds/updates translations * adds default ordering for UserActionLogEntry * removes extra ordering in log modal rendering --- compensation/forms.py | 8 + compensation/models.py | 7 +- compensation/settings.py | 1 + compensation/tables.py | 14 +- compensation/views/compensation_views.py | 2 +- compensation/views/eco_account_views.py | 2 +- compensation/views/payment_views.py | 32 +- ema/__init__.py | 0 ema/admin.py | 10 + ema/apps.py | 5 + ema/filters.py | 53 +++ ema/models.py | 74 ++++ ema/settings.py | 10 + ema/tables.py | 132 ++++++ ema/tests.py | 3 + ema/urls.py | 16 + ema/views.py | 70 ++++ intervention/forms.py | 6 + intervention/models.py | 7 +- intervention/tables.py | 22 +- .../templates/intervention/detail/view.html | 2 +- intervention/views.py | 51 +-- konova/forms.py | 3 +- konova/models.py | 23 +- konova/sub_settings/django_settings.py | 1 + konova/urls.py | 2 +- konova/utils/tables.py | 1 + konova/views.py | 3 - locale/de/LC_MESSAGES/django.mo | Bin 18344 -> 18712 bytes locale/de/LC_MESSAGES/django.po | 394 +++++++++--------- templates/base.html | 2 +- templates/generic_index.html | 21 +- templates/navbar.html | 8 +- user/models.py | 5 + 34 files changed, 675 insertions(+), 315 deletions(-) create mode 100644 ema/__init__.py create mode 100644 ema/admin.py create mode 100644 ema/apps.py create mode 100644 ema/filters.py create mode 100644 ema/models.py create mode 100644 ema/settings.py create mode 100644 ema/tables.py create mode 100644 ema/tests.py create mode 100644 ema/urls.py create mode 100644 ema/views.py diff --git a/compensation/forms.py b/compensation/forms.py index 7dfb8226..ef972d8a 100644 --- a/compensation/forms.py +++ b/compensation/forms.py @@ -89,6 +89,8 @@ class NewPaymentForm(BaseModalForm): intervention=self.intervention, ) self.intervention.log.add(edited_action) + self.intervention.modified = edited_action + self.intervention.save() return pay @@ -122,6 +124,8 @@ class NewStateModalForm(BaseModalForm): comment=_("Added state") ) self.instance.log.add(user_action) + self.instance.modified = user_action + self.instance.save() state = CompensationState.objects.create( biotope_type=self.cleaned_data["biotope_type"], @@ -244,6 +248,8 @@ class NewDeadlineModalForm(BaseModalForm): action=UserAction.EDITED, comment=_("Added deadline") ) + self.instance.modified = edited_action + self.instance.save() self.instance.log.add(edited_action) self.instance.deadlines.add(deadline) return deadline @@ -314,6 +320,8 @@ class NewActionModalForm(BaseModalForm): action=UserAction.EDITED, comment=_("Added action"), ) + self.instance.modified = edited_action + self.instance.save() self.instance.log.add(edited_action) self.instance.actions.add(comp_action) return comp_action diff --git a/compensation/models.py b/compensation/models.py index fba71008..ee78a46e 100644 --- a/compensation/models.py +++ b/compensation/models.py @@ -91,8 +91,8 @@ class CompensationAction(BaseResource): class AbstractCompensation(BaseObject): """ - Abstract compensation model which holds basic attributes, shared by subclasses like the regular Compensation - or EcoAccount. + Abstract compensation model which holds basic attributes, shared by subclasses like the regular Compensation, + EMA or EcoAccount. """ responsible = models.OneToOneField( @@ -112,9 +112,6 @@ class AbstractCompensation(BaseObject): geometry = models.ForeignKey(Geometry, null=True, blank=True, on_delete=models.SET_NULL) documents = models.ManyToManyField("konova.Document", blank=True) - # Holds a successor for this data - next_version = models.ForeignKey("Compensation", null=True, blank=True, on_delete=models.DO_NOTHING) - class Meta: abstract = True diff --git a/compensation/settings.py b/compensation/settings.py index 3f658086..7953f34e 100644 --- a/compensation/settings.py +++ b/compensation/settings.py @@ -7,5 +7,6 @@ Created on: 18.12.20 """ COMPENSATION_IDENTIFIER_LENGTH = 10 COMPENSATION_IDENTIFIER_TEMPLATE = "KOM-{}" + ECO_ACCOUNT_IDENTIFIER_LENGTH = 10 ECO_ACCOUNT_IDENTIFIER_TEMPLATE = "OEK-{}" \ No newline at end of file diff --git a/compensation/tables.py b/compensation/tables.py index ab62e9e7..db01f7c0 100644 --- a/compensation/tables.py +++ b/compensation/tables.py @@ -5,7 +5,6 @@ Contact: michel.peltriaux@sgdnord.rlp.de Created on: 01.12.20 """ -from django.db.models import Sum from django.http import HttpRequest from django.template.loader import render_to_string from django.urls import reverse @@ -15,7 +14,6 @@ from django.utils.translation import gettext_lazy as _ from compensation.filters import CompensationTableFilter, EcoAccountTableFilter from compensation.models import Compensation, EcoAccount -from intervention.filters import InterventionTableFilter from konova.sub_settings.django_settings import DEFAULT_DATE_TIME_FORMAT from konova.utils.tables import BaseTable import django_tables2 as tables @@ -53,7 +51,7 @@ class CompensationTable(BaseTable): lm = tables.Column( verbose_name=_("Last edit"), orderable=True, - accessor="created__timestamp", + accessor="modified__timestamp", ) class Meta(BaseTable.Meta): @@ -126,21 +124,21 @@ class CompensationTable(BaseTable): """ html = "" - checked = value is not None + recorded = value is not None tooltip = _("Not recorded yet") - if checked: + if recorded: value = value.timestamp value = localtime(value) on = value.strftime(DEFAULT_DATE_TIME_FORMAT) tooltip = _("Recorded on {} by {}").format(on, record.intervention.recorded.user) html += self.render_bookmark( tooltip=tooltip, - icn_filled=checked, + icn_filled=recorded, ) return format_html(html) def render_e(self, value, record: Compensation): - """ Renders the registered column for a compensation + """ Renders the editable column for a compensation Args: value (str): The identifier value @@ -192,7 +190,7 @@ class EcoAccountTable(BaseTable): lm = tables.Column( verbose_name=_("Last edit"), orderable=True, - accessor="created__timestamp", + accessor="modified__timestamp", ) class Meta(BaseTable.Meta): diff --git a/compensation/views/compensation_views.py b/compensation/views/compensation_views.py index a24d1450..7d4bbcd1 100644 --- a/compensation/views/compensation_views.py +++ b/compensation/views/compensation_views.py @@ -118,7 +118,7 @@ def log_view(request: HttpRequest, id: str): context = { "modal_body_template": body_template, - "log": comp.log.all().order_by("-timestamp"), + "log": comp.log.all(), "modal_title": _("Log"), } context = BaseContext(request, context).context diff --git a/compensation/views/eco_account_views.py b/compensation/views/eco_account_views.py index 1d13cdb5..767e9325 100644 --- a/compensation/views/eco_account_views.py +++ b/compensation/views/eco_account_views.py @@ -180,7 +180,7 @@ def log_view(request: HttpRequest, id: str): context = { "modal_body_template": body_template, - "log": comp.log.all().order_by("-timestamp"), + "log": comp.log.all(), "modal_title": _("Log"), } context = BaseContext(request, context).context diff --git a/compensation/views/payment_views.py b/compensation/views/payment_views.py index c71adcb3..a5dc7678 100644 --- a/compensation/views/payment_views.py +++ b/compensation/views/payment_views.py @@ -6,18 +6,15 @@ Created on: 09.08.21 """ from django.utils.translation import gettext_lazy as _ -from django.contrib import messages from django.contrib.auth.decorators import login_required from django.http import HttpRequest -from django.shortcuts import get_object_or_404, render, redirect +from django.shortcuts import get_object_or_404 from compensation.forms import NewPaymentForm from compensation.models import Payment from intervention.models import Intervention -from konova.contexts import BaseContext from konova.decorators import default_group_required from konova.forms import RemoveModalForm -from konova.utils.message_templates import FORM_INVALID @login_required @@ -34,29 +31,10 @@ def new_payment_view(request: HttpRequest, intervention_id: str): """ intervention = get_object_or_404(Intervention, id=intervention_id) form = NewPaymentForm(request.POST or None, instance=intervention, user=request.user) - template = form.template - if request.method == "POST": - if form.is_valid(): - payment = form.save() - messages.success( - request, - _("Payment added") - ) - return redirect(request.META.get("HTTP_REFERER", "home")) - else: - messages.info( - request, - FORM_INVALID - ) - return redirect(request.META.get("HTTP_REFERER", "home")) - elif request.method == "GET": - context = { - "form": form, - } - context = BaseContext(request, context).context - return render(request, template, context) - else: - raise NotImplementedError + return form.process_request( + request, + msg_success=_("Payment added") + ) @login_required diff --git a/ema/__init__.py b/ema/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ema/admin.py b/ema/admin.py new file mode 100644 index 00000000..6020a800 --- /dev/null +++ b/ema/admin.py @@ -0,0 +1,10 @@ +from django.contrib import admin + +from compensation.admin import CompensationAdmin +from ema.models import Ema + + +class EmaAdmin(CompensationAdmin): + pass + +admin.site.register(Ema, EmaAdmin) diff --git a/ema/apps.py b/ema/apps.py new file mode 100644 index 00000000..3acd07ae --- /dev/null +++ b/ema/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class EmaConfig(AppConfig): + name = 'ema' diff --git a/ema/filters.py b/ema/filters.py new file mode 100644 index 00000000..308f14ef --- /dev/null +++ b/ema/filters.py @@ -0,0 +1,53 @@ +""" +Author: Michel Peltriaux +Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany +Contact: michel.peltriaux@sgdnord.rlp.de +Created on: 19.08.21 + +""" +from django.db.models import QuerySet + +from compensation.filters import CompensationTableFilter + + +class EmaTableFilter(CompensationTableFilter): + """ + Since EMA and compensation are basically the same, we can reuse CompensationTableFilter and extend the MAE filter + in the future by inheriting. + """ + + def _filter_show_all(self, queryset, name, value) -> QuerySet: + """ Filters queryset depending on value of 'show_all' setting + + Args: + queryset (): + name (): + value (): + + Returns: + + """ + if not value: + return queryset.filter( + users__in=[self.user], # requesting user has access + ) + else: + return queryset + + def _filter_show_recorded(self, queryset, name, value) -> QuerySet: + """ Filters queryset depending on value of 'show_recorded' setting + + Args: + queryset (): + name (): + value (): + + Returns: + + """ + if not value: + return queryset.filter( + recorded=None, + ) + else: + return queryset \ No newline at end of file diff --git a/ema/models.py b/ema/models.py new file mode 100644 index 00000000..e5aee4cb --- /dev/null +++ b/ema/models.py @@ -0,0 +1,74 @@ +from django.contrib.auth.models import User +from django.db import models + +from compensation.models import AbstractCompensation +from konova.settings import DEFAULT_SRID_RLP, LANIS_LINK_TEMPLATE +from user.models import UserActionLogEntry + + +class Ema(AbstractCompensation): + """ + EMA = Ersatzzahlungsmaßnahme + (compensation actions from payments) + + Until 2015 the EMA was the data object to keep track of any compensation, which has been funded by payments + previously paid. In 2015 another organization got in charge of this, which led to the creation of the data object + MAE (which is basically the same, just renamed in their system) to differ between the 'old' payment funded ones and + the new. For historical reasons, we need to keep EMAs in our system, since there are still entries done to this day, + which have been performed somewhere before 2015 and therefore needs to be entered. + Further information: + https://snu.rlp.de/de/foerderungen/massnahmen-aus-ersatzzahlungen/uebersicht-mae/ + + EMA therefore holds data like a compensation: actions, before-/after-states, deadlines, ... + + """ + # Users having access on this object + # Not needed in regular Compensation since their access is defined by the linked intervention's access + users = models.ManyToManyField( + User, + help_text="Users having access (shared with)" + ) + + # Refers to "verzeichnen" + recorded = models.OneToOneField( + UserActionLogEntry, + on_delete=models.SET_NULL, + null=True, + blank=True, + help_text="Holds data on user and timestamp of this action", + related_name="+" + ) + + def __str__(self): + return "{}".format(self.identifier) + + def save(self, *args, **kwargs): + if self.identifier is None or len(self.identifier) == 0: + # Create new identifier + new_id = self._generate_new_identifier() + while Ema.objects.filter(identifier=new_id).exists(): + new_id = self._generate_new_identifier() + self.identifier = new_id + super().save(*args, **kwargs) + + def get_LANIS_link(self) -> str: + """ Generates a link for LANIS depending on the geometry + + Returns: + + """ + try: + geom = self.geometry.geom.transform(DEFAULT_SRID_RLP, clone=True) + x = geom.centroid.x + y = geom.centroid.y + zoom_lvl = 16 + except AttributeError: + # If no geometry has been added, yet. + x = 1 + y = 1 + zoom_lvl = 6 + return LANIS_LINK_TEMPLATE.format( + zoom_lvl, + x, + y, + ) diff --git a/ema/settings.py b/ema/settings.py new file mode 100644 index 00000000..6edf90af --- /dev/null +++ b/ema/settings.py @@ -0,0 +1,10 @@ +""" +Author: Michel Peltriaux +Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany +Contact: michel.peltriaux@sgdnord.rlp.de +Created on: 19.08.21 + +""" + +EMA_ACCOUNT_IDENTIFIER_LENGTH = 10 +EMA_ACCOUNT_IDENTIFIER_TEMPLATE = "EMA-{}" \ No newline at end of file diff --git a/ema/tables.py b/ema/tables.py new file mode 100644 index 00000000..5771307b --- /dev/null +++ b/ema/tables.py @@ -0,0 +1,132 @@ +""" +Author: Michel Peltriaux +Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany +Contact: michel.peltriaux@sgdnord.rlp.de +Created on: 19.08.21 + +""" +from django.http import HttpRequest +from django.utils.html import format_html +from django.utils.timezone import localtime +from django.utils.translation import gettext_lazy as _ +from django.urls import reverse + +import django_tables2 as tables + +from konova.sub_settings.django_settings import DEFAULT_DATE_TIME_FORMAT +from konova.utils.tables import BaseTable +from ema.filters import EmaTableFilter +from ema.models import Ema + + +class EmaTable(BaseTable): + """ + Since EMA and compensation are basically the same, we can reuse CompensationTableFilter and extend the EMA filter + in the future by inheriting. + """ + id = tables.Column( + verbose_name=_("Identifier"), + orderable=True, + accessor="identifier", + ) + t = tables.Column( + verbose_name=_("Title"), + orderable=True, + accessor="title", + ) + r = tables.Column( + verbose_name=_("Recorded"), + orderable=True, + empty_values=[], + accessor="recorded", + ) + e = tables.Column( + verbose_name=_("Editable"), + orderable=True, + empty_values=[], + accessor="users", + ) + lm = tables.Column( + verbose_name=_("Last edit"), + orderable=True, + accessor="created__timestamp", + ) + + class Meta(BaseTable.Meta): + template_name = "django_tables2/bootstrap4.html" + + def __init__(self, request: HttpRequest, *args, **kwargs): + self.title = _("Payment funded compensations") + self.subtitle = _("EMA explanation") + self.add_new_url = reverse("ema:new") + qs = kwargs.get("queryset", None) + self.filter = EmaTableFilter( + user=request.user, + data=request.GET, + queryset=qs, + ) + super().__init__(request, self.filter, *args, **kwargs) + + def render_id(self, value, record: Ema): + """ Renders the id column for a EMA + + Args: + value (str): The identifier value + record (EMA): The EMA record + + Returns: + + """ + html = "" + html += self.render_link( + tooltip=_("Open {}").format(_("EMA")), + href=reverse("ema:open", args=(record.id,)), + txt=value, + new_tab=False, + ) + return format_html(html) + + def render_r(self, value, record: Ema): + """ Renders the registered column for a EMA + + Args: + value (str): The identifier value + record (Ema): The EMA record + + Returns: + + """ + html = "" + recorded = value is not None + tooltip = _("Not recorded yet") + if recorded: + value = value.timestamp + value = localtime(value) + on = value.strftime(DEFAULT_DATE_TIME_FORMAT) + tooltip = _("Recorded on {} by {}").format(on, record.recorded.user) + html += self.render_bookmark( + tooltip=tooltip, + icn_filled=recorded, + ) + return format_html(html) + + def render_e(self, value, record: Ema): + """ Renders the editable column for a EMA + + Args: + value (str): The identifier value + record (Ema): The EMA record + + Returns: + + """ + html = "" + has_access = value.filter( + username=self.user.username + ).exists() + + html += self.render_icn( + tooltip=_("Full access granted") if has_access else _("Access not granted"), + icn_class="fas fa-edit rlp-r-inv" if has_access else "far fa-edit", + ) + return format_html(html) diff --git a/ema/tests.py b/ema/tests.py new file mode 100644 index 00000000..7ce503c2 --- /dev/null +++ b/ema/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/ema/urls.py b/ema/urls.py new file mode 100644 index 00000000..97cef3b3 --- /dev/null +++ b/ema/urls.py @@ -0,0 +1,16 @@ +""" +Author: Michel Peltriaux +Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany +Contact: michel.peltriaux@sgdnord.rlp.de +Created on: 19.08.21 + +""" +from django.urls import path +from ema.views import index_view, new_view, open_view + +app_name = "ema" +urlpatterns = [ + path("", index_view, name="index"), + path("new/", new_view, name="new"), + path("", open_view, name="open"), +] \ No newline at end of file diff --git a/ema/views.py b/ema/views.py new file mode 100644 index 00000000..febf4f4c --- /dev/null +++ b/ema/views.py @@ -0,0 +1,70 @@ +from django.contrib.auth.decorators import login_required +from django.http import HttpRequest +from django.shortcuts import render, get_object_or_404 + +from ema.tables import EmaTable +from konova.contexts import BaseContext +from konova.decorators import conservation_office_group_required +from ema.models import Ema + + +@login_required +def index_view(request: HttpRequest): + """ Renders the index view for MAEs + + Args: + request (HttpRequest): The incoming request + + Returns: + + """ + template = "generic_index.html" + emas = Ema.objects.filter( + deleted=None, + ).order_by( + "-modified" + ) + table = EmaTable( + request, + queryset=emas + ) + context = { + "table": table, + } + context = BaseContext(request, context).context + return render(request, template, context) + + +@login_required +@conservation_office_group_required +def new_view(request: HttpRequest): + """ Renders the form for a new MAE + + Args: + request (HttpRequest): The incoming request + + Returns: + + """ + template = "generic_index.html" + context = {} + context = BaseContext(request, context).context + return render(request, template, context) + + +@login_required +def open_view(request: HttpRequest, id: str): + """ Renders the form for a new MAE + + Args: + request (HttpRequest): The incoming request + id (str): The MAE id + + Returns: + + """ + ema = get_object_or_404(Ema, id=id) + template = "generic_index.html" + context = {} + context = BaseContext(request, context).context + return render(request, template, context) diff --git a/intervention/forms.py b/intervention/forms.py index 58357633..54d166c7 100644 --- a/intervention/forms.py +++ b/intervention/forms.py @@ -203,6 +203,8 @@ class EditInterventionForm(NewInterventionForm): action=UserAction.EDITED ) self.instance.log.add(user_action) + self.instance.modified = user_action + self.instance.save() return self.instance @@ -381,6 +383,8 @@ class NewRevocationForm(BaseModalForm): document=document, created=created_action, ) + self.instance.modified = edited_action + self.instance.save() self.instance.log.add(edited_action) self.instance.legal.revocation = revocation self.instance.legal.save() @@ -553,6 +557,8 @@ class NewWithdrawForm(BaseModalForm): action=UserAction.CREATED ) self.instance.log.add(user_action_edit) + self.instance.modified = user_action_edit + self.instance.save() # Create withdraw depending on Intervention or EcoAccount as the initial instance if self.is_intervention_initially: diff --git a/intervention/models.py b/intervention/models.py index 762251b9..67d75d04 100644 --- a/intervention/models.py +++ b/intervention/models.py @@ -21,9 +21,9 @@ class ResponsibilityData(UuidModel): Holds intervention data about responsible organizations and their file numbers for this case """ - registration_office = models.ForeignKey(Organisation, on_delete=models.SET_NULL, null=True, related_name="+") + registration_office = models.ForeignKey(Organisation, on_delete=models.SET_NULL, null=True, related_name="+", blank=True) registration_file_number = models.CharField(max_length=1000, blank=True, null=True) - conservation_office = models.ForeignKey(Organisation, on_delete=models.SET_NULL, null=True, related_name="+") + conservation_office = models.ForeignKey(Organisation, on_delete=models.SET_NULL, null=True, related_name="+", blank=True) conservation_file_number = models.CharField(max_length=1000, blank=True, null=True) handler = models.CharField(max_length=500, null=True, blank=True, help_text="Refers to 'Eingriffsverursacher'") @@ -115,9 +115,6 @@ class Intervention(BaseObject): related_name="+" ) - # Holds which intervention is simply a newer version of this dataset - next_version = models.ForeignKey("Intervention", null=True, blank=True, on_delete=models.DO_NOTHING) - # Users having access on this object users = models.ManyToManyField(User, help_text="Users having access (data shared with)") access_token = models.CharField( diff --git a/intervention/tables.py b/intervention/tables.py index d51f203d..ed25d461 100644 --- a/intervention/tables.py +++ b/intervention/tables.py @@ -50,7 +50,7 @@ class InterventionTable(BaseTable): lm = tables.Column( verbose_name=_("Last edit"), orderable=True, - accessor="created__timestamp", + accessor="modified__timestamp", ) """ # ToDo: Decide to keep actions column or to dismiss them @@ -164,23 +164,3 @@ class InterventionTable(BaseTable): icn_class="fas fa-edit rlp-r-inv" if has_access else "far fa-edit", ) return format_html(html) - - def render_ac(self, value, record): - """ - Renders possible actions for this record, such as delete. - """ - intervention = _("Intervention") - html = "" - html += self.render_open_btn( - _("Open {}").format(intervention), - reverse("intervention:open", args=(record.id,)) - ) - html += self.render_edit_btn( - _("Edit {}").format(intervention), - reverse("intervention:edit", args=(record.id,)), - ) - html += self.render_delete_btn( - _("Delete {}").format(intervention), - reverse("intervention:remove", args=(record.id,)), - ) - return format_html(html) diff --git a/intervention/templates/intervention/detail/view.html b/intervention/templates/intervention/detail/view.html index 869f805e..55057547 100644 --- a/intervention/templates/intervention/detail/view.html +++ b/intervention/templates/intervention/detail/view.html @@ -94,7 +94,7 @@ {% trans 'Binding on' %} {{intervention.legal.binding_date|default_if_none:""}} - + {% trans 'Revocation' %} {{intervention.legal.revocation.date|naturalday|default_if_none:""}} diff --git a/intervention/views.py b/intervention/views.py index f9df7265..c9fb34e8 100644 --- a/intervention/views.py +++ b/intervention/views.py @@ -33,9 +33,6 @@ def index_view(request: HttpRequest): # Filtering by user access is performed in table filter inside of InterventionTableFilter class interventions = Intervention.objects.filter( deleted=None, # not deleted - next_version=None, # only newest versions - ).order_by( - "-created__timestamp" ) table = InterventionTable( request=request, @@ -273,22 +270,10 @@ def create_share_view(request: HttpRequest, id: str): """ intervention = get_object_or_404(Intervention, id=id) form = ShareInterventionForm(request.POST or None, instance=intervention, request=request) - if request.method == "POST": - if form.is_valid(): - form.save() - messages.info( - request, - _("Share settings updated") - ) - return redirect(request.META.get("HTTP_REFERER", "home")) - elif request.method == "GET": - context = { - "form": form, - } - context = BaseContext(request, context).context - return render(request, form.template, context) - else: - raise NotImplementedError + return form.process_request( + request, + msg_success=_("Share settings updated") + ) @login_required @@ -324,28 +309,10 @@ def new_revocation_view(request: HttpRequest, id: str): """ intervention = get_object_or_404(Intervention, id=id) form = NewRevocationForm(request.POST or None, request.FILES or None, instance=intervention, user=request.user) - if request.method == "POST": - if form.is_valid(): - form.save() - messages.info( - request, - _("Revocation added") - ) - else: - messages.error( - request, - FORM_INVALID, - extra_tags="danger", - ) - return redirect(request.META.get("HTTP_REFERER", "home")) - elif request.method == "GET": - context = { - "form": form, - } - context = BaseContext(request, context).context - return render(request, form.template, context) - else: - raise NotImplementedError + return form.process_request( + request, + msg_success=_("Revocation added") + ) @login_required @@ -365,7 +332,7 @@ def log_view(request: HttpRequest, id: str): context = { "modal_body_template": body_template, - "log": intervention.log.all().order_by("-timestamp"), + "log": intervention.log.all(), "modal_title": _("Log"), } context = BaseContext(request, context).context diff --git a/konova/forms.py b/konova/forms.py index f07a08a5..474f7f77 100644 --- a/konova/forms.py +++ b/konova/forms.py @@ -45,7 +45,6 @@ class BaseForm(forms.Form): def __init__(self, *args, **kwargs): self.instance = kwargs.pop("instance", None) self.user = kwargs.pop("user", None) - self.request = kwargs.pop("request", None) super().__init__(*args, **kwargs) # Check for required fields @@ -341,6 +340,8 @@ class NewDocumentForm(BaseModalForm): comment=_("Added document"), ) self.instance.log.add(edited_action) + self.instance.modified = edited_action + self.instance.save() return doc diff --git a/konova/models.py b/konova/models.py index ee581d1e..2c554f64 100644 --- a/konova/models.py +++ b/konova/models.py @@ -16,6 +16,7 @@ from django.db import models, transaction from compensation.settings import COMPENSATION_IDENTIFIER_TEMPLATE, COMPENSATION_IDENTIFIER_LENGTH, \ ECO_ACCOUNT_IDENTIFIER_TEMPLATE, ECO_ACCOUNT_IDENTIFIER_LENGTH +from ema.settings import EMA_ACCOUNT_IDENTIFIER_LENGTH, EMA_ACCOUNT_IDENTIFIER_TEMPLATE from intervention.settings import INTERVENTION_IDENTIFIER_LENGTH, INTERVENTION_IDENTIFIER_TEMPLATE from konova.utils.generators import generate_random_string from user.models import UserActionLogEntry, UserAction @@ -39,7 +40,21 @@ class BaseResource(UuidModel): """ A basic resource model, which defines attributes for every derived model """ - created = models.ForeignKey(UserActionLogEntry, on_delete=models.SET_NULL, null=True, blank=True, related_name='+') + created = models.ForeignKey( + UserActionLogEntry, + on_delete=models.SET_NULL, + null=True, + blank=True, + related_name='+' + ) + modified = models.ForeignKey( + UserActionLogEntry, + on_delete=models.SET_NULL, + null=True, + blank=True, + related_name='+', + help_text="Last modified" + ) class Meta: abstract = True @@ -131,6 +146,8 @@ class BaseObject(BaseResource): """ from compensation.models import Compensation, EcoAccount from intervention.models import Intervention + from ema.models import Ema + definitions = { Intervention: { "length": INTERVENTION_IDENTIFIER_LENGTH, @@ -144,6 +161,10 @@ class BaseObject(BaseResource): "length": ECO_ACCOUNT_IDENTIFIER_LENGTH, "template": ECO_ACCOUNT_IDENTIFIER_TEMPLATE, }, + Ema: { + "length": EMA_ACCOUNT_IDENTIFIER_LENGTH, + "template": EMA_ACCOUNT_IDENTIFIER_TEMPLATE, + }, } if self.__class__ not in definitions: diff --git a/konova/sub_settings/django_settings.py b/konova/sub_settings/django_settings.py index 494b3c79..18265cb1 100644 --- a/konova/sub_settings/django_settings.py +++ b/konova/sub_settings/django_settings.py @@ -68,6 +68,7 @@ INSTALLED_APPS = [ 'organisation', 'news', 'user', + 'ema', ] if DEBUG: INSTALLED_APPS += [ diff --git a/konova/urls.py b/konova/urls.py index c5e93132..9fed7fdd 100644 --- a/konova/urls.py +++ b/konova/urls.py @@ -31,7 +31,7 @@ urlpatterns = [ path('', home_view, name="home"), path('intervention/', include("intervention.urls")), path('compensation/', include("compensation.urls")), - path('ema/', include("intervention.urls")), #ToDo + path('ema/', include("ema.urls")), path('organisation/', include("organisation.urls")), path('user/', include("user.urls")), path('news/', include("news.urls")), diff --git a/konova/utils/tables.py b/konova/utils/tables.py index 93c8e68d..293164b9 100644 --- a/konova/utils/tables.py +++ b/konova/utils/tables.py @@ -24,6 +24,7 @@ class BaseTable(tables.tables.Table): add_new_entries = True add_new_url = None title = None + subtitle = "" class Meta: attrs = { diff --git a/konova/views.py b/konova/views.py index ea89db12..cfe1b3c8 100644 --- a/konova/views.py +++ b/konova/views.py @@ -64,7 +64,6 @@ def home_view(request: HttpRequest): # First fetch all valid objects (undeleted, only newest versions) interventions = Intervention.objects.filter( deleted=None, - next_version=None, ) # Then fetch only user related ones user_interventions = interventions.filter( @@ -74,14 +73,12 @@ def home_view(request: HttpRequest): # Repeat for other objects comps = Compensation.objects.filter( deleted=None, - next_version=None, ) user_comps = comps.filter( intervention__users__in=[user] ) eco_accs = EcoAccount.objects.filter( deleted=None, - next_version=None, ) user_ecco_accs = eco_accs.filter( users__in=[user] diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index 5de77a799fa32fbab1938e094a7144c950757abf..cef9d83300f94b684dc238d14b28dc8143893605 100644 GIT binary patch delta 6181 zcmZA530Rd?9>?)REV2kHi>L_PLJ`~$1Ck~rC@eH`%&eTI@(LFL@k%UVl-@S8QnS1? zlbTj$WvQt#mRf4XxL~GMI$4%!wAiMZw(B(CAMf#*X5Q!d^Eu~z&wG~tIq$WZrXG%SF@*XP7=h1XXKcYJ ze9hk9gDKPx+WWs_tT8?l)zg@+JV>!-VHfH}7=z=GhNjX!pMmOl9%`T^w!Xr;5hJZlLu#Y_yteAG&dF&zJD>yuFJo2;`?8ED2qxCqa~ zHq=7C!A^J@`(aRmG0epb#0bVWBPeL4SD_k~qXzJzR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P2 z@GR=RTd2%FK)vq{Xyu%C7iy+;ZM_ZZfh<%9uc9V86P1x=s0pq^ot16)I_|<6n9|y@ zAI4Ijh4J`4>iwfgrrhQ%1vfN7RIR zAs?0*fR%AMY9R#}jmI%n-~UYtN=-~#CzUl&DN4s!?2cMdHu8m;RhWq1peFhUYGB`X z&H$w`fOa?MhTgyb7ubg7=);X430>OPiNqmQxH=I*dVp&bv4hZr z&JddkO~z&K`%&Iayg=w`MD!r^zj?;u4MNvY2mWxR@CTvP{PlW^%0b(35C2XqARgGZ zWGjg@xx`gl7r_jsl|J-jg+;X}ORa;wI~Pk3dx-)fkb42dJj%NE5d4GUy{7R~`P=5% z8y4lS41Mjn7#0!yFWOe<3D488sOH@%^i+-Oa|iEsvpHrsk#5`0<5FAhh8KxXJUv}8 zosUzhN}M3B5xO=KzY@EMQ^W{Dd;KBt0g*}M5I+#r30*6RE1vx>m;X~rzj=yWQOT!u z!(RWzC&b4@IaZ@7WUGAH8BSa>lG?ty!*SSC_Kh}pV~Ql`#)GjBoRZ2G@?9DF2{z1 zhxjMagy>A@szzKVG6?-KluhUwM{FeqslqkE!K}4j!kPNzr|S{%648tpPfR63i7yFV zp-ke4Q}q69&(D)YJ`qFwL_E9ZP>3YHCB7lvCv+_#DiQx9B8XeWzx8YN0tHHnL@$5QG;TKyOiLHr#wqAmF>r;*=Zs+%p_|o4ucJfqDV)PKtis%F0 za_=fV^7E^-_s@^4mKBsgyY{i5lAR6|WDg!bR8MwEo#Xko(fN>;L$k&Y8aiTvw{ctJ V?)jljb_C>KN&7h1^IqoUKLOy7WW)df diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index 7c52cdef..c26bd1b1 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -3,20 +3,20 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -#: compensation/filters.py:71 compensation/forms.py:42 compensation/forms.py:47 -#: compensation/forms.py:60 compensation/forms.py:209 compensation/forms.py:277 +#: compensation/filters.py:71 compensation/forms.py:43 compensation/forms.py:48 +#: compensation/forms.py:61 compensation/forms.py:219 compensation/forms.py:289 #: intervention/filters.py:26 intervention/filters.py:40 #: intervention/filters.py:47 intervention/filters.py:48 -#: intervention/forms.py:319 intervention/forms.py:331 -#: intervention/forms.py:343 konova/forms.py:106 konova/forms.py:242 -#: konova/forms.py:275 konova/forms.py:280 konova/forms.py:292 -#: konova/forms.py:304 konova/forms.py:317 user/forms.py:38 +#: intervention/forms.py:322 intervention/forms.py:334 +#: intervention/forms.py:346 konova/forms.py:107 konova/forms.py:241 +#: konova/forms.py:274 konova/forms.py:279 konova/forms.py:291 +#: konova/forms.py:303 konova/forms.py:316 user/forms.py:38 #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-08-11 14:47+0200\n" +"POT-Creation-Date: 2021-08-19 12:40+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -30,161 +30,161 @@ msgstr "" msgid "Show only unrecorded" msgstr "Nur unverzeichnete anzeigen" -#: compensation/forms.py:41 compensation/forms.py:266 +#: compensation/forms.py:42 compensation/forms.py:278 #: compensation/templates/compensation/detail/eco_account/includes/withdraws.html:31 #: intervention/templates/intervention/detail/includes/withdraws.html:31 msgid "Amount" msgstr "Menge" -#: compensation/forms.py:43 +#: compensation/forms.py:44 msgid "Amount in Euro" msgstr "Betrag in Euro" -#: compensation/forms.py:46 +#: compensation/forms.py:47 #: intervention/templates/intervention/detail/includes/payments.html:31 msgid "Due on" msgstr "Fällig am" -#: compensation/forms.py:48 +#: compensation/forms.py:49 msgid "Due on which date" msgstr "Zahlung wird an diesem Datum erwartet" -#: compensation/forms.py:61 +#: compensation/forms.py:62 msgid "Transfer note" msgstr "Verwendungszweck" -#: compensation/forms.py:62 +#: compensation/forms.py:63 msgid "Note for money transfer" msgstr "Verwendungszweck für Überweisung" -#: compensation/forms.py:68 +#: compensation/forms.py:69 msgid "Payment" msgstr "Zahlung" -#: compensation/forms.py:69 +#: compensation/forms.py:70 msgid "Add a payment for intervention '{}'" msgstr "Neue Ersatzzahlung zu Eingriff '{}' hinzufügen" -#: compensation/forms.py:81 +#: compensation/forms.py:82 msgid "Added payment" msgstr "Zahlung hinzufügen" -#: compensation/forms.py:96 +#: compensation/forms.py:99 msgid "Biotope Type" msgstr "Biotoptyp" -#: compensation/forms.py:99 +#: compensation/forms.py:102 msgid "Select the biotope type" msgstr "Biotoptyp wählen" -#: compensation/forms.py:104 +#: compensation/forms.py:107 #: 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 #: compensation/templates/compensation/detail/eco_account/includes/states-before.html:36 -#: intervention/forms.py:459 +#: intervention/forms.py:474 msgid "Surface" msgstr "Fläche" -#: compensation/forms.py:107 intervention/forms.py:461 +#: compensation/forms.py:110 intervention/forms.py:476 msgid "in m²" msgstr "" -#: compensation/forms.py:112 +#: compensation/forms.py:115 msgid "New state" msgstr "Neuer Zustand" -#: compensation/forms.py:113 +#: compensation/forms.py:116 msgid "Insert data for the new state" msgstr "Geben Sie die Daten des neuen Zustandes ein" -#: compensation/forms.py:121 +#: compensation/forms.py:124 msgid "Added state" msgstr "Zustand hinzugefügt" -#: compensation/forms.py:135 konova/forms.py:156 +#: compensation/forms.py:140 konova/forms.py:157 msgid "Object removed" msgstr "Objekt entfernt" -#: compensation/forms.py:181 +#: compensation/forms.py:191 msgid "Deadline Type" msgstr "Fristart" -#: compensation/forms.py:184 +#: compensation/forms.py:194 msgid "Select the deadline type" msgstr "Fristart wählen" -#: compensation/forms.py:193 +#: compensation/forms.py:203 #: compensation/templates/compensation/detail/compensation/includes/deadlines.html:31 #: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:31 -#: intervention/forms.py:318 +#: intervention/forms.py:321 msgid "Date" msgstr "Datum" -#: compensation/forms.py:196 +#: compensation/forms.py:206 msgid "Select date" msgstr "Datum wählen" -#: compensation/forms.py:208 compensation/forms.py:276 +#: compensation/forms.py:218 compensation/forms.py:288 #: compensation/templates/compensation/detail/compensation/includes/actions.html:34 #: compensation/templates/compensation/detail/compensation/includes/deadlines.html:34 #: compensation/templates/compensation/detail/compensation/includes/documents.html:31 #: compensation/templates/compensation/detail/eco_account/includes/actions.html:34 #: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:34 #: compensation/templates/compensation/detail/eco_account/includes/documents.html:31 -#: intervention/forms.py:342 +#: intervention/forms.py:345 #: intervention/templates/intervention/detail/includes/documents.html:31 #: intervention/templates/intervention/detail/includes/revocation.html:35 -#: konova/forms.py:303 +#: konova/forms.py:302 msgid "Comment" msgstr "Kommentar" -#: compensation/forms.py:210 compensation/forms.py:278 -#: intervention/forms.py:344 konova/forms.py:305 +#: compensation/forms.py:220 compensation/forms.py:290 +#: intervention/forms.py:347 konova/forms.py:304 msgid "Additional comment, maximum {} letters" msgstr "Zusätzlicher Kommentar, maximal {} Zeichen" -#: compensation/forms.py:221 +#: compensation/forms.py:231 msgid "New deadline" msgstr "Neue Frist" -#: compensation/forms.py:222 +#: compensation/forms.py:232 msgid "Insert data for the new deadline" msgstr "Geben Sie die Daten der neuen Frist ein" -#: compensation/forms.py:239 +#: compensation/forms.py:249 msgid "Added deadline" msgstr "Frist/Termin hinzugefügt" -#: compensation/forms.py:248 +#: compensation/forms.py:260 msgid "Action Type" msgstr "Maßnahmentyp" -#: compensation/forms.py:251 +#: compensation/forms.py:263 msgid "Select the action type" msgstr "Maßnahmentyp wählen" -#: compensation/forms.py:254 +#: compensation/forms.py:266 msgid "Unit" msgstr "Einheit" -#: compensation/forms.py:257 +#: compensation/forms.py:269 msgid "Select the unit" msgstr "Einheit wählen" -#: compensation/forms.py:269 +#: compensation/forms.py:281 msgid "Insert the amount" msgstr "Menge eingeben" -#: compensation/forms.py:289 +#: compensation/forms.py:301 msgid "New action" msgstr "Neue Maßnahme" -#: compensation/forms.py:290 +#: compensation/forms.py:302 msgid "Insert data for the new action" msgstr "Geben Sie die Daten der neuen Maßnahme ein" -#: compensation/forms.py:309 +#: compensation/forms.py:321 msgid "Added action" msgstr "Maßnahme hinzugefügt" @@ -212,114 +212,114 @@ msgstr "" msgid "Pieces" msgstr "Stück" -#: compensation/tables.py:26 compensation/tables.py:166 -#: intervention/forms.py:29 intervention/tables.py:23 +#: compensation/tables.py:24 compensation/tables.py:164 ema/tables.py:28 +#: intervention/forms.py:30 intervention/tables.py:23 #: intervention/templates/intervention/detail/includes/compensations.html:30 msgid "Identifier" msgstr "Kennung" -#: compensation/tables.py:31 compensation/tables.py:171 +#: compensation/tables.py:29 compensation/tables.py:169 #: compensation/templates/compensation/detail/compensation/includes/documents.html:28 #: compensation/templates/compensation/detail/compensation/view.html:24 #: compensation/templates/compensation/detail/eco_account/includes/documents.html:28 #: compensation/templates/compensation/detail/eco_account/view.html:31 -#: intervention/forms.py:36 intervention/tables.py:28 +#: ema/tables.py:33 intervention/forms.py:37 intervention/tables.py:28 #: intervention/templates/intervention/detail/includes/compensations.html:33 #: intervention/templates/intervention/detail/includes/documents.html:28 -#: intervention/templates/intervention/detail/view.html:31 konova/forms.py:274 +#: intervention/templates/intervention/detail/view.html:31 konova/forms.py:273 msgid "Title" msgstr "Bezeichnung" -#: compensation/tables.py:36 +#: compensation/tables.py:34 #: compensation/templates/compensation/detail/compensation/view.html:36 #: intervention/tables.py:33 #: intervention/templates/intervention/detail/view.html:63 user/models.py:48 msgid "Checked" msgstr "Geprüft" -#: compensation/tables.py:42 compensation/tables.py:181 +#: compensation/tables.py:40 compensation/tables.py:179 #: compensation/templates/compensation/detail/compensation/view.html:50 #: compensation/templates/compensation/detail/eco_account/view.html:43 -#: intervention/tables.py:39 +#: ema/tables.py:38 intervention/tables.py:39 #: intervention/templates/intervention/detail/view.html:77 user/models.py:49 msgid "Recorded" msgstr "Verzeichnet" -#: compensation/tables.py:48 compensation/tables.py:187 +#: compensation/tables.py:46 compensation/tables.py:185 ema/tables.py:44 #: intervention/tables.py:45 msgid "Editable" msgstr "Freigegeben" -#: compensation/tables.py:54 compensation/tables.py:193 +#: compensation/tables.py:52 compensation/tables.py:191 ema/tables.py:50 #: intervention/tables.py:51 msgid "Last edit" msgstr "Zuletzt bearbeitet" -#: compensation/tables.py:63 +#: compensation/tables.py:61 #: intervention/templates/intervention/detail/includes/compensations.html:8 msgid "Compensations" msgstr "Kompensationen" -#: compensation/tables.py:85 compensation/tables.py:224 -#: intervention/tables.py:92 intervention/tables.py:175 +#: compensation/tables.py:83 compensation/tables.py:222 ema/tables.py:82 +#: intervention/tables.py:92 msgid "Open {}" msgstr "Öffne {}" -#: compensation/tables.py:85 +#: compensation/tables.py:83 #: compensation/templates/compensation/detail/compensation/view.html:12 #: konova/templates/konova/home.html:49 templates/navbar.html:28 msgid "Compensation" msgstr "Kompensation" -#: compensation/tables.py:106 intervention/tables.py:111 +#: compensation/tables.py:104 intervention/tables.py:111 msgid "Not checked yet" msgstr "Noch nicht geprüft" -#: compensation/tables.py:111 intervention/tables.py:116 +#: compensation/tables.py:109 intervention/tables.py:116 msgid "Checked on {} by {}" msgstr "Am {} von {} geprüft worden" -#: compensation/tables.py:130 +#: compensation/tables.py:128 #: compensation/templates/compensation/detail/compensation/view.html:53 #: compensation/templates/compensation/detail/eco_account/view.html:46 -#: intervention/tables.py:135 +#: ema/tables.py:101 intervention/tables.py:135 #: intervention/templates/intervention/detail/view.html:80 msgid "Not recorded yet" msgstr "Noch nicht verzeichnet" -#: compensation/tables.py:135 compensation/tables.py:262 +#: compensation/tables.py:133 compensation/tables.py:260 ema/tables.py:106 #: intervention/tables.py:140 msgid "Recorded on {} by {}" msgstr "Am {} von {} verzeichnet worden" -#: compensation/tables.py:158 compensation/tables.py:285 +#: compensation/tables.py:156 compensation/tables.py:283 ema/tables.py:129 #: intervention/tables.py:163 msgid "Full access granted" msgstr "Für Sie freigegeben - Datensatz kann bearbeitet werden" -#: compensation/tables.py:158 compensation/tables.py:285 +#: compensation/tables.py:156 compensation/tables.py:283 ema/tables.py:129 #: intervention/tables.py:163 msgid "Access not granted" msgstr "Nicht freigegeben - Datensatz nur lesbar" -#: compensation/tables.py:176 +#: compensation/tables.py:174 #: compensation/templates/compensation/detail/eco_account/view.html:35 #: konova/templates/konova/custom_widgets/progressbar.html:3 msgid "Available" msgstr "Verfügbar" -#: compensation/tables.py:202 +#: compensation/tables.py:200 msgid "Eco Accounts" msgstr "Ökokonten" -#: compensation/tables.py:224 +#: compensation/tables.py:222 #: compensation/templates/compensation/detail/eco_account/view.html:19 -#: intervention/forms.py:443 intervention/forms.py:450 +#: intervention/forms.py:458 intervention/forms.py:465 #: konova/templates/konova/home.html:88 templates/navbar.html:34 msgid "Eco-account" msgstr "Ökokonto" -#: compensation/tables.py:257 +#: compensation/tables.py:255 msgid "Not recorded yet. Can not be used for withdraws, yet." msgstr "" "Noch nicht verzeichnet. Kann noch nicht für Abbuchungen genutzt werden." @@ -414,7 +414,7 @@ msgstr "Frist/Termin hinzufügen" #: compensation/templates/compensation/detail/compensation/includes/deadlines.html:28 #: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:28 -#: intervention/forms.py:41 +#: intervention/forms.py:42 msgid "Type" msgstr "Typ" @@ -432,7 +432,7 @@ msgstr "Dokumente" #: compensation/templates/compensation/detail/compensation/includes/documents.html:14 #: compensation/templates/compensation/detail/eco_account/includes/documents.html:14 #: intervention/templates/intervention/detail/includes/documents.html:14 -#: konova/forms.py:316 +#: konova/forms.py:315 msgid "Add new document" msgstr "Neues Dokument hinzufügen" @@ -517,7 +517,7 @@ msgstr "Zuletzt bearbeitet" #: compensation/templates/compensation/detail/compensation/view.html:72 #: compensation/templates/compensation/detail/eco_account/view.html:65 -#: intervention/forms.py:252 +#: intervention/forms.py:255 #: intervention/templates/intervention/detail/view.html:111 msgid "Shared with" msgstr "Freigegeben für" @@ -568,7 +568,7 @@ msgid "Remove Withdraw" msgstr "Abbuchung entfernen" #: compensation/views/compensation_views.py:122 -#: compensation/views/eco_account_views.py:184 intervention/views.py:369 +#: compensation/views/eco_account_views.py:184 intervention/views.py:336 msgid "Log" msgstr "Log" @@ -577,7 +577,7 @@ msgid "Compensation removed" msgstr "Kompensation entfernt" #: compensation/views/compensation_views.py:162 -#: compensation/views/eco_account_views.py:283 intervention/views.py:96 +#: compensation/views/eco_account_views.py:283 intervention/views.py:93 msgid "Document added" msgstr "Dokument hinzugefügt" @@ -612,26 +612,42 @@ msgstr "Ökokonto entfernt" msgid "Withdraw removed" msgstr "Abbuchung entfernt" -#: compensation/views/eco_account_views.py:204 intervention/views.py:409 +#: compensation/views/eco_account_views.py:204 intervention/views.py:376 msgid "{} unrecorded" msgstr "{} entzeichnet" -#: compensation/views/eco_account_views.py:204 intervention/views.py:409 +#: compensation/views/eco_account_views.py:204 intervention/views.py:376 msgid "{} recorded" msgstr "{} verzeichnet" -#: compensation/views/eco_account_views.py:303 intervention/views.py:391 +#: compensation/views/eco_account_views.py:303 intervention/views.py:358 msgid "Withdraw added" msgstr "Abbuchung hinzugefügt" -#: compensation/views/payment_views.py:43 +#: compensation/views/payment_views.py:40 msgid "Payment added" msgstr "Zahlung hinzugefügt" -#: compensation/views/payment_views.py:78 +#: compensation/views/payment_views.py:60 msgid "Payment removed" msgstr "Zahlung gelöscht" +#: ema/tables.py:59 templates/navbar.html:43 +msgid "Payment funded compensations" +msgstr "Ersatzzahlungsmaßnahmen (EMA)" + +#: ema/tables.py:60 +msgid "EMA explanation" +msgstr "" +"EMA sind Kompensationen, die durch Ersatzzahlungen finanziert wurden. " +"Beachten Sie, dass hier nur die EMAs vor 2015 verwaltet werden! Alle " +"Maßnahmen aus Ersatzzahlungen, die nach 2015 rechtskräftig wurden, werden " +"durch die Stiftung Natur und Umwelt verwaltet." + +#: ema/tables.py:82 templates/navbar.html:43 +msgid "EMA" +msgstr "" + #: intervention/filters.py:25 msgid "Show unshared" msgstr "Nicht freigegebene anzeigen" @@ -648,125 +664,125 @@ msgstr "Gemarkung" msgid "Search for district" msgstr "Nach Gemarkung suchen" -#: intervention/forms.py:32 +#: intervention/forms.py:33 msgid "Generated automatically if none was given" msgstr "Wird automatisch erzeugt, falls nicht angegeben" -#: intervention/forms.py:44 +#: intervention/forms.py:45 msgid "Which intervention type is this" msgstr "Welcher Eingriffstyp" -#: intervention/forms.py:47 +#: intervention/forms.py:48 #: intervention/templates/intervention/detail/view.html:39 msgid "Law" msgstr "Gesetz" -#: intervention/forms.py:50 +#: intervention/forms.py:51 msgid "Based on which law" msgstr "Basiert auf welchem Recht" -#: intervention/forms.py:53 +#: intervention/forms.py:54 #: intervention/templates/intervention/detail/view.html:59 msgid "Intervention handler" msgstr "Eingriffsverursacher" -#: intervention/forms.py:56 +#: intervention/forms.py:57 msgid "Who performs the intervention" msgstr "Wer führt den Eingriff durch" -#: intervention/forms.py:59 +#: intervention/forms.py:60 msgid "Data provider" msgstr "Datenbereitsteller" -#: intervention/forms.py:61 +#: intervention/forms.py:62 msgid "Who provides the data for the intervention" msgstr "Wer stellt die Daten für den Eingriff zur Verfügung" -#: intervention/forms.py:66 +#: intervention/forms.py:67 msgid "Organization" msgstr "Organisation" -#: intervention/forms.py:72 +#: intervention/forms.py:73 msgid "Data provider details" msgstr "Datenbereitsteller Details" -#: intervention/forms.py:75 +#: intervention/forms.py:76 msgid "Further details" msgstr "Weitere Details" -#: intervention/forms.py:88 +#: intervention/forms.py:89 msgid "Map" msgstr "Karte" -#: intervention/forms.py:90 +#: intervention/forms.py:91 msgid "Where does the intervention take place" msgstr "Wo findet der Eingriff statt" -#: intervention/forms.py:98 +#: intervention/forms.py:99 msgid "Files" msgstr "Dateien" -#: intervention/forms.py:105 +#: intervention/forms.py:106 msgid "New intervention" msgstr "Neuer Eingriff" -#: intervention/forms.py:147 +#: intervention/forms.py:148 msgid "Edit intervention" msgstr "Eingriff bearbeiten" -#: intervention/forms.py:241 +#: intervention/forms.py:244 msgid "Share link" msgstr "Freigabelink" -#: intervention/forms.py:243 +#: intervention/forms.py:246 msgid "Send this link to users who you want to have writing access on the data" msgstr "Andere Nutzer erhalten über diesen Link Zugriff auf die Daten" -#: intervention/forms.py:255 +#: intervention/forms.py:258 msgid "Remove check to remove access for this user" msgstr "Wählen Sie die Nutzer ab, die keinen Zugriff mehr haben sollen" -#: intervention/forms.py:266 +#: intervention/forms.py:269 #: intervention/templates/intervention/detail/includes/controls.html:15 msgid "Share" msgstr "Freigabe" -#: intervention/forms.py:267 +#: intervention/forms.py:270 msgid "Share settings for {}" msgstr "Freigabe Einstellungen für {}" -#: intervention/forms.py:320 +#: intervention/forms.py:323 msgid "Date of revocation" msgstr "Datum des Widerspruchs" -#: intervention/forms.py:330 +#: intervention/forms.py:333 #: intervention/templates/intervention/detail/includes/revocation.html:38 msgid "Document" msgstr "Dokument" -#: intervention/forms.py:332 konova/forms.py:293 +#: intervention/forms.py:335 konova/forms.py:292 msgid "Must be smaller than 15 Mb" msgstr "Muss kleiner als 15 Mb sein" -#: intervention/forms.py:355 +#: intervention/forms.py:358 #: intervention/templates/intervention/detail/includes/revocation.html:18 msgid "Add revocation" msgstr "Widerspruch hinzufügen" -#: intervention/forms.py:391 +#: intervention/forms.py:396 msgid "Checked intervention data" msgstr "Eingriffsdaten geprüft" -#: intervention/forms.py:397 +#: intervention/forms.py:402 msgid "Checked compensations data and payments" msgstr "Kompensationen und Zahlungen geprüft" -#: intervention/forms.py:405 +#: intervention/forms.py:410 #: intervention/templates/intervention/detail/includes/controls.html:19 msgid "Run check" msgstr "Prüfung vornehmen" -#: intervention/forms.py:406 konova/forms.py:362 +#: intervention/forms.py:411 konova/forms.py:363 msgid "" "I, {} {}, confirm that all necessary control steps have been performed by " "myself." @@ -774,36 +790,36 @@ msgstr "" "Ich, {} {}, bestätige, dass die notwendigen Kontrollschritte durchgeführt " "wurden:" -#: intervention/forms.py:445 +#: intervention/forms.py:460 msgid "Only recorded accounts can be selected for withdraws" msgstr "Nur verzeichnete Ökokonten können für Abbuchungen verwendet werden." -#: intervention/forms.py:464 intervention/forms.py:471 -#: intervention/tables.py:92 intervention/tables.py:172 +#: intervention/forms.py:479 intervention/forms.py:486 +#: intervention/tables.py:92 #: intervention/templates/intervention/detail/view.html:19 #: konova/templates/konova/home.html:11 templates/navbar.html:22 msgid "Intervention" msgstr "Eingriff" -#: intervention/forms.py:466 +#: intervention/forms.py:481 msgid "Only shared interventions can be selected" msgstr "Nur freigegebene Eingriffe können gewählt werden" -#: intervention/forms.py:479 +#: intervention/forms.py:494 msgid "New Withdraw" msgstr "Neue Abbuchung" -#: intervention/forms.py:480 +#: intervention/forms.py:495 msgid "Enter the information for a new withdraw from a chosen eco-account" msgstr "Geben Sie die Informationen für eine neue Abbuchung ein." -#: intervention/forms.py:516 +#: intervention/forms.py:531 msgid "" "Eco-account {} is not recorded yet. You can only withdraw from recorded " "accounts." msgstr "" -#: intervention/forms.py:529 +#: intervention/forms.py:544 msgid "" "The account {} has not enough surface for a withdraw of {} m². There are " "only {} m² left" @@ -811,31 +827,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:203 +#: intervention/models.py:200 msgid "Registration office file number missing" msgstr "Aktenzeichen Zulassungsbehörde fehlt" -#: intervention/models.py:206 +#: intervention/models.py:203 msgid "Conversation office file number missing" msgstr "Aktenzeichen Naturschutzbehörde fehlt" -#: intervention/models.py:209 +#: intervention/models.py:206 msgid "Responsible data missing" msgstr "Daten zu Verantwortlichen fehlen" -#: intervention/models.py:223 +#: intervention/models.py:220 msgid "Revocation exists" msgstr "Widerspruch liegt vor" -#: intervention/models.py:226 +#: intervention/models.py:223 msgid "Registration date missing" msgstr "Datum Zulassung bzw. Satzungsbeschluss fehlt" -#: intervention/models.py:229 +#: intervention/models.py:226 msgid "Binding on missing" msgstr "Datum Bestandskraft fehlt" -#: intervention/models.py:231 +#: intervention/models.py:228 msgid "Legal data missing" msgstr "Rechtliche Daten fehlen" @@ -843,14 +859,6 @@ msgstr "Rechtliche Daten fehlen" msgid "Interventions" msgstr "Eingriffe" -#: intervention/tables.py:179 -msgid "Edit {}" -msgstr "Bearbeite {}" - -#: intervention/tables.py:183 -msgid "Delete {}" -msgstr "Lösche {}" - #: intervention/templates/intervention/detail/includes/compensations.html:14 msgid "Add new compensation" msgstr "Neue Kompensation hinzufügen" @@ -902,10 +910,10 @@ msgstr "Ökokonto Kennung" #: intervention/templates/intervention/detail/view.html:34 #: intervention/templates/intervention/detail/view.html:38 #: intervention/templates/intervention/detail/view.html:46 +#: intervention/templates/intervention/detail/view.html:54 #: intervention/templates/intervention/detail/view.html:58 #: intervention/templates/intervention/detail/view.html:90 #: intervention/templates/intervention/detail/view.html:94 -#: intervention/templates/intervention/detail/view.html:98 msgid "Missing" msgstr "Fehlt" @@ -937,19 +945,23 @@ msgstr "Datum Zulassung bzw. Satzungsbeschluss" msgid "Binding on" msgstr "Datum Bestandskraft" -#: intervention/views.py:68 +#: intervention/templates/intervention/detail/view.html:98 +msgid "Exists" +msgstr "vorhanden" + +#: intervention/views.py:65 msgid "Intervention {} added" msgstr "Eingriff {} hinzugefügt" -#: intervention/views.py:71 intervention/views.py:172 +#: intervention/views.py:68 intervention/views.py:169 msgid "Invalid input" msgstr "Eingabe fehlerhaft" -#: intervention/views.py:130 +#: intervention/views.py:127 msgid "This intervention has a revocation from {}" msgstr "Es existiert ein Widerspruch vom {}" -#: intervention/views.py:146 +#: intervention/views.py:143 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 " @@ -959,43 +971,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:169 +#: intervention/views.py:166 msgid "{} edited" msgstr "{} bearbeitet" -#: intervention/views.py:198 +#: intervention/views.py:195 msgid "{} removed" msgstr "{} entfernt" -#: intervention/views.py:219 +#: intervention/views.py:216 msgid "Revocation removed" msgstr "Widerspruch entfernt" -#: intervention/views.py:245 +#: intervention/views.py:242 msgid "{} has already been shared with you" msgstr "{} wurde bereits für Sie freigegeben" -#: intervention/views.py:250 +#: intervention/views.py:247 msgid "{} has been shared with you" msgstr "{} ist nun für Sie freigegeben" -#: intervention/views.py:257 +#: intervention/views.py:254 msgid "Share link invalid" msgstr "Freigabelink ungültig" -#: intervention/views.py:281 +#: intervention/views.py:275 msgid "Share settings updated" msgstr "Freigabe Einstellungen aktualisiert" -#: intervention/views.py:309 +#: intervention/views.py:294 msgid "Check performed" msgstr "Prüfung durchgeführt" -#: intervention/views.py:332 +#: intervention/views.py:314 msgid "Revocation added" msgstr "Widerspruch hinzugefügt" -#: intervention/views.py:414 +#: intervention/views.py:381 msgid "There are errors on this intervention:" msgstr "Es liegen Fehler in diesem Eingriff vor:" @@ -1020,60 +1032,60 @@ msgstr "" msgid "You need to be part of another user group." msgstr "Hierfür müssen Sie einer anderen Nutzergruppe angehören!" -#: konova/forms.py:66 +#: konova/forms.py:67 msgid "Not editable" msgstr "Nicht editierbar" -#: konova/forms.py:105 konova/forms.py:241 +#: konova/forms.py:106 konova/forms.py:240 msgid "Confirm" msgstr "Bestätige" -#: konova/forms.py:117 konova/forms.py:250 +#: konova/forms.py:118 konova/forms.py:249 msgid "Remove" msgstr "Löschen" -#: konova/forms.py:119 +#: konova/forms.py:120 msgid "You are about to remove {} {}" msgstr "Sie sind dabei {} {} zu löschen" -#: konova/forms.py:251 +#: konova/forms.py:250 msgid "Are you sure?" msgstr "Sind Sie sicher?" -#: konova/forms.py:279 +#: konova/forms.py:278 msgid "Created on" msgstr "Erstellt" -#: konova/forms.py:281 +#: konova/forms.py:280 msgid "When has this file been created? Important for photos." msgstr "Wann wurde diese Datei erstellt oder das Foto aufgenommen?" -#: konova/forms.py:291 +#: konova/forms.py:290 #: venv/lib/python3.7/site-packages/django/db/models/fields/files.py:231 msgid "File" msgstr "Datei" -#: konova/forms.py:341 +#: konova/forms.py:340 msgid "Added document" msgstr "Dokument hinzugefügt" -#: konova/forms.py:353 +#: konova/forms.py:354 msgid "Confirm record" msgstr "Verzeichnen bestätigen" -#: konova/forms.py:361 +#: konova/forms.py:362 msgid "Record data" msgstr "Daten verzeichnen" -#: konova/forms.py:366 +#: konova/forms.py:367 msgid "Confirm unrecord" msgstr "Entzeichnen bestätigen" -#: konova/forms.py:367 +#: konova/forms.py:368 msgid "Unrecord data" msgstr "Daten entzeichnen" -#: konova/forms.py:368 +#: konova/forms.py:369 msgid "I, {} {}, confirm that this data must be unrecorded." msgstr "" "Ich, {} {}, bestätige, dass diese Daten wieder entzeichnet werden müssen." @@ -1102,19 +1114,19 @@ msgstr "Wenn meine freigegebenen Daten gelöscht wurden" msgid "On registered data edited" msgstr "Wenn meine freigegebenen Daten bearbeitet wurden" -#: konova/models.py:168 +#: konova/models.py:189 msgid "Finished" msgstr "Umgesetzt bis" -#: konova/models.py:169 +#: konova/models.py:190 msgid "Maintain" msgstr "Unterhaltung bis" -#: konova/models.py:170 +#: konova/models.py:191 msgid "Control" msgstr "Kontrolle am" -#: konova/models.py:171 +#: konova/models.py:192 msgid "Other" msgstr "Sonstige" @@ -1158,11 +1170,23 @@ msgstr "Es gab einen Fehler im Formular." msgid "There are errors in this intervention." msgstr "Es liegen Fehler in diesem Eingriff vor:" -#: konova/views.py:142 +#: konova/utils/messenger.py:69 +msgid "{} checked" +msgstr "{} geprüft" + +#: konova/utils/messenger.py:71 +msgid "Check it out" +msgstr "" + +#: konova/utils/messenger.py:72 +msgid "{} has been checked successfully by user {}! {}" +msgstr "" + +#: konova/views.py:138 msgid "Document '{}' deleted" msgstr "Dokument '{}' gelöscht" -#: konova/views.py:161 +#: konova/views.py:157 msgid "Deadline removed" msgstr "Frist gelöscht" @@ -1214,39 +1238,39 @@ msgstr "Abbrechen" msgid "Save" msgstr "Speichern" -#: templates/form/generic_table_form_body.html:21 +#: templates/form/generic_table_form_body.html:22 msgid "Fields with * are required." msgstr "* sind Pflichtfelder." -#: templates/generic_index.html:19 +#: templates/generic_index.html:28 msgid "New entry" msgstr "Neuer Eintrag" -#: templates/generic_index.html:21 +#: templates/generic_index.html:30 msgid "New" msgstr "Neu" -#: templates/generic_index.html:36 +#: templates/generic_index.html:45 msgid "Search for keywords" msgstr "Nach Schlagwörtern suchen" -#: templates/generic_index.html:36 +#: templates/generic_index.html:45 msgid "Search" msgstr "Suchen" -#: templates/generic_index.html:37 +#: templates/generic_index.html:46 msgid "Start search" msgstr "Starte Suche" -#: templates/generic_index.html:49 +#: templates/generic_index.html:58 msgid "Results per page" msgstr "Treffer pro Seite" -#: templates/generic_index.html:73 templates/generic_index.html:79 +#: templates/generic_index.html:82 templates/generic_index.html:88 msgid "Filter" msgstr "" -#: templates/generic_index.html:81 +#: templates/generic_index.html:90 msgid "Apply filter" msgstr "Filter anwenden" @@ -1282,10 +1306,6 @@ msgstr "Home" msgid "More" msgstr "Mehr" -#: templates/navbar.html:43 -msgid "EMA" -msgstr "" - #: templates/navbar.html:44 msgid "Import..." msgstr "" @@ -2578,8 +2598,11 @@ msgstr "" msgid "A fontawesome icon field" msgstr "" -#~ msgid "exists" -#~ msgstr "vorhanden" +#~ msgid "Edit {}" +#~ msgstr "Bearbeite {}" + +#~ msgid "Delete {}" +#~ msgstr "Lösche {}" #~ msgid "Actions" #~ msgstr "Aktionen" @@ -2605,9 +2628,6 @@ msgstr "" #~ msgid "Last login on" #~ msgstr "Zuletzt eingeloggt am" -#~ msgid "Delete compensation" -#~ msgstr "Kompensation löschen" - #~ msgid "Add new eco account" #~ msgstr "Neues Ökokonto hinzufügen" diff --git a/templates/base.html b/templates/base.html index e9a39234..f13ddc12 100644 --- a/templates/base.html +++ b/templates/base.html @@ -4,7 +4,7 @@ - {{ base_title }} + {{ base_frontend_title }} {% bootstrap_css %} {% bootstrap_javascript jquery='full' %} diff --git a/templates/generic_index.html b/templates/generic_index.html index 90185489..cf3253a3 100644 --- a/templates/generic_index.html +++ b/templates/generic_index.html @@ -5,12 +5,21 @@ {% block body %}
- {% if table.title is not None %} -
-

- {{ table.title }} -

-
+ {% if table.title %} +
+

+ {{ table.title }} +

+
+ {% if table.subtitle %} +
+
+ + {{ table.subtitle }} + +
+
+ {% endif %} {% endif %}
{% if table.add_new_entries %} diff --git a/templates/navbar.html b/templates/navbar.html index ea566cb0..39b622e1 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -34,13 +34,13 @@ {% trans 'Eco-account' %} -