* 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
pull/9/head
mipel 3 years ago
parent 03fe293cd8
commit d1f43f8c64

@ -89,6 +89,8 @@ class NewPaymentForm(BaseModalForm):
intervention=self.intervention, intervention=self.intervention,
) )
self.intervention.log.add(edited_action) self.intervention.log.add(edited_action)
self.intervention.modified = edited_action
self.intervention.save()
return pay return pay
@ -122,6 +124,8 @@ class NewStateModalForm(BaseModalForm):
comment=_("Added state") comment=_("Added state")
) )
self.instance.log.add(user_action) self.instance.log.add(user_action)
self.instance.modified = user_action
self.instance.save()
state = CompensationState.objects.create( state = CompensationState.objects.create(
biotope_type=self.cleaned_data["biotope_type"], biotope_type=self.cleaned_data["biotope_type"],
@ -244,6 +248,8 @@ class NewDeadlineModalForm(BaseModalForm):
action=UserAction.EDITED, action=UserAction.EDITED,
comment=_("Added deadline") comment=_("Added deadline")
) )
self.instance.modified = edited_action
self.instance.save()
self.instance.log.add(edited_action) self.instance.log.add(edited_action)
self.instance.deadlines.add(deadline) self.instance.deadlines.add(deadline)
return deadline return deadline
@ -314,6 +320,8 @@ class NewActionModalForm(BaseModalForm):
action=UserAction.EDITED, action=UserAction.EDITED,
comment=_("Added action"), comment=_("Added action"),
) )
self.instance.modified = edited_action
self.instance.save()
self.instance.log.add(edited_action) self.instance.log.add(edited_action)
self.instance.actions.add(comp_action) self.instance.actions.add(comp_action)
return comp_action return comp_action

@ -91,8 +91,8 @@ class CompensationAction(BaseResource):
class AbstractCompensation(BaseObject): class AbstractCompensation(BaseObject):
""" """
Abstract compensation model which holds basic attributes, shared by subclasses like the regular Compensation Abstract compensation model which holds basic attributes, shared by subclasses like the regular Compensation,
or EcoAccount. EMA or EcoAccount.
""" """
responsible = models.OneToOneField( responsible = models.OneToOneField(
@ -112,9 +112,6 @@ class AbstractCompensation(BaseObject):
geometry = models.ForeignKey(Geometry, null=True, blank=True, on_delete=models.SET_NULL) geometry = models.ForeignKey(Geometry, null=True, blank=True, on_delete=models.SET_NULL)
documents = models.ManyToManyField("konova.Document", blank=True) 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: class Meta:
abstract = True abstract = True

@ -7,5 +7,6 @@ Created on: 18.12.20
""" """
COMPENSATION_IDENTIFIER_LENGTH = 10 COMPENSATION_IDENTIFIER_LENGTH = 10
COMPENSATION_IDENTIFIER_TEMPLATE = "KOM-{}" COMPENSATION_IDENTIFIER_TEMPLATE = "KOM-{}"
ECO_ACCOUNT_IDENTIFIER_LENGTH = 10 ECO_ACCOUNT_IDENTIFIER_LENGTH = 10
ECO_ACCOUNT_IDENTIFIER_TEMPLATE = "OEK-{}" ECO_ACCOUNT_IDENTIFIER_TEMPLATE = "OEK-{}"

@ -5,7 +5,6 @@ Contact: michel.peltriaux@sgdnord.rlp.de
Created on: 01.12.20 Created on: 01.12.20
""" """
from django.db.models import Sum
from django.http import HttpRequest from django.http import HttpRequest
from django.template.loader import render_to_string from django.template.loader import render_to_string
from django.urls import reverse 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.filters import CompensationTableFilter, EcoAccountTableFilter
from compensation.models import Compensation, EcoAccount from compensation.models import Compensation, EcoAccount
from intervention.filters import InterventionTableFilter
from konova.sub_settings.django_settings import DEFAULT_DATE_TIME_FORMAT from konova.sub_settings.django_settings import DEFAULT_DATE_TIME_FORMAT
from konova.utils.tables import BaseTable from konova.utils.tables import BaseTable
import django_tables2 as tables import django_tables2 as tables
@ -53,7 +51,7 @@ class CompensationTable(BaseTable):
lm = tables.Column( lm = tables.Column(
verbose_name=_("Last edit"), verbose_name=_("Last edit"),
orderable=True, orderable=True,
accessor="created__timestamp", accessor="modified__timestamp",
) )
class Meta(BaseTable.Meta): class Meta(BaseTable.Meta):
@ -126,21 +124,21 @@ class CompensationTable(BaseTable):
""" """
html = "" html = ""
checked = value is not None recorded = value is not None
tooltip = _("Not recorded yet") tooltip = _("Not recorded yet")
if checked: if recorded:
value = value.timestamp value = value.timestamp
value = localtime(value) value = localtime(value)
on = value.strftime(DEFAULT_DATE_TIME_FORMAT) on = value.strftime(DEFAULT_DATE_TIME_FORMAT)
tooltip = _("Recorded on {} by {}").format(on, record.intervention.recorded.user) tooltip = _("Recorded on {} by {}").format(on, record.intervention.recorded.user)
html += self.render_bookmark( html += self.render_bookmark(
tooltip=tooltip, tooltip=tooltip,
icn_filled=checked, icn_filled=recorded,
) )
return format_html(html) return format_html(html)
def render_e(self, value, record: Compensation): def render_e(self, value, record: Compensation):
""" Renders the registered column for a compensation """ Renders the editable column for a compensation
Args: Args:
value (str): The identifier value value (str): The identifier value
@ -192,7 +190,7 @@ class EcoAccountTable(BaseTable):
lm = tables.Column( lm = tables.Column(
verbose_name=_("Last edit"), verbose_name=_("Last edit"),
orderable=True, orderable=True,
accessor="created__timestamp", accessor="modified__timestamp",
) )
class Meta(BaseTable.Meta): class Meta(BaseTable.Meta):

@ -118,7 +118,7 @@ def log_view(request: HttpRequest, id: str):
context = { context = {
"modal_body_template": body_template, "modal_body_template": body_template,
"log": comp.log.all().order_by("-timestamp"), "log": comp.log.all(),
"modal_title": _("Log"), "modal_title": _("Log"),
} }
context = BaseContext(request, context).context context = BaseContext(request, context).context

@ -180,7 +180,7 @@ def log_view(request: HttpRequest, id: str):
context = { context = {
"modal_body_template": body_template, "modal_body_template": body_template,
"log": comp.log.all().order_by("-timestamp"), "log": comp.log.all(),
"modal_title": _("Log"), "modal_title": _("Log"),
} }
context = BaseContext(request, context).context context = BaseContext(request, context).context

@ -6,18 +6,15 @@ Created on: 09.08.21
""" """
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from django.contrib import messages
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.http import HttpRequest 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.forms import NewPaymentForm
from compensation.models import Payment from compensation.models import Payment
from intervention.models import Intervention from intervention.models import Intervention
from konova.contexts import BaseContext
from konova.decorators import default_group_required from konova.decorators import default_group_required
from konova.forms import RemoveModalForm from konova.forms import RemoveModalForm
from konova.utils.message_templates import FORM_INVALID
@login_required @login_required
@ -34,29 +31,10 @@ def new_payment_view(request: HttpRequest, intervention_id: str):
""" """
intervention = get_object_or_404(Intervention, id=intervention_id) intervention = get_object_or_404(Intervention, id=intervention_id)
form = NewPaymentForm(request.POST or None, instance=intervention, user=request.user) form = NewPaymentForm(request.POST or None, instance=intervention, user=request.user)
template = form.template return form.process_request(
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, request,
FORM_INVALID msg_success=_("Payment added")
) )
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
@login_required @login_required

@ -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)

@ -0,0 +1,5 @@
from django.apps import AppConfig
class EmaConfig(AppConfig):
name = 'ema'

@ -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

@ -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,
)

