From 881edaeba61909ebb334f24750cd05cbb2a57604 Mon Sep 17 00:00:00 2001 From: mipel Date: Tue, 3 Aug 2021 13:13:01 +0200 Subject: [PATCH] Compensation detail view * adds compensation detail view (WIP) * adds includes dir for related objects, similar to interventions * adds functionality for * adding/removing before_states * adding/removing after_states * adding/removing deadlines * adding/removing documents * refactors usage of BaseModalForm * holds now process_request() in base class for generic usage anywhere * adds __str__() method for some models * compensation__action is blank=True now * renamed tooltips * adds new routes for state/deadline/document handling inside of compensation/urls.py * adds precalculation of before/after_states for detail view, so users will see directly if there are missing states * removes unnecessary link for intervention detail payment * adds missing tooltips for check and record icon on detail views * refactors DeadlineTypeEnum into DeadlineType in konova/models.py, just as the django 3.x documentation suggests for model enumerations * UuidModel id field is not editable anymore in the admin interface * adds/updates translations --- compensation/forms.py | 95 +++- compensation/models.py | 10 +- compensation/tables.py | 4 +- .../compensation/detail/includes/actions.html | 0 .../detail/includes/deadlines.html | 66 +++ .../detail/includes/documents.html | 59 +++ .../detail/includes/states-after.html | 62 +++ .../detail/includes/states-before.html | 62 +++ .../templates/compensation/detail/view.html | 144 ++++++ compensation/urls.py | 7 + compensation/views.py | 111 ++++- intervention/tables.py | 4 +- .../detail/includes/payments.html | 4 +- .../templates/intervention/detail/view.html | 2 +- intervention/views.py | 26 +- konova/enums.py | 8 +- konova/forms.py | 79 ++-- konova/models.py | 31 +- konova/urls.py | 5 +- konova/views.py | 21 +- locale/de/LC_MESSAGES/django.mo | Bin 11445 -> 13180 bytes locale/de/LC_MESSAGES/django.po | 446 ++++++++++++------ 22 files changed, 1010 insertions(+), 236 deletions(-) create mode 100644 compensation/templates/compensation/detail/includes/actions.html create mode 100644 compensation/templates/compensation/detail/includes/deadlines.html create mode 100644 compensation/templates/compensation/detail/includes/documents.html create mode 100644 compensation/templates/compensation/detail/includes/states-after.html create mode 100644 compensation/templates/compensation/detail/includes/states-before.html create mode 100644 compensation/templates/compensation/detail/view.html diff --git a/compensation/forms.py b/compensation/forms.py index 05154673..9b443de5 100644 --- a/compensation/forms.py +++ b/compensation/forms.py @@ -9,9 +9,10 @@ from django import forms from django.db import transaction from django.utils.translation import gettext_lazy as _ -from compensation.models import Payment +from compensation.models import Payment, CompensationState from konova.enums import UserActionLogEntryEnum from konova.forms import BaseForm, BaseModalForm +from konova.models import Deadline, DeadlineType from user.models import UserActionLogEntry @@ -69,4 +70,94 @@ class NewPaymentForm(BaseModalForm): comment=self.cleaned_data.get("transfer_note", None), intervention=self.intervention, ) - return pay \ No newline at end of file + return pay + + +class NewStateModalForm(BaseModalForm): + biotope_type = forms.CharField( + label=_("Biotope Type"), + label_suffix="", + required=True, + help_text=_("Select the biotope type") + ) + surface = forms.DecimalField( + min_value=0.00, + decimal_places=2, + label=_("Surface"), + label_suffix="", + required=True, + help_text=_("in m²") + ) + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.form_title = _("New state") + self.form_caption = _("Insert data for the new state") + + def save(self, is_before_state: bool = False): + with transaction.atomic(): + state = CompensationState.objects.create( + biotope_type=self.cleaned_data["biotope_type"], + surface=self.cleaned_data["surface"], + ) + if is_before_state: + self.instance.before_states.add(state) + else: + self.instance.after_states.add(state) + return state + + +class NewDeadlineModalForm(BaseModalForm): + type = forms.ChoiceField( + label=_("Deadline Type"), + label_suffix="", + required=True, + help_text=_("Select the deadline type"), + choices=DeadlineType.choices + ) + date = forms.DateField( + label=_("Date"), + label_suffix="", + required=True, + help_text=_("Select date"), + widget=forms.DateInput( + attrs={ + "type": "date", + "data-provide": "datepicker", + }, + format="%d.%m.%Y" + ) + ) + comment = forms.CharField( + required=False, + label=_("Comment"), + label_suffix=_(""), + help_text=_("Additional comment"), + widget=forms.Textarea( + attrs={ + "cols": 30, + "rows": 5, + } + ) + ) + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.form_title = _("New deadline") + self.form_caption = _("Insert data for the new deadline") + + def save(self): + with transaction.atomic(): + action = UserActionLogEntry.objects.create( + user=self.user, + action=UserActionLogEntryEnum.CREATED.value + ) + deadline = Deadline.objects.create( + type=self.cleaned_data["type"], + date=self.cleaned_data["date"], + comment=self.cleaned_data["comment"], + created=action, + ) + self.instance.deadlines.add(deadline) + return deadline + diff --git a/compensation/models.py b/compensation/models.py index dd5488de..0031bd98 100644 --- a/compensation/models.py +++ b/compensation/models.py @@ -53,13 +53,16 @@ class CompensationControl(BaseResource): comment = models.TextField() -class CompensationState(models.Model): +class CompensationState(UuidModel): """ Compensations must define the state of an area before and after the compensation. """ biotope_type = models.CharField(max_length=500, null=True, blank=True) surface = models.FloatField() + def __str__(self): + return "{} | {} m²".format(self.biotope_type, self.surface) + class CompensationAction(BaseResource): """ @@ -70,6 +73,9 @@ class CompensationAction(BaseResource): unit = models.CharField(max_length=100, null=True, blank=True) control = models.ForeignKey(CompensationControl, on_delete=models.SET_NULL, null=True, blank=True) + def __str__(self): + return "{} | {} {}".format(self.action_type, self.amount, self.unit) + class AbstractCompensation(BaseObject): """ @@ -87,7 +93,7 @@ class AbstractCompensation(BaseObject): before_states = models.ManyToManyField(CompensationState, blank=True, related_name='+', help_text="Refers to 'Ausgangszustand Biotop'") after_states = models.ManyToManyField(CompensationState, blank=True, related_name='+', help_text="Refers to 'Zielzustand Biotop'") - actions = models.ManyToManyField(CompensationAction, help_text="Refers to 'Maßnahmen'") + actions = models.ManyToManyField(CompensationAction, blank=True, help_text="Refers to 'Maßnahmen'") deadlines = models.ManyToManyField("konova.Deadline", null=True, blank=True, related_name="+") diff --git a/compensation/tables.py b/compensation/tables.py index 5fd65b3e..6d0e7ca6 100644 --- a/compensation/tables.py +++ b/compensation/tables.py @@ -125,12 +125,12 @@ class CompensationTable(BaseTable): """ html = "" checked = value is not None - tooltip = _("Not registered yet") + tooltip = _("Not recorded yet") if checked: value = value.timestamp value = localtime(value) on = value.strftime(DEFAULT_DATE_TIME_FORMAT) - tooltip = _("Registered on {} by {}").format(on, record.intervention.recorded.user) + tooltip = _("Recorded on {} by {}").format(on, record.intervention.recorded.user) html += self.render_bookmark( tooltip=tooltip, icn_filled=checked, diff --git a/compensation/templates/compensation/detail/includes/actions.html b/compensation/templates/compensation/detail/includes/actions.html new file mode 100644 index 00000000..e69de29b diff --git a/compensation/templates/compensation/detail/includes/deadlines.html b/compensation/templates/compensation/detail/includes/deadlines.html new file mode 100644 index 00000000..7cdcd383 --- /dev/null +++ b/compensation/templates/compensation/detail/includes/deadlines.html @@ -0,0 +1,66 @@ +{% load i18n l10n fontawesome_5 %} + \ No newline at end of file diff --git a/compensation/templates/compensation/detail/includes/documents.html b/compensation/templates/compensation/detail/includes/documents.html new file mode 100644 index 00000000..109366ff --- /dev/null +++ b/compensation/templates/compensation/detail/includes/documents.html @@ -0,0 +1,59 @@ +{% load i18n l10n fontawesome_5 %} + \ No newline at end of file diff --git a/compensation/templates/compensation/detail/includes/states-after.html b/compensation/templates/compensation/detail/includes/states-after.html new file mode 100644 index 00000000..5c93f549 --- /dev/null +++ b/compensation/templates/compensation/detail/includes/states-after.html @@ -0,0 +1,62 @@ +{% load i18n l10n fontawesome_5 %} + \ No newline at end of file diff --git a/compensation/templates/compensation/detail/includes/states-before.html b/compensation/templates/compensation/detail/includes/states-before.html new file mode 100644 index 00000000..b2910041 --- /dev/null +++ b/compensation/templates/compensation/detail/includes/states-before.html @@ -0,0 +1,62 @@ +{% load i18n l10n fontawesome_5 %} + \ No newline at end of file diff --git a/compensation/templates/compensation/detail/view.html b/compensation/templates/compensation/detail/view.html new file mode 100644 index 00000000..cbdb5a30 --- /dev/null +++ b/compensation/templates/compensation/detail/view.html @@ -0,0 +1,144 @@ +{% extends 'base.html' %} +{% load i18n l10n static fontawesome_5 humanize %} + +{% block head %} + +{% endblock %} + +{% block body %} + +
+
+

{% trans 'Compensation' %} {{comp.identifier}}

+
+
+
+ + + + + + + {% if has_access %} + {% if is_default_member %} + + + + + {% endif %} + {% endif %} +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
{% trans 'Title' %}{{comp.title}}
{% trans 'compensates intervention' %} + + {{comp.intervention.identifier}} + +
{% trans 'Checked' %} + {% if comp.intervention.checked is None %} + + {% fa5_icon 'star' 'far' %} + + {% else %} + + {% fa5_icon 'star' %} + + {% endif %} +
{% trans 'Recorded' %} + {% if comp.intervention.recorded is None %} + + {% fa5_icon 'bookmark' 'far' %} + + {% else %} + + {% fa5_icon 'bookmark' %} + + {% endif %} +
{% trans 'Last modified' %} + {{comp.created.timestamp|default_if_none:""|naturalday}} +
+ {% with comp.created.user as user %} + {% include 'user/includes/contact_modal_button.html' %} + {% endwith %} +
{% trans 'Shared with' %} + {% for user in comp.intervention.users.all %} + {% include 'user/includes/contact_modal_button.html' %} + {% endfor %} +
+
+
+
+ {% if geom_form.area == 0 %} +
{% trans 'No geometry added, yet.' %}
+ {% endif %} + {{geom_form.media}} + {{geom_form.geom}} +
+
+
+ +
+
+ {% include 'compensation/detail/includes/states-before.html' %} +
+
+ {% include 'compensation/detail/includes/states-after.html' %} +
+
+
+
+ {% include 'compensation/detail/includes/actions.html' %} +
+
+ {% include 'compensation/detail/includes/deadlines.html' %} +
+
+
+
+ {% include 'compensation/detail/includes/documents.html' %} +
+
+ + +{% with 'btn-modal' as btn_class %} + {% include 'modal/modal_form_script.html' %} +{% endwith %} + +{% endblock %} \ No newline at end of file diff --git a/compensation/urls.py b/compensation/urls.py index f77e1a41..cbbd8ad2 100644 --- a/compensation/urls.py +++ b/compensation/urls.py @@ -17,6 +17,11 @@ urlpatterns = [ path('', open_view, name='open'), path('/edit', edit_view, name='edit'), path('/remove', remove_view, name='remove'), + path('/state/new', state_new_view, name='new-state'), + path('/deadline/new', deadline_new_view, name="new-deadline"), + + # Documents + path('/document/new/', new_document_view, name='new-doc'), # Payment path('pay//new', new_payment_view, name='pay-new'), @@ -34,4 +39,6 @@ urlpatterns = [ # Eco-account withdraws path('acc//remove/', withdraw_remove_view, name='withdraw-remove'), + # Generic state routes + path('state//remove', state_remove_view, name='state-remove'), ] \ No newline at end of file diff --git a/compensation/views.py b/compensation/views.py index 7f6923a0..6064c621 100644 --- a/compensation/views.py +++ b/compensation/views.py @@ -1,17 +1,19 @@ from django.contrib.auth.decorators import login_required from django.core.exceptions import ObjectDoesNotExist +from django.db.models import Sum from django.http import HttpRequest, Http404 from django.shortcuts import render, get_object_or_404 from django.utils.translation import gettext_lazy as _ -from compensation.forms import NewPaymentForm -from compensation.models import Compensation, EcoAccount, Payment +from compensation.forms import NewPaymentForm, NewStateModalForm, NewDeadlineModalForm +from compensation.models import Compensation, EcoAccount, Payment, CompensationState from compensation.tables import CompensationTable, EcoAccountTable from intervention.models import Intervention from konova.contexts import BaseContext from konova.decorators import * -from konova.forms import RemoveModalForm +from konova.forms import RemoveModalForm, SimpleGeomForm, NewDocumentForm from konova.utils.message_templates import FORM_INVALID +from konova.utils.user_checks import in_group @login_required @@ -59,8 +61,40 @@ def edit_view(request: HttpRequest, id: str): @login_required @any_group_check def open_view(request: HttpRequest, id: str): - # ToDo - pass + """ Renders a detail view for a compensation + + Args: + request (HttpRequest): The incoming request + id (str): The compensation's id + + Returns: + + """ + template = "compensation/detail/view.html" + comp = get_object_or_404(Compensation, id=id) + geom_form = SimpleGeomForm(instance=comp) + _user = request.user + is_data_shared = comp.intervention.is_shared_with(_user) + + # Precalculate logical errors between before- and after-states + # Sum() returns None in case of no states, so we catch that and replace it with 0 for easier handling + sum_before_states = comp.before_states.all().aggregate(Sum("surface"))["surface__sum"] or 0 + sum_after_states = comp.after_states.all().aggregate(Sum("surface"))["surface__sum"] or 0 + diff_states = abs(sum_before_states - sum_after_states) + + context = { + "comp": comp, + "geom_form": geom_form, + "has_access": is_data_shared, + "is_default_member": in_group(_user, _(DEFAULT_GROUP)), + "is_zb_member": in_group(_user, _(ZB_GROUP)), + "is_ets_member": in_group(_user, _(ETS_GROUP)), + "sum_before_states": sum_before_states, + "sum_after_states": sum_after_states, + "diff_states": diff_states, + } + context = BaseContext(request, context).context + return render(request, template, context) @login_required @@ -79,6 +113,7 @@ def remove_view(request: HttpRequest, id: str): return form.process_request( request=request, msg_success=_("Compensation removed"), + redirect_url="", ) @@ -220,3 +255,69 @@ def withdraw_remove_view(request: HttpRequest, id: str, withdraw_id: str): request=request, msg_success=_("Withdraw removed") ) + + +@login_required +def new_document_view(request: HttpRequest, id: str): + """ Renders a form for uploading new documents + + Args: + request (HttpRequest): The incoming request + id (str): The compensation's id to which the new document will be related + Returns: + + """ + comp = get_object_or_404(Compensation, id=id) + form = NewDocumentForm(request.POST or None, request.FILES or None, instance=comp, user=request.user) + return form.process_request( + request, + msg_success=_("Document added") + ) + + +@login_required +def state_new_view(request: HttpRequest, id: str): + """ Renders a form for adding new states for a compensation + + Args: + request (HttpRequest): The incoming request + id (str): The compensation's id to which the new state will be related + + Returns: + + """ + comp = get_object_or_404(Compensation, id=id) + form = NewStateModalForm(request.POST or None, instance=comp, user=request.user) + return form.process_request( + request, + msg_success=_("State added") + ) + + +@login_required +def deadline_new_view(request: HttpRequest, id: str): + """ Renders a form for adding new states for a compensation + + Args: + request (HttpRequest): The incoming request + id (str): The compensation's id to which the new state will be related + + Returns: + + """ + comp = get_object_or_404(Compensation, id=id) + form = NewDeadlineModalForm(request.POST or None, instance=comp, user=request.user) + return form.process_request( + request, + msg_success=_("Deadline added") + ) + + +@login_required +def state_remove_view(request: HttpRequest, id: str): + state = get_object_or_404(CompensationState, id=id) + form = RemoveModalForm(request.POST or None, instance=state, user=request.user) + return form.process_request( + request, + msg_success=_("State removed") + ) diff --git a/intervention/tables.py b/intervention/tables.py index be459377..d51f203d 100644 --- a/intervention/tables.py +++ b/intervention/tables.py @@ -132,12 +132,12 @@ class InterventionTable(BaseTable): """ html = "" checked = value is not None - tooltip = _("Not registered yet") + tooltip = _("Not recorded yet") if checked: value = value.timestamp value = localtime(value) on = value.strftime(DEFAULT_DATE_TIME_FORMAT) - tooltip = _("Registered on {} by {}").format(on, record.recorded.user) + tooltip = _("Recorded on {} by {}").format(on, record.recorded.user) html += self.render_bookmark( tooltip=tooltip, icn_filled=checked, diff --git a/intervention/templates/intervention/detail/includes/payments.html b/intervention/templates/intervention/detail/includes/payments.html index 15272b63..a556d3ae 100644 --- a/intervention/templates/intervention/detail/includes/payments.html +++ b/intervention/templates/intervention/detail/includes/payments.html @@ -42,9 +42,7 @@ {% for pay in intervention.payments.all %} - - {{ pay.amount|floatformat:2 }} € - + {{ pay.amount|floatformat:2 }} € {{ pay.due_on }} {{ pay.comment }} diff --git a/intervention/templates/intervention/detail/view.html b/intervention/templates/intervention/detail/view.html index aaacb9ef..5c0396f8 100644 --- a/intervention/templates/intervention/detail/view.html +++ b/intervention/templates/intervention/detail/view.html @@ -110,7 +110,7 @@ {% trans 'Recorded' %} {% if intervention.recorded is None %} - + {% fa5_icon 'bookmark' 'far' %} {% else %} diff --git a/intervention/views.py b/intervention/views.py index c9c27c8c..9c8e3549 100644 --- a/intervention/views.py +++ b/intervention/views.py @@ -10,7 +10,6 @@ from intervention.tables import InterventionTable from konova.contexts import BaseContext from konova.decorators import * from konova.forms import SimpleGeomForm, NewDocumentForm, RemoveModalForm -from konova.utils.message_templates import FORM_INVALID from konova.utils.user_checks import in_group @@ -89,30 +88,7 @@ def new_document_view(request: HttpRequest, id: str): """ intervention = get_object_or_404(Intervention, id=id) form = NewDocumentForm(request.POST or None, request.FILES or None, instance=intervention, user=request.user) - template = form.template - if request.method == "POST": - if form.is_valid(): - doc = form.save() - messages.success( - request, - _("Document '{}' added").format(doc.title) - ) - - 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) @login_required diff --git a/konova/enums.py b/konova/enums.py index 529c42dd..90faaa02 100644 --- a/konova/enums.py +++ b/konova/enums.py @@ -56,10 +56,4 @@ class UserActionLogEntryEnum(BaseEnum): CHECKED = "Checked" RECORDED = "Recorded" CREATED = "Created" - DELETED = "Deleted" - - -class DeadlineTypeEnum(BaseEnum): - MAINTAIN = "Maintain" - CONTROL = "Control" - OTHER = "Other" \ No newline at end of file + DELETED = "Deleted" \ No newline at end of file diff --git a/konova/forms.py b/konova/forms.py index ea1ba76b..c626c79b 100644 --- a/konova/forms.py +++ b/konova/forms.py @@ -132,6 +132,45 @@ class BaseModalForm(BaseForm, BSModalForm): """ is_modal_form = True render_submit = True + template = "modal/modal_form.html" + + def process_request(self, request: HttpRequest, msg_success: str = _("Object removed"), msg_error: str = FORM_INVALID, redirect_url: str = None): + """ Generic processing of request + + Wraps the request processing logic, so we don't need the same code everywhere a RemoveModalForm is being used + + Args: + request (HttpRequest): The incoming request + msg_success (str): The message in case of successful removing + msg_error (str): The message in case of an error + + Returns: + + """ + redirect_url = redirect_url if redirect_url is not None else request.META.get("HTTP_REFERER", "home") + template = self.template + if request.method == "POST": + if self.is_valid(): + self.save() + messages.success( + request, + msg_success + ) + return redirect(redirect_url) + else: + messages.info( + request, + msg_error + ) + return redirect(redirect_url) + elif request.method == "GET": + context = { + "form": self, + } + context = BaseContext(request, context).context + return render(request, template, context) + else: + raise NotImplementedError class SimpleGeomForm(BaseForm): @@ -200,44 +239,6 @@ class RemoveModalForm(BaseModalForm): # If the class does not provide restorable delete functionality, we must delete the entry finally self.instance.delete() - def process_request(self, request: HttpRequest, msg_success: str = _("Object removed"), msg_error: str = FORM_INVALID, redirect_url: str = None): - """ Generic processing of request - - Wraps the request processing logic, so we don't need the same code everywhere a RemoveModalForm is being used - - Args: - request (HttpRequest): The incoming request - msg_success (str): The message in case of successful removing - msg_error (str): The message in case of an error - - Returns: - - """ - redirect_url = redirect_url if redirect_url is not None else request.META.get("HTTP_REFERER", "home") - template = self.template - if request.method == "POST": - if self.is_valid(): - self.save() - messages.success( - request, - msg_success - ) - return redirect(redirect_url) - else: - messages.info( - request, - msg_error - ) - return redirect(redirect_url) - elif request.method == "GET": - context = { - "form": self, - } - context = BaseContext(request, context).context - return render(request, template, context) - else: - raise NotImplementedError - class NewDocumentForm(BaseModalForm): """ Modal form for new documents @@ -306,4 +307,4 @@ class NewDocumentForm(BaseModalForm): date_of_creation=self.cleaned_data["creation_date"], ) self.instance.documents.add(doc) - return doc + return doc \ No newline at end of file diff --git a/konova/models.py b/konova/models.py index 9db04005..f0ad64dc 100644 --- a/konova/models.py +++ b/konova/models.py @@ -8,10 +8,10 @@ Created on: 17.11.20 import os import uuid +from django.utils.translation import gettext_lazy as _ from django.contrib.gis.db.models import MultiPolygonField from django.db import models -from konova.enums import DeadlineTypeEnum from konova.settings import DEFAULT_SRID from user.models import UserActionLogEntry @@ -23,6 +23,7 @@ class UuidModel(models.Model): id = models.UUIDField( primary_key=True, default=uuid.uuid4, + editable=False, ) class Meta: @@ -54,17 +55,43 @@ class BaseObject(BaseResource): abstract = True +class DeadlineType(models.TextChoices): + """ + Django 3.x way of handling enums for models + """ + FINISHED = "finished", _("Finished") + MAINTAIN = "maintain", _("Maintain") + CONTROL = "control", _("Control") + OTHER = "other", _("Other") + + class Deadline(BaseResource): """ Defines a deadline, which can be used to define dates with a semantic meaning """ - type = models.CharField(max_length=255, null=True, blank=True, choices=DeadlineTypeEnum.as_choices(drop_empty_choice=True)) + + type = models.CharField(max_length=255, null=True, blank=True, choices=DeadlineType.choices) date = models.DateField(null=True, blank=True) comment = models.CharField(max_length=1000, null=True, blank=True) def __str__(self): return self.type + @property + def type_humanized(self): + """ Returns humanized version of enum + + Used for template rendering + + Returns: + + """ + choices = DeadlineType.choices + for choice in choices: + if choice[0] == self.type: + return choice[1] + return None + class Document(BaseResource): """ diff --git a/konova/urls.py b/konova/urls.py index 85802d4c..9d54f9c5 100644 --- a/konova/urls.py +++ b/konova/urls.py @@ -20,7 +20,7 @@ from simple_sso.sso_client.client import Client from konova.autocompletes import OrganisationAutocomplete, NonOfficialOrganisationAutocomplete from konova.settings import SSO_SERVER, SSO_PUBLIC_KEY, SSO_PRIVATE_KEY, DEBUG -from konova.views import logout_view, home_view, get_document_view, remove_document_view +from konova.views import logout_view, home_view, get_document_view, remove_document_view, remove_deadline_view sso_client = Client(SSO_SERVER, SSO_PUBLIC_KEY, SSO_PRIVATE_KEY) urlpatterns = [ @@ -39,6 +39,9 @@ urlpatterns = [ path('document/', get_document_view, name="doc-open"), path('document//remove', remove_document_view, name="doc-remove"), + # Generic deadline routes + path('deadline//remove', remove_deadline_view, name="deadline-remove"), + # Autocomplete paths path("atcmplt/orgs", OrganisationAutocomplete.as_view(), name="orgs-autocomplete"), path("atcmplt/orgs/other", NonOfficialOrganisationAutocomplete.as_view(), name="other-orgs-autocomplete"), diff --git a/konova/views.py b/konova/views.py index bb6ee96e..a784ba18 100644 --- a/konova/views.py +++ b/konova/views.py @@ -18,7 +18,7 @@ from intervention.models import Intervention from konova.contexts import BaseContext from konova.decorators import any_group_check from konova.forms import RemoveModalForm -from konova.models import Document +from konova.models import Document, Deadline from news.models import ServerMessage from konova.settings import SSO_SERVER_BASE @@ -141,3 +141,22 @@ def remove_document_view(request: HttpRequest, id: str): request=request, msg_success=_("Document '{}' deleted").format(title) ) + + +@login_required +def remove_deadline_view(request: HttpRequest, id:str): + """ Renders a modal form for removing a deadline object + + Args: + request (HttpRequest): The incoming request + id (str): The deadline id + + Returns: + + """ + deadline = get_object_or_404(Deadline, id=id) + form = RemoveModalForm(request.POST or None, instance=deadline, user=request.user) + return form.process_request( + request, + msg_success=_("Deadline removed") + ) \ No newline at end of file diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index 6c35190bffc60929edf846fa42deb3516ec40631..b900614c8c5db3097043386173bfe3ed17cfc00d 100644 GIT binary patch delta 5623 zcmZvd3vg7`8OKi|5DXC3B)k;iCJ_^2;tLQPp^%jDQUn^Pf+#N8o6SP9iMuyJqp(s@ zR7AxKwBiFr3TS1u`LX0)zNY4jOetAb?jIj`}^-b5p+D0|NhSFp6_wK zd-KAaZyHkX<#$_aXa~_?w7iEg{j!Ytw6|uB8Go8FKCFhz;Srb*=kg;q^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5Q>ptX)`FSsM=3+lFAi-4PrZ{UkUrF8a%mJL2r@!YsR~aDKG7XudCcZdmU)n=*3d Ee=ZuHs{jB1 diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index 88b904c6..fe2792cd 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -3,17 +3,18 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -#: compensation/forms.py:29 compensation/forms.py:34 compensation/forms.py:47 -#: intervention/filters.py:26 intervention/filters.py:40 -#: intervention/filters.py:47 intervention/filters.py:48 konova/forms.py:85 -#: konova/forms.py:177 konova/forms.py:248 konova/forms.py:253 -#: konova/forms.py:265 konova/forms.py:276 konova/forms.py:289 user/forms.py:38 +#: compensation/forms.py:34 compensation/forms.py:39 compensation/forms.py:52 +#: compensation/forms.py:138 intervention/filters.py:26 +#: intervention/filters.py:40 intervention/filters.py:47 +#: intervention/filters.py:48 konova/forms.py:85 konova/forms.py:216 +#: konova/forms.py:249 konova/forms.py:254 konova/forms.py:266 +#: konova/forms.py:277 konova/forms.py:290 user/forms.py:38 #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-08-03 09:19+0200\n" +"POT-Creation-Date: 2021-08-03 12:54+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -23,40 +24,103 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: compensation/forms.py:28 +#: compensation/forms.py:33 #: intervention/templates/intervention/detail/includes/eco-account-withdraws.html:33 msgid "Amount" msgstr "Menge" -#: compensation/forms.py:30 +#: compensation/forms.py:35 msgid "Amount in Euro" msgstr "Betrag in Euro" -#: compensation/forms.py:33 +#: compensation/forms.py:38 #: intervention/templates/intervention/detail/includes/payments.html:31 msgid "Due on" msgstr "Fällig am" -#: compensation/forms.py:35 +#: compensation/forms.py:40 msgid "Due on which date" msgstr "Zahlung wird an diesem Datum erwartet" -#: compensation/forms.py:48 +#: compensation/forms.py:53 msgid "Transfer note" msgstr "Verwendungszweck" -#: compensation/forms.py:49 +#: compensation/forms.py:54 msgid "Note for money transfer" msgstr "Verwendungszweck für Überweisung" -#: compensation/forms.py:56 +#: compensation/forms.py:61 msgid "Payment" msgstr "Zahlung" -#: compensation/forms.py:57 +#: compensation/forms.py:62 msgid "Add a payment for intervention '{}'" msgstr "Neue Ersatzzahlung zu Eingriff '{}' hinzufügen" +#: compensation/forms.py:82 +msgid "Biotope Type" +msgstr "Biotoptyp" + +#: compensation/forms.py:85 +msgid "Select the biotope type" +msgstr "Biotoptyp wählen" + +#: compensation/forms.py:90 +#: compensation/templates/compensation/detail/includes/states-after.html:31 +#: compensation/templates/compensation/detail/includes/states-before.html:31 +msgid "Surface" +msgstr "Fläche" + +#: compensation/forms.py:93 +msgid "in m²" +msgstr "" + +#: compensation/forms.py:98 +msgid "New state" +msgstr "Neuer Zustand" + +#: compensation/forms.py:99 +msgid "Insert data for the new state" +msgstr "Geben Sie die Daten des neuen Zustandes ein" + +#: compensation/forms.py:116 +msgid "Deadline Type" +msgstr "Fristart" + +#: compensation/forms.py:119 +msgid "Select the deadline type" +msgstr "Fristart wählen" + +#: compensation/forms.py:123 +#: compensation/templates/compensation/detail/includes/deadlines.html:31 +msgid "Date" +msgstr "Datum" + +#: compensation/forms.py:126 +msgid "Select date" +msgstr "Datum wählen" + +#: compensation/forms.py:137 +#: compensation/templates/compensation/detail/includes/deadlines.html:34 +#: compensation/templates/compensation/detail/includes/documents.html:31 +#: intervention/templates/intervention/detail/includes/documents.html:31 +#: konova/forms.py:276 +msgid "Comment" +msgstr "Kommentar" + +#: compensation/forms.py:139 +msgid "Additional comment" +msgstr "Zusätzlicher Kommentar" + +#: compensation/forms.py:150 +msgid "New deadline" +msgstr "Neue Frist" + +#: compensation/forms.py:151 +msgid "Insert data for the new deadline" +msgstr "Geben Sie die Daten der neuen Frist ein" + #: compensation/tables.py:24 compensation/tables.py:164 #: intervention/forms.py:29 intervention/tables.py:23 #: intervention/templates/intervention/detail/includes/compensations.html:30 @@ -64,19 +128,25 @@ msgid "Identifier" msgstr "Kennung" #: compensation/tables.py:29 compensation/tables.py:169 +#: compensation/templates/compensation/detail/includes/documents.html:28 +#: compensation/templates/compensation/detail/view.html:47 #: intervention/forms.py:36 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:64 konova/forms.py:247 +#: intervention/templates/intervention/detail/view.html:64 konova/forms.py:248 msgid "Title" msgstr "Bezeichnung" -#: compensation/tables.py:34 intervention/tables.py:33 +#: compensation/tables.py:34 +#: compensation/templates/compensation/detail/view.html:59 +#: intervention/tables.py:33 #: intervention/templates/intervention/detail/view.html:96 msgid "Checked" msgstr "Geprüft" -#: compensation/tables.py:40 intervention/tables.py:39 +#: compensation/tables.py:40 +#: compensation/templates/compensation/detail/view.html:73 +#: intervention/tables.py:39 #: intervention/templates/intervention/detail/view.html:110 msgid "Recorded" msgstr "Verzeichnet" @@ -100,6 +170,7 @@ msgid "Open {}" msgstr "Öffne {}" #: compensation/tables.py:83 compensation/tables.py:197 +#: compensation/templates/compensation/detail/view.html:12 #: konova/templates/konova/home.html:49 templates/navbar.html:28 msgid "Compensation" msgstr "Kompensation" @@ -112,12 +183,15 @@ msgstr "Noch nicht geprüft" msgid "Checked on {} by {}" msgstr "Am {} von {} geprüft worden" -#: compensation/tables.py:128 intervention/tables.py:135 -msgid "Not registered yet" +#: compensation/tables.py:128 +#: compensation/templates/compensation/detail/view.html:76 +#: intervention/tables.py:135 +#: intervention/templates/intervention/detail/view.html:113 +msgid "Not recorded yet" msgstr "Noch nicht verzeichnet" #: compensation/tables.py:133 intervention/tables.py:140 -msgid "Registered on {} by {}" +msgid "Recorded on {} by {}" msgstr "Am {} von {} verzeichnet worden" #: compensation/tables.py:156 intervention/tables.py:163 @@ -128,7 +202,7 @@ msgstr "Für Sie freigegeben - Datensatz kann bearbeitet werden" msgid "Access not granted" msgstr "Nicht freigegeben - Datensatz nur lesbar" -#: compensation/tables.py:174 konova/forms.py:252 +#: compensation/tables.py:174 konova/forms.py:253 msgid "Created on" msgstr "Erstellt" @@ -148,22 +222,172 @@ msgstr "Bearbeite {}" msgid "Delete {}" msgstr "Lösche {}" -#: compensation/views.py:79 +#: compensation/templates/compensation/detail/includes/deadlines.html:8 +msgid "Deadlines" +msgstr "Termine und Fristen" + +#: compensation/templates/compensation/detail/includes/deadlines.html:14 +msgid "Add new deadline" +msgstr "Neue Frist hinzufügen" + +#: compensation/templates/compensation/detail/includes/deadlines.html:28 +#: intervention/forms.py:41 +msgid "Type" +msgstr "Typ" + +#: compensation/templates/compensation/detail/includes/deadlines.html:37 +#: compensation/templates/compensation/detail/includes/documents.html:34 +#: compensation/templates/compensation/detail/includes/states-after.html:34 +#: compensation/templates/compensation/detail/includes/states-before.html:34 +#: intervention/templates/intervention/detail/includes/compensations.html:36 +#: intervention/templates/intervention/detail/includes/documents.html:34 +#: intervention/templates/intervention/detail/includes/eco-account-withdraws.html:36 +#: intervention/templates/intervention/detail/includes/payments.html:37 +msgid "Action" +msgstr "Aktionen" + +#: compensation/templates/compensation/detail/includes/deadlines.html:51 +msgid "Remove deadline" +msgstr "Frist löschen" + +#: compensation/templates/compensation/detail/includes/deadlines.html:62 +#: compensation/templates/compensation/detail/includes/states-after.html:58 +#: compensation/templates/compensation/detail/includes/states-before.html:58 +msgid "Missing surfaces: " +msgstr "Fehlende Flächen: " + +#: compensation/templates/compensation/detail/includes/documents.html:8 +#: intervention/templates/intervention/detail/includes/documents.html:8 +msgid "Documents" +msgstr "Dokumente" + +#: compensation/templates/compensation/detail/includes/documents.html:14 +#: intervention/templates/intervention/detail/includes/documents.html:14 +#: konova/forms.py:289 +msgid "Add new document" +msgstr "Neues Dokument hinzufügen" + +#: compensation/templates/compensation/detail/includes/documents.html:49 +#: intervention/templates/intervention/detail/includes/documents.html:49 +msgid "Remove document" +msgstr "Dokument löschen" + +#: compensation/templates/compensation/detail/includes/states-after.html:8 +msgid "States after" +msgstr "Zielzustand" + +#: compensation/templates/compensation/detail/includes/states-after.html:14 +msgid "Add new state after" +msgstr "Neuen Zielzustand hinzufügen" + +#: compensation/templates/compensation/detail/includes/states-after.html:28 +#: compensation/templates/compensation/detail/includes/states-before.html:28 +msgid "Biotope type" +msgstr "Biotoptyp" + +#: compensation/templates/compensation/detail/includes/states-after.html:47 +#: compensation/templates/compensation/detail/includes/states-before.html:47 +msgid "Remove state" +msgstr "Zustand entfernen" + +#: compensation/templates/compensation/detail/includes/states-before.html:8 +msgid "States before" +msgstr "Ausgangszustand" + +#: compensation/templates/compensation/detail/includes/states-before.html:14 +msgid "Add new state before" +msgstr "Neuen Ausgangszustand hinzufügen" + +#: compensation/templates/compensation/detail/view.html:17 +#: intervention/templates/intervention/detail/view.html:17 +msgid "Open in LANIS" +msgstr "In LANIS öffnen" + +#: compensation/templates/compensation/detail/view.html:22 +#: intervention/templates/intervention/detail/view.html:22 +msgid "Public report" +msgstr "Öffentlicher Bericht" + +#: compensation/templates/compensation/detail/view.html:29 +#: intervention/templates/intervention/detail/view.html:46 +msgid "Edit" +msgstr "Bearbeiten" + +#: compensation/templates/compensation/detail/view.html:33 +#: intervention/templates/intervention/detail/view.html:50 +#: venv/lib/python3.7/site-packages/django/forms/formsets.py:391 +msgid "Delete" +msgstr "Löschen" + +#: compensation/templates/compensation/detail/view.html:51 +msgid "compensates intervention" +msgstr "kompensiert Eingriff" + +#: compensation/templates/compensation/detail/view.html:66 +#: intervention/templates/intervention/detail/view.html:103 +msgid "Checked on " +msgstr "Geprüft am " + +#: compensation/templates/compensation/detail/view.html:66 +#: compensation/templates/compensation/detail/view.html:80 +#: intervention/templates/intervention/detail/view.html:103 +#: intervention/templates/intervention/detail/view.html:117 +msgid "by" +msgstr "von" + +#: compensation/templates/compensation/detail/view.html:80 +#: intervention/templates/intervention/detail/view.html:117 +msgid "Recorded on " +msgstr "Verzeichnet am" + +#: compensation/templates/compensation/detail/view.html:87 +#: intervention/templates/intervention/detail/view.html:132 +msgid "Last modified" +msgstr "Zuletzt bearbeitet" + +#: compensation/templates/compensation/detail/view.html:97 +#: intervention/forms.py:257 +#: intervention/templates/intervention/detail/view.html:142 +msgid "Shared with" +msgstr "Freigegeben für" + +#: compensation/templates/compensation/detail/view.html:109 +#: intervention/templates/intervention/detail/view.html:154 +msgid "No geometry added, yet." +msgstr "Keine Geometrie vorhanden" + +#: compensation/views.py:115 msgid "Compensation removed" msgstr "Kompensation entfernt" -#: compensation/views.py:156 +#: compensation/views.py:195 msgid "Payment added" msgstr "Zahlung hinzugefügt" -#: compensation/views.py:191 +#: compensation/views.py:230 msgid "Payment removed" msgstr "Zahlung gelöscht" -#: compensation/views.py:217 +#: compensation/views.py:256 msgid "Withdraw removed" msgstr "Abbuchung entfernt" +#: compensation/views.py:274 +msgid "Document added" +msgstr "Dokument hinzugefügt" + +#: compensation/views.py:293 +msgid "State added" +msgstr "Zustand hinzugefügt" + +#: compensation/views.py:312 +msgid "Deadline added" +msgstr "Frist hinzugefügt" + +#: compensation/views.py:322 +msgid "State removed" +msgstr "Zustand gelöscht" + #: intervention/filters.py:25 msgid "Show unshared" msgstr "Nicht freigegebene anzeigen" @@ -184,10 +408,6 @@ msgstr "Nach Gemarkung suchen" msgid "Generated automatically if none was given" msgstr "Wird automatisch erzeugt, falls nicht angegeben" -#: intervention/forms.py:41 -msgid "Type" -msgstr "Typ" - #: intervention/forms.py:44 msgid "Which intervention type is this" msgstr "Welcher Eingriffstyp" @@ -258,11 +478,6 @@ msgstr "Freigabelink" 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:257 -#: intervention/templates/intervention/detail/view.html:142 -msgid "Shared with" -msgstr "Freigegeben für" - #: intervention/forms.py:260 msgid "Remove check to remove access for this user" msgstr "Wählen Sie die Nutzer ab, die keinen Zugriff mehr haben sollen" @@ -290,35 +505,10 @@ msgstr "Eingriff" msgid "Add new compensation" msgstr "Neue Kompensation hinzufügen" -#: intervention/templates/intervention/detail/includes/compensations.html:36 -#: intervention/templates/intervention/detail/includes/documents.html:34 -#: intervention/templates/intervention/detail/includes/eco-account-withdraws.html:36 -#: intervention/templates/intervention/detail/includes/payments.html:37 -msgid "Action" -msgstr "Aktionen" - #: intervention/templates/intervention/detail/includes/compensations.html:51 msgid "Remove compensation" msgstr "Kompensation entfernen" -#: intervention/templates/intervention/detail/includes/documents.html:8 -msgid "Documents" -msgstr "Dokumente" - -#: intervention/templates/intervention/detail/includes/documents.html:14 -#: konova/forms.py:288 -msgid "Add new document" -msgstr "Neues Dokument hinzufügen" - -#: intervention/templates/intervention/detail/includes/documents.html:31 -#: konova/forms.py:275 -msgid "Comment" -msgstr "Kommentar" - -#: intervention/templates/intervention/detail/includes/documents.html:49 -msgid "Remove document" -msgstr "Dokument löschen" - #: intervention/templates/intervention/detail/includes/eco-account-withdraws.html:8 msgid "Eco Account Withdraws" msgstr "Ökokonto Abbuchungen" @@ -352,18 +542,10 @@ msgstr "Betrag" msgid "Transfer comment" msgstr "Verwendungszweck" -#: intervention/templates/intervention/detail/includes/payments.html:53 +#: intervention/templates/intervention/detail/includes/payments.html:51 msgid "Remove payment" msgstr "Zahlung entfernen" -#: intervention/templates/intervention/detail/view.html:17 -msgid "Open in LANIS" -msgstr "In LANIS öffnen" - -#: intervention/templates/intervention/detail/view.html:22 -msgid "Public report" -msgstr "Öffentlicher Bericht" - #: intervention/templates/intervention/detail/view.html:32 msgid "Run check" msgstr "Prüfung vornehmen" @@ -372,15 +554,6 @@ msgstr "Prüfung vornehmen" msgid "Record" msgstr "Verzeichnen" -#: intervention/templates/intervention/detail/view.html:46 -msgid "Edit" -msgstr "Bearbeiten" - -#: intervention/templates/intervention/detail/view.html:50 -#: venv/lib/python3.7/site-packages/django/forms/formsets.py:391 -msgid "Delete" -msgstr "Löschen" - #: intervention/templates/intervention/detail/view.html:68 msgid "Process type" msgstr "Verfahrenstyp" @@ -401,19 +574,6 @@ msgstr "Naturschutzbehörde" msgid "Conversation office file number" msgstr "Aktenzeichen Naturschutzbehörde" -#: intervention/templates/intervention/detail/view.html:103 -msgid "Checked on " -msgstr "Geprüft am " - -#: intervention/templates/intervention/detail/view.html:103 -#: intervention/templates/intervention/detail/view.html:117 -msgid "by" -msgstr "von" - -#: intervention/templates/intervention/detail/view.html:117 -msgid "Recorded on " -msgstr "Verzeichnet am" - #: intervention/templates/intervention/detail/view.html:124 msgid "Registration date" msgstr "Datum Zulassung bzw. Satzungsbeschluss" @@ -422,27 +582,15 @@ msgstr "Datum Zulassung bzw. Satzungsbeschluss" msgid "Binding on" msgstr "Datum Bestandskraft" -#: intervention/templates/intervention/detail/view.html:132 -msgid "Last modified" -msgstr "Zuletzt bearbeitet" - -#: intervention/templates/intervention/detail/view.html:154 -msgid "No geometry added, yet." -msgstr "Keine Geometrie vorhanden" - #: intervention/views.py:65 msgid "Intervention {} added" msgstr "Eingriff {} hinzugefügt" -#: intervention/views.py:68 intervention/views.py:179 +#: intervention/views.py:68 intervention/views.py:157 msgid "Invalid input" msgstr "Eingabe fehlerhaft" -#: intervention/views.py:97 -msgid "Document '{}' added" -msgstr "Dokument '{}' hinzugefügt" - -#: intervention/views.py:153 +#: intervention/views.py:131 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 " @@ -452,29 +600,27 @@ msgstr "" "bedeutet, dass Sie nur lesenden Zugriff hierauf haben und weder bearbeiten, " "noch Prüfungen durchführen oder verzeichnen können." -#: intervention/views.py:176 +#: intervention/views.py:154 msgid "{} edited" msgstr "{} bearbeitet" -#: intervention/views.py:205 -#, fuzzy -#| msgid "Object removed" +#: intervention/views.py:183 msgid "{} removed" -msgstr "Objekt entfernt" +msgstr "{} entfernt" -#: intervention/views.py:232 +#: intervention/views.py:210 msgid "{} has already been shared with you" msgstr "{} wurde bereits für Sie freigegeben" -#: intervention/views.py:237 +#: intervention/views.py:215 msgid "{} has been shared with you" msgstr "{} ist nun für Sie freigegeben" -#: intervention/views.py:244 +#: intervention/views.py:222 msgid "Share link invalid" msgstr "Freigabelink ungültig" -#: intervention/views.py:268 +#: intervention/views.py:246 msgid "Share settings updated" msgstr "Freigabe Einstellungen aktualisiert" @@ -486,7 +632,16 @@ msgstr "Hierfür müssen Sie Mitarbeiter sein!" msgid "You need to be administrator to perform this action!" msgstr "Hierfür müssen Sie Administrator sein!" -#: konova/decorators.py:64 konova/decorators.py:84 konova/decorators.py:104 +#: konova/decorators.py:62 +msgid "" +"+++ Attention: You are not part of any group. You won't be able to create, " +"edit or do anything. Please contact an administrator. +++" +msgstr "" +"+++ Achtung: Ihr Account ist keiner Rechtegruppe zugewiesen. Sie können " +"somit nichts eingeben, bearbeiten oder sonstige Aktionen ausführen. " +"Kontaktieren Sie bitte einen Administrator. +++" + +#: konova/decorators.py:83 konova/decorators.py:103 konova/decorators.py:123 msgid "You need to be part of another user group." msgstr "Hierfür müssen Sie einer anderen Nutzergruppe angehören!" @@ -494,11 +649,11 @@ msgstr "Hierfür müssen Sie einer anderen Nutzergruppe angehören!" msgid "Not editable" msgstr "Nicht editierbar" -#: konova/forms.py:84 konova/forms.py:176 +#: konova/forms.py:84 konova/forms.py:215 msgid "Confirm" msgstr "Bestätige" -#: konova/forms.py:96 konova/forms.py:185 +#: konova/forms.py:96 konova/forms.py:224 msgid "Remove" msgstr "Löschen" @@ -506,28 +661,28 @@ msgstr "Löschen" msgid "You are about to remove {} {}" msgstr "Sie sind dabei {} {} zu löschen" -#: konova/forms.py:186 -msgid "Are you sure?" -msgstr "Sind Sie sicher?" - -#: konova/forms.py:203 +#: konova/forms.py:137 msgid "Object removed" msgstr "Objekt entfernt" -#: konova/forms.py:254 +#: konova/forms.py:225 +msgid "Are you sure?" +msgstr "Sind Sie sicher?" + +#: konova/forms.py:255 msgid "When has this file been created? Important for photos." msgstr "Wann wurde diese Datei erstellt oder das Foto aufgenommen?" -#: konova/forms.py:264 +#: konova/forms.py:265 #: venv/lib/python3.7/site-packages/django/db/models/fields/files.py:231 msgid "File" msgstr "Datei" -#: konova/forms.py:266 +#: konova/forms.py:267 msgid "Must be smaller than 15 Mb" msgstr "Muss kleiner als 15 Mb sein" -#: konova/forms.py:277 +#: konova/forms.py:278 msgid "Additional comment on this file" msgstr "Zusätzlicher Kommentar" @@ -555,6 +710,22 @@ msgstr "Wenn meine freigegebenen Daten gelöscht wurden" msgid "On registered data edited" msgstr "Wenn meine freigegebenen Daten bearbeitet wurden" +#: konova/models.py:62 +msgid "Finished" +msgstr "Umgesetzt bis" + +#: konova/models.py:63 +msgid "Maintain" +msgstr "Unterhaltung bis" + +#: konova/models.py:64 +msgid "Control" +msgstr "Kontrolle am" + +#: konova/models.py:65 +msgid "Other" +msgstr "Sonstige" + #: konova/templates/konova/custom_widgets/text-to-clipboard-input.html:6 msgid "Copy to clipboard" msgstr "In Zwischenablage kopieren" @@ -595,18 +766,14 @@ msgstr "Abbuchen" msgid "There was an error on this form." msgstr "Es gab einen Fehler im Formular." -#: konova/views.py:58 -msgid "" -"+++ Attention: You are not part of any group. You won't be able to create, " -"edit or do anything. Please contact an administrator. +++" -msgstr "" -"+++ Achtung: Ihr Account ist keiner Rechtegruppe zugewiesen. Sie können somit nichts eingeben, " -"bearbeiten oder sonstige Aktionen ausführen. Kontaktieren Sie bitte einen Administrator. +++" - -#: konova/views.py:147 +#: konova/views.py:142 msgid "Document '{}' deleted" msgstr "Dokument '{}' gelöscht" +#: konova/views.py:161 +msgid "Deadline removed" +msgstr "Frist gelöscht" + #: news/templates/news/dashboard-news.html:12 news/templates/news/index.html:19 msgid "Published on" msgstr "Veröffentlicht am" @@ -792,7 +959,7 @@ msgstr "Benachrichtigungseinstellungen ändern" msgid "Notification settings" msgstr "Benachrichtigungen" -#: user/views.py:53 +#: user/views.py:56 msgid "Notifications edited" msgstr "Benachrichtigungen bearbeitet" @@ -2004,9 +2171,6 @@ msgstr "" #~ msgid "Last login on" #~ msgstr "Zuletzt eingeloggt am" -#~ msgid "Delete intervention" -#~ msgstr "Eingriff löschen" - #~ msgid "Delete compensation" #~ msgstr "Kompensation löschen" @@ -2070,9 +2234,6 @@ msgstr "" #~ msgid "Show actions" #~ msgstr "Zeige Maßnahmen" -#~ msgid "New action" -#~ msgstr "Neue Maßnahme" - #~ msgid "You are currently working as " #~ msgstr "Sie arbeiten gerade als " @@ -2178,8 +2339,5 @@ msgstr "" #~ msgid "Registration office document identifier" #~ msgstr "Aktenzeichen Eintragungsstelle" -#~ msgid "Date" -#~ msgstr "Datum" - #~ msgid "You have been logged out" #~ msgstr "Sie wurden ausgeloggt"