@ -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-{}"

@ -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)

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

@ -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("<id>", open_view, name="open"),
]

@ -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)

@ -203,6 +203,8 @@ class EditInterventionForm(NewInterventionForm):
action=UserAction.EDITED action=UserAction.EDITED
) )
self.instance.log.add(user_action) self.instance.log.add(user_action)
self.instance.modified = user_action
self.instance.save()
return self.instance return self.instance
@ -381,6 +383,8 @@ class NewRevocationForm(BaseModalForm):
document=document, document=document,
created=created_action, created=created_action,
) )
self.instance.modified = edited_action
self.instance.save()
self.instance.log.add(edited_action) self.instance.log.add(edited_action)
self.instance.legal.revocation = revocation self.instance.legal.revocation = revocation
self.instance.legal.save() self.instance.legal.save()
@ -553,6 +557,8 @@ class NewWithdrawForm(BaseModalForm):
action=UserAction.CREATED action=UserAction.CREATED
) )
self.instance.log.add(user_action_edit) 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 # Create withdraw depending on Intervention or EcoAccount as the initial instance
if self.is_intervention_initially: if self.is_intervention_initially:

@ -21,9 +21,9 @@ class ResponsibilityData(UuidModel):
Holds intervention data about responsible organizations and their file numbers for this case 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) 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) 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'") handler = models.CharField(max_length=500, null=True, blank=True, help_text="Refers to 'Eingriffsverursacher'")
@ -115,9 +115,6 @@ class Intervention(BaseObject):
related_name="+" 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 having access on this object
users = models.ManyToManyField(User, help_text="Users having access (data shared with)") users = models.ManyToManyField(User, help_text="Users having access (data shared with)")
access_token = models.CharField( access_token = models.CharField(

@ -50,7 +50,7 @@ class InterventionTable(BaseTable):
lm = tables.Column( lm = tables.Column(
verbose_name=_("Last edit"), verbose_name=_("Last edit"),
orderable=True, orderable=True,
accessor="created__timestamp", accessor="modified__timestamp",
) )
""" """
# ToDo: Decide to keep actions column or to dismiss them # 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", icn_class="fas fa-edit rlp-r-inv" if has_access else "far fa-edit",
) )
return format_html(html) 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)

@ -94,7 +94,7 @@
<th scope="row">{% trans 'Binding on' %}</th> <th scope="row">{% trans 'Binding on' %}</th>
<td class="align-middle">{{intervention.legal.binding_date|default_if_none:""}}</td> <td class="align-middle">{{intervention.legal.binding_date|default_if_none:""}}</td>
</tr> </tr>
<tr {% if intervention.legal.revocation %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}> <tr {% if intervention.legal.revocation %}class="alert alert-danger" title="{% trans 'Exists' %}" {% endif %}>
<th scope="row">{% trans 'Revocation' %}</th> <th scope="row">{% trans 'Revocation' %}</th>
<td class="align-middle">{{intervention.legal.revocation.date|naturalday|default_if_none:""}}</td> <td class="align-middle">{{intervention.legal.revocation.date|naturalday|default_if_none:""}}</td>
</tr> </tr>

@ -33,9 +33,6 @@ def index_view(request: HttpRequest):
# Filtering by user access is performed in table filter inside of InterventionTableFilter class # Filtering by user access is performed in table filter inside of InterventionTableFilter class
interventions = Intervention.objects.filter( interventions = Intervention.objects.filter(
deleted=None, # not deleted deleted=None, # not deleted
next_version=None, # only newest versions
).order_by(
"-created__timestamp"
) )
table = InterventionTable( table = InterventionTable(
request=request, request=request,
@ -273,22 +270,10 @@ def create_share_view(request: HttpRequest, id: str):
""" """
intervention = get_object_or_404(Intervention, id=id) intervention = get_object_or_404(Intervention, id=id)
form = ShareInterventionForm(request.POST or None, instance=intervention, request=request) form = ShareInterventionForm(request.POST or None, instance=intervention, request=request)
if request.method == "POST": return form.process_request(
if form.is_valid():
form.save()
messages.info(
request, request,
_("Share settings updated") msg_success=_("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
@login_required @login_required
@ -324,28 +309,10 @@ def new_revocation_view(request: HttpRequest, id: str):
""" """
intervention = get_object_or_404(Intervention, id=id) intervention = get_object_or_404(Intervention, id=id)
form = NewRevocationForm(request.POST or None, request.FILES or None, instance=intervention, user=request.user) form = NewRevocationForm(request.POST or None, request.FILES or None, instance=intervention, user=request.user)
if request.method == "POST": return form.process_request(
if form.is_valid():
form.save()
messages.info(
request,
_("Revocation added")
)
else:
messages.error(
request, request,
FORM_INVALID, msg_success=_("Revocation added")
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
@login_required @login_required
@ -365,7 +332,7 @@ def log_view(request: HttpRequest, id: str):
context = { context = {
"modal_body_template": body_template, "modal_body_template": body_template,
"log": intervention.log.all().order_by("-timestamp"), "log": intervention.log.all(),
"modal_title": _("Log"), "modal_title": _("Log"),
} }
context = BaseContext(request, context).context context = BaseContext(request, context).context

@ -45,7 +45,6 @@ class BaseForm(forms.Form):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
self.instance = kwargs.pop("instance", None) self.instance = kwargs.pop("instance", None)
self.user = kwargs.pop("user", None) self.user = kwargs.pop("user", None)
self.request = kwargs.pop("request", None)
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
# Check for required fields # Check for required fields
@ -341,6 +340,8 @@ class NewDocumentForm(BaseModalForm):
comment=_("Added document"), comment=_("Added document"),
) )
self.instance.log.add(edited_action) self.instance.log.add(edited_action)
self.instance.modified = edited_action
self.instance.save()
return doc return doc

@ -16,6 +16,7 @@ from django.db import models, transaction
from compensation.settings import COMPENSATION_IDENTIFIER_TEMPLATE, COMPENSATION_IDENTIFIER_LENGTH, \ from compensation.settings import COMPENSATION_IDENTIFIER_TEMPLATE, COMPENSATION_IDENTIFIER_LENGTH, \
ECO_ACCOUNT_IDENTIFIER_TEMPLATE, ECO_ACCOUNT_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 intervention.settings import INTERVENTION_IDENTIFIER_LENGTH, INTERVENTION_IDENTIFIER_TEMPLATE
from konova.utils.generators import generate_random_string from konova.utils.generators import generate_random_string
from user.models import UserActionLogEntry, UserAction from user.models import UserActionLogEntry, UserAction
@ -39,7 +40,21 @@ class BaseResource(UuidModel):
""" """
A basic resource model, which defines attributes for every derived model 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: class Meta:
abstract = True abstract = True
@ -131,6 +146,8 @@ class BaseObject(BaseResource):
""" """
from compensation.models import Compensation, EcoAccount from compensation.models import Compensation, EcoAccount
from intervention.models import Intervention from intervention.models import Intervention
from ema.models import Ema
definitions = { definitions = {
Intervention: { Intervention: {
"length": INTERVENTION_IDENTIFIER_LENGTH, "length": INTERVENTION_IDENTIFIER_LENGTH,
@ -144,6 +161,10 @@ class BaseObject(BaseResource):
"length": ECO_ACCOUNT_IDENTIFIER_LENGTH, "length": ECO_ACCOUNT_IDENTIFIER_LENGTH,
"template": ECO_ACCOUNT_IDENTIFIER_TEMPLATE, "template": ECO_ACCOUNT_IDENTIFIER_TEMPLATE,
}, },
Ema: {
"length": EMA_ACCOUNT_IDENTIFIER_LENGTH,
"template": EMA_ACCOUNT_IDENTIFIER_TEMPLATE,
},
} }
if self.__class__ not in definitions: if self.__class__ not in definitions:

@ -68,6 +68,7 @@ INSTALLED_APPS = [
'organisation', 'organisation',
'news', 'news',
'user', 'user',
'ema',
] ]
if DEBUG: if DEBUG:
INSTALLED_APPS += [ INSTALLED_APPS += [

@ -31,7 +31,7 @@ urlpatterns = [
path('', home_view, name="home"), path('', home_view, name="home"),
path('intervention/', include("intervention.urls")), path('intervention/', include("intervention.urls")),
path('compensation/', include("compensation.urls")), path('compensation/', include("compensation.urls")),
path('ema/', include("intervention.urls")), #ToDo path('ema/', include("ema.urls")),
path('organisation/', include("organisation.urls")), path('organisation/', include("organisation.urls")),
path('user/', include("user.urls")), path('user/', include("user.urls")),
path('news/', include("news.urls")), path('news/', include("news.urls")),

@ -24,6 +24,7 @@ class BaseTable(tables.tables.Table):
add_new_entries = True add_new_entries = True
add_new_url = None add_new_url = None
title = None title = None
subtitle = ""
class Meta: class Meta:
attrs = { attrs = {

@ -64,7 +64,6 @@ def home_view(request: HttpRequest):
# First fetch all valid objects (undeleted, only newest versions) # First fetch all valid objects (undeleted, only newest versions)
interventions = Intervention.objects.filter( interventions = Intervention.objects.filter(
deleted=None, deleted=None,
next_version=None,
) )
# Then fetch only user related ones # Then fetch only user related ones
user_interventions = interventions.filter( user_interventions = interventions.filter(
@ -74,14 +73,12 @@ def home_view(request: HttpRequest):
# Repeat for other objects # Repeat for other objects
comps = Compensation.objects.filter( comps = Compensation.objects.filter(
deleted=None, deleted=None,
next_version=None,
) )
user_comps = comps.filter( user_comps = comps.filter(
intervention__users__in=[user] intervention__users__in=[user]
) )
eco_accs = EcoAccount.objects.filter( eco_accs = EcoAccount.objects.filter(
deleted=None, deleted=None,
next_version=None,
) )
user_ecco_accs = eco_accs.filter( user_ecco_accs = eco_accs.filter(
users__in=[user] users__in=[user]

Binary file not shown.

@ -3,20 +3,20 @@
# This file is distributed under the same license as the PACKAGE package. # This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# #
#: compensation/filters.py:71 compensation/forms.py:42 compensation/forms.py:47 #: compensation/filters.py:71 compensation/forms.py:43 compensation/forms.py:48
#: compensation/forms.py:60 compensation/forms.py:209 compensation/forms.py:277 #: compensation/forms.py:61 compensation/forms.py:219 compensation/forms.py:289
#: intervention/filters.py:26 intervention/filters.py:40 #: intervention/filters.py:26 intervention/filters.py:40
#: intervention/filters.py:47 intervention/filters.py:48 #: intervention/filters.py:47 intervention/filters.py:48
#: intervention/forms.py:319 intervention/forms.py:331 #: intervention/forms.py:322 intervention/forms.py:334
#: intervention/forms.py:343 konova/forms.py:106 konova/forms.py:242 #: intervention/forms.py:346 konova/forms.py:107 konova/forms.py:241
#: konova/forms.py:275 konova/forms.py:280 konova/forms.py:292 #: konova/forms.py:274 konova/forms.py:279 konova/forms.py:291
#: konova/forms.py:304 konova/forms.py:317 user/forms.py:38 #: konova/forms.py:303 konova/forms.py:316 user/forms.py:38
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-08-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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -30,161 +30,161 @@ msgstr ""
msgid "Show only unrecorded" msgid "Show only unrecorded"
msgstr "Nur unverzeichnete anzeigen" 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 #: compensation/templates/compensation/detail/eco_account/includes/withdraws.html:31
#: intervention/templates/intervention/detail/includes/withdraws.html:31 #: intervention/templates/intervention/detail/includes/withdraws.html:31
msgid "Amount" msgid "Amount"
msgstr "Menge" msgstr "Menge"
#: compensation/forms.py:43 #: compensation/forms.py:44
msgid "Amount in Euro" msgid "Amount in Euro"
msgstr "Betrag in Euro" msgstr "Betrag in Euro"
#: compensation/forms.py:46 #: compensation/forms.py:47
#: intervention/templates/intervention/detail/includes/payments.html:31 #: intervention/templates/intervention/detail/includes/payments.html:31
msgid "Due on" msgid "Due on"
msgstr "Fällig am" msgstr "Fällig am"
#: compensation/forms.py:48 #: compensation/forms.py:49
msgid "Due on which date" msgid "Due on which date"
msgstr "Zahlung wird an diesem Datum erwartet" msgstr "Zahlung wird an diesem Datum erwartet"
#: compensation/forms.py:61 #: compensation/forms.py:62
msgid "Transfer note" msgid "Transfer note"
msgstr "Verwendungszweck" msgstr "Verwendungszweck"
#: compensation/forms.py:62 #: compensation/forms.py:63
msgid "Note for money transfer" msgid "Note for money transfer"
msgstr "Verwendungszweck für Überweisung" msgstr "Verwendungszweck für Überweisung"
#: compensation/forms.py:68 #: compensation/forms.py:69
msgid "Payment" msgid "Payment"
msgstr "Zahlung" msgstr "Zahlung"
#: compensation/forms.py:69 #: compensation/forms.py:70
msgid "Add a payment for intervention '{}'" msgid "Add a payment for intervention '{}'"
msgstr "Neue Ersatzzahlung zu Eingriff '{}' hinzufügen" msgstr "Neue Ersatzzahlung zu Eingriff '{}' hinzufügen"
#: compensation/forms.py:81 #: compensation/forms.py:82
msgid "Added payment" msgid "Added payment"
msgstr "Zahlung hinzufügen" msgstr "Zahlung hinzufügen"
#: compensation/forms.py:96 #: compensation/forms.py:99
msgid "Biotope Type" msgid "Biotope Type"
msgstr "Biotoptyp" msgstr "Biotoptyp"
#: compensation/forms.py:99 #: compensation/forms.py:102
msgid "Select the biotope type" msgid "Select the biotope type"
msgstr "Biotoptyp wählen" 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-after.html:36
#: compensation/templates/compensation/detail/compensation/includes/states-before.html:36 #: compensation/templates/compensation/detail/compensation/includes/states-before.html:36
#: compensation/templates/compensation/detail/eco_account/includes/states-after.html:36 #: compensation/templates/compensation/detail/eco_account/includes/states-after.html:36
#: compensation/templates/compensation/detail/eco_account/includes/states-before.html:36 #: compensation/templates/compensation/detail/eco_account/includes/states-before.html:36
#: intervention/forms.py:459 #: intervention/forms.py:474
msgid "Surface" msgid "Surface"
msgstr "Fläche" msgstr "Fläche"
#: compensation/forms.py:107 intervention/forms.py:461 #: compensation/forms.py:110 intervention/forms.py:476
msgid "in m²" msgid "in m²"
msgstr "" msgstr ""
#: compensation/forms.py:112 #: compensation/forms.py:115
msgid "New state" msgid "New state"
msgstr "Neuer Zustand" msgstr "Neuer Zustand"
#: compensation/forms.py:113 #: compensation/forms.py:116
msgid "Insert data for the new state" msgid "Insert data for the new state"
msgstr "Geben Sie die Daten des neuen Zustandes ein" msgstr "Geben Sie die Daten des neuen Zustandes ein"
#: compensation/forms.py:121 #: compensation/forms.py:124
msgid "Added state" msgid "Added state"
msgstr "Zustand hinzugefügt" msgstr "Zustand hinzugefügt"
#: compensation/forms.py:135 konova/forms.py:156 #: compensation/forms.py:140 konova/forms.py:157
msgid "Object removed" msgid "Object removed"
msgstr "Objekt entfernt" msgstr "Objekt entfernt"
#: compensation/forms.py:181 #: compensation/forms.py:191
msgid "Deadline Type" msgid "Deadline Type"
msgstr "Fristart" msgstr "Fristart"
#: compensation/forms.py:184 #: compensation/forms.py:194
msgid "Select the deadline type" msgid "Select the deadline type"
msgstr "Fristart wählen" 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/compensation/includes/deadlines.html:31
#: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:31 #: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:31
#: intervention/forms.py:318 #: intervention/forms.py:321
msgid "Date" msgid "Date"
msgstr "Datum" msgstr "Datum"
#: compensation/forms.py:196 #: compensation/forms.py:206
msgid "Select date" msgid "Select date"
msgstr "Datum wählen" 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/actions.html:34
#: compensation/templates/compensation/detail/compensation/includes/deadlines.html:34 #: compensation/templates/compensation/detail/compensation/includes/deadlines.html:34
#: compensation/templates/compensation/detail/compensation/includes/documents.html:31 #: compensation/templates/compensation/detail/compensation/includes/documents.html:31
#: compensation/templates/compensation/detail/eco_account/includes/actions.html:34 #: 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/deadlines.html:34
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:31 #: 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/documents.html:31
#: intervention/templates/intervention/detail/includes/revocation.html:35 #: intervention/templates/intervention/detail/includes/revocation.html:35
#: konova/forms.py:303 #: konova/forms.py:302
msgid "Comment" msgid "Comment"
msgstr "Kommentar" msgstr "Kommentar"
#: compensation/forms.py:210 compensation/forms.py:278 #: compensation/forms.py:220 compensation/forms.py:290
#: intervention/forms.py:344 konova/forms.py:305 #: intervention/forms.py:347 konova/forms.py:304
msgid "Additional comment, maximum {} letters" msgid "Additional comment, maximum {} letters"
msgstr "Zusätzlicher Kommentar, maximal {} Zeichen" msgstr "Zusätzlicher Kommentar, maximal {} Zeichen"
#: compensation/forms.py:221 #: compensation/forms.py:231
msgid "New deadline" msgid "New deadline"
msgstr "Neue Frist" msgstr "Neue Frist"
#: compensation/forms.py:222 #: compensation/forms.py:232
msgid "Insert data for the new deadline" msgid "Insert data for the new deadline"
msgstr "Geben Sie die Daten der neuen Frist ein" msgstr "Geben Sie die Daten der neuen Frist ein"
#: compensation/forms.py:239 #: compensation/forms.py:249
msgid "Added deadline" msgid "Added deadline"
msgstr "Frist/Termin hinzugefügt" msgstr "Frist/Termin hinzugefügt"
#: compensation/forms.py:248 #: compensation/forms.py:260
msgid "Action Type" msgid "Action Type"
msgstr "Maßnahmentyp" msgstr "Maßnahmentyp"
#: compensation/forms.py:251 #: compensation/forms.py:263
msgid "Select the action type" msgid "Select the action type"
msgstr "Maßnahmentyp wählen" msgstr "Maßnahmentyp wählen"
#: compensation/forms.py:254 #: compensation/forms.py:266
msgid "Unit" msgid "Unit"
msgstr "Einheit" msgstr "Einheit"
#: compensation/forms.py:257 #: compensation/forms.py:269
msgid "Select the unit" msgid "Select the unit"
msgstr "Einheit wählen" msgstr "Einheit wählen"
#: compensation/forms.py:269 #: compensation/forms.py:281
msgid "Insert the amount" msgid "Insert the amount"
msgstr "Menge eingeben" msgstr "Menge eingeben"
#: compensation/forms.py:289 #: compensation/forms.py:301
msgid "New action" msgid "New action"
msgstr "Neue Maßnahme" msgstr "Neue Maßnahme"
#: compensation/forms.py:290 #: compensation/forms.py:302
msgid "Insert data for the new action" msgid "Insert data for the new action"
msgstr "Geben Sie die Daten der neuen Maßnahme ein" msgstr "Geben Sie die Daten der neuen Maßnahme ein"
#: compensation/forms.py:309 #: compensation/forms.py:321
msgid "Added action" msgid "Added action"
msgstr "Maßnahme hinzugefügt" msgstr "Maßnahme hinzugefügt"
@ -212,114 +212,114 @@ msgstr ""
msgid "Pieces" msgid "Pieces"
msgstr "Stück" msgstr "Stück"
#: compensation/tables.py:26 compensation/tables.py:166 #: compensation/tables.py:24 compensation/tables.py:164 ema/tables.py:28
#: intervention/forms.py:29 intervention/tables.py:23 #: intervention/forms.py:30 intervention/tables.py:23
#: intervention/templates/intervention/detail/includes/compensations.html:30 #: intervention/templates/intervention/detail/includes/compensations.html:30
msgid "Identifier" msgid "Identifier"
msgstr "Kennung" 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/includes/documents.html:28
#: compensation/templates/compensation/detail/compensation/view.html:24 #: compensation/templates/compensation/detail/compensation/view.html:24
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:28 #: compensation/templates/compensation/detail/eco_account/includes/documents.html:28
#: compensation/templates/compensation/detail/eco_account/view.html:31 #: compensation/templates/compensation/detail/eco_account/view.html:31
#: 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/compensations.html:33
#: intervention/templates/intervention/detail/includes/documents.html:28 #: 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" msgid "Title"
msgstr "Bezeichnung" msgstr "Bezeichnung"
#: compensation/tables.py:36 #: compensation/tables.py:34
#: compensation/templates/compensation/detail/compensation/view.html:36 #: compensation/templates/compensation/detail/compensation/view.html:36
#: intervention/tables.py:33 #: intervention/tables.py:33
#: intervention/templates/intervention/detail/view.html:63 user/models.py:48 #: intervention/templates/intervention/detail/view.html:63 user/models.py:48
msgid "Checked" msgid "Checked"
msgstr "Geprüft" msgstr "Geprüft"
#: compensation/tables.py: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/compensation/view.html:50
#: compensation/templates/compensation/detail/eco_account/view.html:43 #: 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 #: intervention/templates/intervention/detail/view.html:77 user/models.py:49
msgid "Recorded" msgid "Recorded"
msgstr "Verzeichnet" 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 #: intervention/tables.py:45
msgid "Editable" msgid "Editable"
msgstr "Freigegeben" 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 #: intervention/tables.py:51
msgid "Last edit" msgid "Last edit"
msgstr "Zuletzt bearbeitet" msgstr "Zuletzt bearbeitet"
#: compensation/tables.py:63 #: compensation/tables.py:61
#: intervention/templates/intervention/detail/includes/compensations.html:8 #: intervention/templates/intervention/detail/includes/compensations.html:8
msgid "Compensations" msgid "Compensations"
msgstr "Kompensationen" msgstr "Kompensationen"
#: compensation/tables.py:85 compensation/tables.py:224 #: compensation/tables.py:83 compensation/tables.py:222 ema/tables.py:82
#: intervention/tables.py:92 intervention/tables.py:175 #: intervention/tables.py:92
msgid "Open {}" msgid "Open {}"
msgstr "Öffne {}" msgstr "Öffne {}"
#: compensation/tables.py:85 #: compensation/tables.py:83
#: compensation/templates/compensation/detail/compensation/view.html:12 #: compensation/templates/compensation/detail/compensation/view.html:12
#: konova/templates/konova/home.html:49 templates/navbar.html:28 #: konova/templates/konova/home.html:49 templates/navbar.html:28
msgid "Compensation" msgid "Compensation"
msgstr "Kompensation" msgstr "Kompensation"
#: compensation/tables.py:106 intervention/tables.py:111 #: compensation/tables.py:104 intervention/tables.py:111
msgid "Not checked yet" msgid "Not checked yet"
msgstr "Noch nicht geprüft" 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 {}" msgid "Checked on {} by {}"
msgstr "Am {} von {} geprüft worden" 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/compensation/view.html:53
#: compensation/templates/compensation/detail/eco_account/view.html:46 #: 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 #: intervention/templates/intervention/detail/view.html:80
msgid "Not recorded yet" msgid "Not recorded yet"
msgstr "Noch nicht verzeichnet" 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 #: intervention/tables.py:140
msgid "Recorded on {} by {}" msgid "Recorded on {} by {}"
msgstr "Am {} von {} verzeichnet worden" 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 #: intervention/tables.py:163
msgid "Full access granted" msgid "Full access granted"
msgstr "Für Sie freigegeben - Datensatz kann bearbeitet werden" 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 #: intervention/tables.py:163
msgid "Access not granted" msgid "Access not granted"
msgstr "Nicht freigegeben - Datensatz nur lesbar" msgstr "Nicht freigegeben - Datensatz nur lesbar"
#: compensation/tables.py:176 #: compensation/tables.py:174
#: compensation/templates/compensation/detail/eco_account/view.html:35 #: compensation/templates/compensation/detail/eco_account/view.html:35
#: konova/templates/konova/custom_widgets/progressbar.html:3 #: konova/templates/konova/custom_widgets/progressbar.html:3
msgid "Available" msgid "Available"
msgstr "Verfügbar" msgstr "Verfügbar"
#: compensation/tables.py:202 #: compensation/tables.py:200
msgid "Eco Accounts" msgid "Eco Accounts"
msgstr "Ökokonten" msgstr "Ökokonten"
#: compensation/tables.py:224 #: compensation/tables.py:222
#: compensation/templates/compensation/detail/eco_account/view.html:19 #: 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 #: konova/templates/konova/home.html:88 templates/navbar.html:34
msgid "Eco-account" msgid "Eco-account"
msgstr "Ökokonto" msgstr "Ökokonto"
#: compensation/tables.py:257 #: compensation/tables.py:255
msgid "Not recorded yet. Can not be used for withdraws, yet." msgid "Not recorded yet. Can not be used for withdraws, yet."
msgstr "" msgstr ""
"Noch nicht verzeichnet. Kann noch nicht für Abbuchungen genutzt werden." "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/compensation/includes/deadlines.html:28
#: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:28 #: compensation/templates/compensation/detail/eco_account/includes/deadlines.html:28
#: intervention/forms.py:41 #: intervention/forms.py:42
msgid "Type" msgid "Type"
msgstr "Typ" msgstr "Typ"
@ -432,7 +432,7 @@ msgstr "Dokumente"
#: compensation/templates/compensation/detail/compensation/includes/documents.html:14 #: compensation/templates/compensation/detail/compensation/includes/documents.html:14
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:14 #: compensation/templates/compensation/detail/eco_account/includes/documents.html:14
#: intervention/templates/intervention/detail/includes/documents.html:14 #: intervention/templates/intervention/detail/includes/documents.html:14
#: konova/forms.py:316 #: konova/forms.py:315
msgid "Add new document" msgid "Add new document"
msgstr "Neues Dokument hinzufügen" msgstr "Neues Dokument hinzufügen"
@ -517,7 +517,7 @@ msgstr "Zuletzt bearbeitet"
#: compensation/templates/compensation/detail/compensation/view.html:72 #: compensation/templates/compensation/detail/compensation/view.html:72
#: compensation/templates/compensation/detail/eco_account/view.html:65 #: compensation/templates/compensation/detail/eco_account/view.html:65
#: intervention/forms.py:252 #: intervention/forms.py:255
#: intervention/templates/intervention/detail/view.html:111 #: intervention/templates/intervention/detail/view.html:111
msgid "Shared with" msgid "Shared with"
msgstr "Freigegeben für" msgstr "Freigegeben für"
@ -568,7 +568,7 @@ msgid "Remove Withdraw"
msgstr "Abbuchung entfernen" msgstr "Abbuchung entfernen"
#: compensation/views/compensation_views.py:122 #: 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" msgid "Log"
msgstr "Log" msgstr "Log"
@ -577,7 +577,7 @@ msgid "Compensation removed"
msgstr "Kompensation entfernt" msgstr "Kompensation entfernt"
#: compensation/views/compensation_views.py:162 #: 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" msgid "Document added"
msgstr "Dokument hinzugefügt" msgstr "Dokument hinzugefügt"
@ -612,26 +612,42 @@ msgstr "Ökokonto entfernt"
msgid "Withdraw removed" msgid "Withdraw removed"
msgstr "Abbuchung entfernt" 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" msgid "{} unrecorded"
msgstr "{} entzeichnet" 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" msgid "{} recorded"
msgstr "{} verzeichnet" 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" msgid "Withdraw added"
msgstr "Abbuchung hinzugefügt" msgstr "Abbuchung hinzugefügt"
#: compensation/views/payment_views.py:43 #: compensation/views/payment_views.py:40
msgid "Payment added" msgid "Payment added"
msgstr "Zahlung hinzugefügt" msgstr "Zahlung hinzugefügt"
#: compensation/views/payment_views.py:78 #: compensation/views/payment_views.py:60
msgid "Payment removed" msgid "Payment removed"
msgstr "Zahlung gelöscht" 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 #: intervention/filters.py:25
msgid "Show unshared" msgid "Show unshared"
msgstr "Nicht freigegebene anzeigen" msgstr "Nicht freigegebene anzeigen"
@ -648,125 +664,125 @@ msgstr "Gemarkung"
msgid "Search for district" msgid "Search for district"
msgstr "Nach Gemarkung suchen" msgstr "Nach Gemarkung suchen"
#: intervention/forms.py:32 #: intervention/forms.py:33
msgid "Generated automatically if none was given" msgid "Generated automatically if none was given"
msgstr "Wird automatisch erzeugt, falls nicht angegeben" msgstr "Wird automatisch erzeugt, falls nicht angegeben"
#: intervention/forms.py:44 #: intervention/forms.py:45
msgid "Which intervention type is this" msgid "Which intervention type is this"
msgstr "Welcher Eingriffstyp" msgstr "Welcher Eingriffstyp"
#: intervention/forms.py:47 #: intervention/forms.py:48
#: intervention/templates/intervention/detail/view.html:39 #: intervention/templates/intervention/detail/view.html:39
msgid "Law" msgid "Law"
msgstr "Gesetz" msgstr "Gesetz"
#: intervention/forms.py:50 #: intervention/forms.py:51
msgid "Based on which law" msgid "Based on which law"
msgstr "Basiert auf welchem Recht" msgstr "Basiert auf welchem Recht"
#: intervention/forms.py:53 #: intervention/forms.py:54
#: intervention/templates/intervention/detail/view.html:59 #: intervention/templates/intervention/detail/view.html:59
msgid "Intervention handler" msgid "Intervention handler"
msgstr "Eingriffsverursacher" msgstr "Eingriffsverursacher"
#: intervention/forms.py:56 #: intervention/forms.py:57
msgid "Who performs the intervention" msgid "Who performs the intervention"
msgstr "Wer führt den Eingriff durch" msgstr "Wer führt den Eingriff durch"
#: intervention/forms.py:59 #: intervention/forms.py:60
msgid "Data provider" msgid "Data provider"
msgstr "Datenbereitsteller" msgstr "Datenbereitsteller"
#: intervention/forms.py:61 #: intervention/forms.py:62
msgid "Who provides the data for the intervention" msgid "Who provides the data for the intervention"
msgstr "Wer stellt die Daten für den Eingriff zur Verfügung" msgstr "Wer stellt die Daten für den Eingriff zur Verfügung"
#: intervention/forms.py:66 #: intervention/forms.py:67
msgid "Organization" msgid "Organization"
msgstr "Organisation" msgstr "Organisation"
#: intervention/forms.py:72 #: intervention/forms.py:73
msgid "Data provider details" msgid "Data provider details"
msgstr "Datenbereitsteller Details" msgstr "Datenbereitsteller Details"
#: intervention/forms.py:75 #: intervention/forms.py:76
msgid "Further details" msgid "Further details"
msgstr "Weitere Details" msgstr "Weitere Details"
#: intervention/forms.py:88 #: intervention/forms.py:89
msgid "Map" msgid "Map"
msgstr "Karte" msgstr "Karte"
#: intervention/forms.py:90 #: intervention/forms.py:91
msgid "Where does the intervention take place" msgid "Where does the intervention take place"
msgstr "Wo findet der Eingriff statt" msgstr "Wo findet der Eingriff statt"
#: intervention/forms.py:98 #: intervention/forms.py:99
msgid "Files" msgid "Files"
msgstr "Dateien" msgstr "Dateien"
#: intervention/forms.py:105 #: intervention/forms.py:106
msgid "New intervention" msgid "New intervention"
msgstr "Neuer Eingriff" msgstr "Neuer Eingriff"
#: intervention/forms.py:147 #: intervention/forms.py:148
msgid "Edit intervention" msgid "Edit intervention"
msgstr "Eingriff bearbeiten" msgstr "Eingriff bearbeiten"
#: intervention/forms.py:241 #: intervention/forms.py:244
msgid "Share link" msgid "Share link"
msgstr "Freigabelink" 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" 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" 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" msgid "Remove check to remove access for this user"
msgstr "Wählen Sie die Nutzer ab, die keinen Zugriff mehr haben sollen" 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 #: intervention/templates/intervention/detail/includes/controls.html:15
msgid "Share" msgid "Share"
msgstr "Freigabe" msgstr "Freigabe"
#: intervention/forms.py:267 #: intervention/forms.py:270
msgid "Share settings for {}" msgid "Share settings for {}"
msgstr "Freigabe Einstellungen für {}" msgstr "Freigabe Einstellungen für {}"
#: intervention/forms.py:320 #: intervention/forms.py:323
msgid "Date of revocation" msgid "Date of revocation"
msgstr "Datum des Widerspruchs" msgstr "Datum des Widerspruchs"
#: intervention/forms.py:330 #: intervention/forms.py:333
#: intervention/templates/intervention/detail/includes/revocation.html:38 #: intervention/templates/intervention/detail/includes/revocation.html:38
msgid "Document" msgid "Document"
msgstr "Dokument" 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" msgid "Must be smaller than 15 Mb"
msgstr "Muss kleiner als 15 Mb sein" msgstr "Muss kleiner als 15 Mb sein"
#: intervention/forms.py:355 #: intervention/forms.py:358
#: intervention/templates/intervention/detail/includes/revocation.html:18 #: intervention/templates/intervention/detail/includes/revocation.html:18
msgid "Add revocation" msgid "Add revocation"
msgstr "Widerspruch hinzufügen" msgstr "Widerspruch hinzufügen"
#: intervention/forms.py:391 #: intervention/forms.py:396
msgid "Checked intervention data" msgid "Checked intervention data"
msgstr "Eingriffsdaten geprüft" msgstr "Eingriffsdaten geprüft"
#: intervention/forms.py:397 #: intervention/forms.py:402
msgid "Checked compensations data and payments" msgid "Checked compensations data and payments"
msgstr "Kompensationen und Zahlungen geprüft" msgstr "Kompensationen und Zahlungen geprüft"
#: intervention/forms.py:405 #: intervention/forms.py:410
#: intervention/templates/intervention/detail/includes/controls.html:19 #: intervention/templates/intervention/detail/includes/controls.html:19
msgid "Run check" msgid "Run check"
msgstr "Prüfung vornehmen" msgstr "Prüfung vornehmen"
#: intervention/forms.py:406 konova/forms.py:362 #: intervention/forms.py:411 konova/forms.py:363
msgid "" msgid ""
"I, {} {}, confirm that all necessary control steps have been performed by " "I, {} {}, confirm that all necessary control steps have been performed by "
"myself." "myself."
@ -774,36 +790,36 @@ msgstr ""
"Ich, {} {}, bestätige, dass die notwendigen Kontrollschritte durchgeführt " "Ich, {} {}, bestätige, dass die notwendigen Kontrollschritte durchgeführt "
"wurden:" "wurden:"
#: intervention/forms.py:445 #: intervention/forms.py:460
msgid "Only recorded accounts can be selected for withdraws" msgid "Only recorded accounts can be selected for withdraws"
msgstr "Nur verzeichnete Ökokonten können für Abbuchungen verwendet werden." msgstr "Nur verzeichnete Ökokonten können für Abbuchungen verwendet werden."
#: intervention/forms.py:464 intervention/forms.py:471 #: intervention/forms.py:479 intervention/forms.py:486
#: intervention/tables.py:92 intervention/tables.py:172 #: intervention/tables.py:92
#: intervention/templates/intervention/detail/view.html:19 #: intervention/templates/intervention/detail/view.html:19
#: konova/templates/konova/home.html:11 templates/navbar.html:22 #: konova/templates/konova/home.html:11 templates/navbar.html:22
msgid "Intervention" msgid "Intervention"
msgstr "Eingriff" msgstr "Eingriff"
#: intervention/forms.py:466 #: intervention/forms.py:481
msgid "Only shared interventions can be selected" msgid "Only shared interventions can be selected"
msgstr "Nur freigegebene Eingriffe können gewählt werden" msgstr "Nur freigegebene Eingriffe können gewählt werden"
#: intervention/forms.py:479 #: intervention/forms.py:494
msgid "New Withdraw" msgid "New Withdraw"
msgstr "Neue Abbuchung" msgstr "Neue Abbuchung"
#: intervention/forms.py:480 #: intervention/forms.py:495
msgid "Enter the information for a new withdraw from a chosen eco-account" msgid "Enter the information for a new withdraw from a chosen eco-account"
msgstr "Geben Sie die Informationen für eine neue Abbuchung ein." msgstr "Geben Sie die Informationen für eine neue Abbuchung ein."
#: intervention/forms.py:516 #: intervention/forms.py:531
msgid "" msgid ""
"Eco-account {} is not recorded yet. You can only withdraw from recorded " "Eco-account {} is not recorded yet. You can only withdraw from recorded "
"accounts." "accounts."
msgstr "" msgstr ""
#: intervention/forms.py:529 #: intervention/forms.py:544
msgid "" msgid ""
"The account {} has not enough surface for a withdraw of {} m². There are " "The account {} has not enough surface for a withdraw of {} m². There are "
"only {} m² left" "only {} m² left"
@ -811,31 +827,31 @@ msgstr ""
"Das Ökokonto {} hat für eine Abbuchung von {} m² nicht ausreichend " "Das Ökokonto {} hat für eine Abbuchung von {} m² nicht ausreichend "
"Restfläche. Es stehen noch {} m² zur Verfügung." "Restfläche. Es stehen noch {} m² zur Verfügung."
#: intervention/models.py:203 #: intervention/models.py:200
msgid "Registration office file number missing" msgid "Registration office file number missing"
msgstr "Aktenzeichen Zulassungsbehörde fehlt" msgstr "Aktenzeichen Zulassungsbehörde fehlt"
#: intervention/models.py:206 #: intervention/models.py:203
msgid "Conversation office file number missing" msgid "Conversation office file number missing"
msgstr "Aktenzeichen Naturschutzbehörde fehlt" msgstr "Aktenzeichen Naturschutzbehörde fehlt"
#: intervention/models.py:209 #: intervention/models.py:206
msgid "Responsible data missing" msgid "Responsible data missing"
msgstr "Daten zu Verantwortlichen fehlen" msgstr "Daten zu Verantwortlichen fehlen"
#: intervention/models.py:223 #: intervention/models.py:220
msgid "Revocation exists" msgid "Revocation exists"
msgstr "Widerspruch liegt vor" msgstr "Widerspruch liegt vor"
#: intervention/models.py:226 #: intervention/models.py:223
msgid "Registration date missing" msgid "Registration date missing"
msgstr "Datum Zulassung bzw. Satzungsbeschluss fehlt" msgstr "Datum Zulassung bzw. Satzungsbeschluss fehlt"
#: intervention/models.py:229 #: intervention/models.py:226
msgid "Binding on missing" msgid "Binding on missing"
msgstr "Datum Bestandskraft fehlt" msgstr "Datum Bestandskraft fehlt"
#: intervention/models.py:231 #: intervention/models.py:228
msgid "Legal data missing" msgid "Legal data missing"
msgstr "Rechtliche Daten fehlen" msgstr "Rechtliche Daten fehlen"
@ -843,14 +859,6 @@ msgstr "Rechtliche Daten fehlen"
msgid "Interventions" msgid "Interventions"
msgstr "Eingriffe" 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 #: intervention/templates/intervention/detail/includes/compensations.html:14
msgid "Add new compensation" msgid "Add new compensation"
msgstr "Neue Kompensation hinzufügen" 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:34
#: intervention/templates/intervention/detail/view.html:38 #: intervention/templates/intervention/detail/view.html:38
#: intervention/templates/intervention/detail/view.html:46 #: 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:58
#: intervention/templates/intervention/detail/view.html:90 #: intervention/templates/intervention/detail/view.html:90
#: intervention/templates/intervention/detail/view.html:94 #: intervention/templates/intervention/detail/view.html:94
#: intervention/templates/intervention/detail/view.html:98
msgid "Missing" msgid "Missing"
msgstr "Fehlt" msgstr "Fehlt"
@ -937,19 +945,23 @@ msgstr "Datum Zulassung bzw. Satzungsbeschluss"
msgid "Binding on" msgid "Binding on"
msgstr "Datum Bestandskraft" 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" msgid "Intervention {} added"
msgstr "Eingriff {} hinzugefügt" msgstr "Eingriff {} hinzugefügt"
#: intervention/views.py:71 intervention/views.py:172 #: intervention/views.py:68 intervention/views.py:169
msgid "Invalid input" msgid "Invalid input"
msgstr "Eingabe fehlerhaft" msgstr "Eingabe fehlerhaft"
#: intervention/views.py:130 #: intervention/views.py:127
msgid "This intervention has a revocation from {}" msgid "This intervention has a revocation from {}"
msgstr "Es existiert ein Widerspruch vom {}" msgstr "Es existiert ein Widerspruch vom {}"
#: intervention/views.py:146 #: intervention/views.py:143
msgid "" msgid ""
"Remember: This data has not been shared with you, yet. This means you can " "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 " "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, " "bedeutet, dass Sie nur lesenden Zugriff hierauf haben und weder bearbeiten, "
"noch Prüfungen durchführen oder verzeichnen können." "noch Prüfungen durchführen oder verzeichnen können."
#: intervention/views.py:169 #: intervention/views.py:166
msgid "{} edited" msgid "{} edited"
msgstr "{} bearbeitet" msgstr "{} bearbeitet"
#: intervention/views.py:198 #: intervention/views.py:195
msgid "{} removed" msgid "{} removed"
msgstr "{} entfernt" msgstr "{} entfernt"
#: intervention/views.py:219 #: intervention/views.py:216
msgid "Revocation removed" msgid "Revocation removed"
msgstr "Widerspruch entfernt" msgstr "Widerspruch entfernt"
#: intervention/views.py:245 #: intervention/views.py:242
msgid "{} has already been shared with you" msgid "{} has already been shared with you"
msgstr "{} wurde bereits für Sie freigegeben" msgstr "{} wurde bereits für Sie freigegeben"
#: intervention/views.py:250 #: intervention/views.py:247
msgid "{} has been shared with you" msgid "{} has been shared with you"
msgstr "{} ist nun für Sie freigegeben" msgstr "{} ist nun für Sie freigegeben"
#: intervention/views.py:257 #: intervention/views.py:254
msgid "Share link invalid" msgid "Share link invalid"
msgstr "Freigabelink ungültig" msgstr "Freigabelink ungültig"
#: intervention/views.py:281 #: intervention/views.py:275
msgid "Share settings updated" msgid "Share settings updated"
msgstr "Freigabe Einstellungen aktualisiert" msgstr "Freigabe Einstellungen aktualisiert"
#: intervention/views.py:309 #: intervention/views.py:294
msgid "Check performed" msgid "Check performed"
msgstr "Prüfung durchgeführt" msgstr "Prüfung durchgeführt"
#: intervention/views.py:332 #: intervention/views.py:314
msgid "Revocation added" msgid "Revocation added"
msgstr "Widerspruch hinzugefügt" msgstr "Widerspruch hinzugefügt"
#: intervention/views.py:414 #: intervention/views.py:381
msgid "There are errors on this intervention:" msgid "There are errors on this intervention:"
msgstr "Es liegen Fehler in diesem Eingriff vor:" msgstr "Es liegen Fehler in diesem Eingriff vor:"
@ -1020,60 +1032,60 @@ msgstr ""
msgid "You need to be part of another user group." msgid "You need to be part of another user group."
msgstr "Hierfür müssen Sie einer anderen Nutzergruppe angehören!" msgstr "Hierfür müssen Sie einer anderen Nutzergruppe angehören!"
#: konova/forms.py:66 #: konova/forms.py:67
msgid "Not editable" msgid "Not editable"
msgstr "Nicht editierbar" msgstr "Nicht editierbar"
#: konova/forms.py:105 konova/forms.py:241 #: konova/forms.py:106 konova/forms.py:240
msgid "Confirm" msgid "Confirm"
msgstr "Bestätige" msgstr "Bestätige"
#: konova/forms.py:117 konova/forms.py:250 #: konova/forms.py:118 konova/forms.py:249
msgid "Remove" msgid "Remove"
msgstr "Löschen" msgstr "Löschen"
#: konova/forms.py:119 #: konova/forms.py:120
msgid "You are about to remove {} {}" msgid "You are about to remove {} {}"
msgstr "Sie sind dabei {} {} zu löschen" msgstr "Sie sind dabei {} {} zu löschen"
#: konova/forms.py:251 #: konova/forms.py:250
msgid "Are you sure?" msgid "Are you sure?"
msgstr "Sind Sie sicher?" msgstr "Sind Sie sicher?"
#: konova/forms.py:279 #: konova/forms.py:278
msgid "Created on" msgid "Created on"
msgstr "Erstellt" msgstr "Erstellt"
#: konova/forms.py:281 #: konova/forms.py:280
msgid "When has this file been created? Important for photos." msgid "When has this file been created? Important for photos."
msgstr "Wann wurde diese Datei erstellt oder das Foto aufgenommen?" 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 #: venv/lib/python3.7/site-packages/django/db/models/fields/files.py:231
msgid "File" msgid "File"
msgstr "Datei" msgstr "Datei"
#: konova/forms.py:341 #: konova/forms.py:340
msgid "Added document" msgid "Added document"
msgstr "Dokument hinzugefügt" msgstr "Dokument hinzugefügt"
#: konova/forms.py:353 #: konova/forms.py:354
msgid "Confirm record" msgid "Confirm record"
msgstr "Verzeichnen bestätigen" msgstr "Verzeichnen bestätigen"
#: konova/forms.py:361 #: konova/forms.py:362
msgid "Record data" msgid "Record data"
msgstr "Daten verzeichnen" msgstr "Daten verzeichnen"
#: konova/forms.py:366 #: konova/forms.py:367
msgid "Confirm unrecord" msgid "Confirm unrecord"
msgstr "Entzeichnen bestätigen" msgstr "Entzeichnen bestätigen"
#: konova/forms.py:367 #: konova/forms.py:368
msgid "Unrecord data" msgid "Unrecord data"
msgstr "Daten entzeichnen" msgstr "Daten entzeichnen"
#: konova/forms.py:368 #: konova/forms.py:369
msgid "I, {} {}, confirm that this data must be unrecorded." msgid "I, {} {}, confirm that this data must be unrecorded."
msgstr "" msgstr ""
"Ich, {} {}, bestätige, dass diese Daten wieder entzeichnet werden müssen." "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" msgid "On registered data edited"
msgstr "Wenn meine freigegebenen Daten bearbeitet wurden" msgstr "Wenn meine freigegebenen Daten bearbeitet wurden"
#: konova/models.py:168 #: konova/models.py:189
msgid "Finished" msgid "Finished"
msgstr "Umgesetzt bis" msgstr "Umgesetzt bis"
#: konova/models.py:169 #: konova/models.py:190
msgid "Maintain" msgid "Maintain"
msgstr "Unterhaltung bis" msgstr "Unterhaltung bis"
#: konova/models.py:170 #: konova/models.py:191
msgid "Control" msgid "Control"
msgstr "Kontrolle am" msgstr "Kontrolle am"
#: konova/models.py:171 #: konova/models.py:192
msgid "Other" msgid "Other"
msgstr "Sonstige" msgstr "Sonstige"
@ -1158,11 +1170,23 @@ msgstr "Es gab einen Fehler im Formular."
msgid "There are errors in this intervention." msgid "There are errors in this intervention."
msgstr "Es liegen Fehler in diesem Eingriff vor:" 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 "<a href=\"{}\">Check it out</a>"
msgstr ""
#: konova/utils/messenger.py:72
msgid "{} has been checked successfully by user {}! {}"
msgstr ""
#: konova/views.py:138
msgid "Document '{}' deleted" msgid "Document '{}' deleted"
msgstr "Dokument '{}' gelöscht" msgstr "Dokument '{}' gelöscht"
#: konova/views.py:161 #: konova/views.py:157
msgid "Deadline removed" msgid "Deadline removed"
msgstr "Frist gelöscht" msgstr "Frist gelöscht"
@ -1214,39 +1238,39 @@ msgstr "Abbrechen"
msgid "Save" msgid "Save"
msgstr "Speichern" msgstr "Speichern"
#: templates/form/generic_table_form_body.html:21 #: templates/form/generic_table_form_body.html:22
msgid "Fields with * are required." msgid "Fields with * are required."
msgstr "* sind Pflichtfelder." msgstr "* sind Pflichtfelder."
#: templates/generic_index.html:19 #: templates/generic_index.html:28
msgid "New entry" msgid "New entry"
msgstr "Neuer Eintrag" msgstr "Neuer Eintrag"
#: templates/generic_index.html:21 #: templates/generic_index.html:30
msgid "New" msgid "New"
msgstr "Neu" msgstr "Neu"
#: templates/generic_index.html:36 #: templates/generic_index.html:45
msgid "Search for keywords" msgid "Search for keywords"
msgstr "Nach Schlagwörtern suchen" msgstr "Nach Schlagwörtern suchen"
#: templates/generic_index.html:36 #: templates/generic_index.html:45
msgid "Search" msgid "Search"
msgstr "Suchen" msgstr "Suchen"
#: templates/generic_index.html:37 #: templates/generic_index.html:46
msgid "Start search" msgid "Start search"
msgstr "Starte Suche" msgstr "Starte Suche"
#: templates/generic_index.html:49 #: templates/generic_index.html:58
msgid "Results per page" msgid "Results per page"
msgstr "Treffer pro Seite" 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" msgid "Filter"
msgstr "" msgstr ""
#: templates/generic_index.html:81 #: templates/generic_index.html:90
msgid "Apply filter" msgid "Apply filter"
msgstr "Filter anwenden" msgstr "Filter anwenden"
@ -1282,10 +1306,6 @@ msgstr "Home"
msgid "More" msgid "More"
msgstr "Mehr" msgstr "Mehr"
#: templates/navbar.html:43
msgid "EMA"
msgstr ""
#: templates/navbar.html:44 #: templates/navbar.html:44
msgid "Import..." msgid "Import..."
msgstr "" msgstr ""
@ -2578,8 +2598,11 @@ msgstr ""
msgid "A fontawesome icon field" msgid "A fontawesome icon field"
msgstr "" msgstr ""
#~ msgid "exists" #~ msgid "Edit {}"
#~ msgstr "vorhanden" #~ msgstr "Bearbeite {}"
#~ msgid "Delete {}"
#~ msgstr "Lösche {}"
#~ msgid "Actions" #~ msgid "Actions"
#~ msgstr "Aktionen" #~ msgstr "Aktionen"
@ -2605,9 +2628,6 @@ msgstr ""
#~ msgid "Last login on" #~ msgid "Last login on"
#~ msgstr "Zuletzt eingeloggt am" #~ msgstr "Zuletzt eingeloggt am"
#~ msgid "Delete compensation"
#~ msgstr "Kompensation löschen"
#~ msgid "Add new eco account" #~ msgid "Add new eco account"
#~ msgstr "Neues Ökokonto hinzufügen" #~ msgstr "Neues Ökokonto hinzufügen"

@ -4,7 +4,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ base_title }}</title> <title>{{ base_frontend_title }}</title>
<link rel="icon" type="image/ico" href="{% static 'images/ksp-favicon.ico' %}"> <link rel="icon" type="image/ico" href="{% static 'images/ksp-favicon.ico' %}">
{% bootstrap_css %} {% bootstrap_css %}
{% bootstrap_javascript jquery='full' %} {% bootstrap_javascript jquery='full' %}

@ -5,12 +5,21 @@
{% block body %} {% block body %}
<div class="col-md"> <div class="col-md">
{% if table.title is not None %} {% if table.title %}
<div class="row"> <div class="row">
<h3> <h3>
{{ table.title }} {{ table.title }}
</h3> </h3>
</div> </div>
{% if table.subtitle %}
<div class="row mb-2">
<div class="col-lg">
<small>
{{ table.subtitle }}
</small>
</div>
</div>
{% endif %}
{% endif %} {% endif %}
<div class="row"> <div class="row">
{% if table.add_new_entries %} {% if table.add_new_entries %}

@ -34,13 +34,13 @@
{% trans 'Eco-account' %} {% trans 'Eco-account' %}
</a> </a>
</li> </li>
<li class=" menu-elem dropdown" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <li class=" menu-elem dropdown">
<a class="nav-btn nav-link"> <div class="btn nav-btn" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
{% fa5_icon 'ellipsis-v' %} {% fa5_icon 'ellipsis-v' %}
{% trans 'More' %} {% trans 'More' %}
</a> </div>
<div class="dropdown-menu"> <div class="dropdown-menu">
<a class="dropdown-item" href="{% url 'home' %}">{% fa5_icon 'euro-sign' %} {% trans 'EMA' %}</a> <a class="dropdown-item" href="{% url 'ema:index' %}" title="{% trans 'Payment funded compensations' %}">{% fa5_icon 'euro-sign' %} {% trans 'EMA' %}</a>
<a class="dropdown-item" href="{% url 'home' %}">{% fa5_icon 'file-import' %} {% trans 'Import...' %}</a> <a class="dropdown-item" href="{% url 'home' %}">{% fa5_icon 'file-import' %} {% trans 'Import...' %}</a>
<a class="dropdown-item" href="{% url 'home' %}">{% fa5_icon 'file-export' %} {% trans 'Export...' %}</a> <a class="dropdown-item" href="{% url 'home' %}">{% fa5_icon 'file-export' %} {% trans 'Export...' %}</a>
<a class="dropdown-item" href="{% url 'home' %}">{% fa5_icon 'file-alt' %} {% trans 'Reports' %}</a> <a class="dropdown-item" href="{% url 'home' %}">{% fa5_icon 'file-alt' %} {% trans 'Reports' %}</a>

@ -74,6 +74,11 @@ class UserActionLogEntry(models.Model):
) )
comment = models.CharField(max_length=255, null=True, blank=True, help_text="Additional comment on this entry") comment = models.CharField(max_length=255, null=True, blank=True, help_text="Additional comment on this entry")
class Meta:
ordering = (
"-timestamp",
)
def __str__(self): def __str__(self):
return "{} | {} | {}".format(self.user.username, self.timestamp, self.action) return "{} | {} | {}".format(self.user.username, self.timestamp, self.action)

Loading…
Cancel
Save