Compare commits

...

23 Commits

Author SHA1 Message Date
b0d068e8a6 Netgis client update
* adds bugfixes and improvements
    - point / line auto buffer key input change buffer
    - pass default buffer values from config
    - update area label while vertex editing
    - auto buffer remove source geoms when done
    - toggle cut tool off when done
    - toggle delete tool off when done
    - allow panning while vertex editing (middle mouse button)
2023-03-13 08:06:24 +01:00
5fb4f61683 Merge pull request '# 308 To share info message' (#310) from 308_To_share_info_message into master
Reviewed-on: SGD-Nord/konova#310
2023-03-13 06:55:46 +01:00
5c23f7a3de Merge pull request 'POST form error fix' (#309) from increase_data_upload_memory_size into master
Reviewed-on: SGD-Nord/konova#309
2023-03-13 06:55:27 +01:00
457244d11b POST form error fix
* increases threshold for max upload memory size from 2.5MB to 5MB
2023-03-13 06:54:32 +01:00
9673886f93 # 308 To share info message
* adds needs-to-be-shared info message on entries which are only shared with the current user
2023-03-07 07:17:08 +01:00
e2b0120f93 Merge pull request '# Bugfix' (#306) from fix_multipolygon_features_mapclient into master
Reviewed-on: SGD-Nord/konova#306
2023-02-23 15:34:34 +01:00
d6af6ebf45 # Bugfix
* fixes bug where multipolygon behaved in mapclient as single polygon, making e.g. deleting of single polygons impossible without removing everything
2023-02-23 14:56:49 +01:00
5551a513e9 HOTFIX
* fixes bug where quality checker for compensations would not check properly for state surface sums
2023-02-23 12:02:50 +01:00
e600b78c74 HOTFIX
* fixes bug where quality checker for compensations would not check properly for state surface sums
2023-02-23 10:44:44 +01:00
a90106b390 Merge pull request '284_285_API_changes' (#296) from 284_285_API_changes into master
Reviewed-on: SGD-Nord/konova#296
2023-02-23 10:20:56 +01:00
bc9c22949d Merge pull request '299_Performance_tweaks' (#302) from 299_Performance_tweaks into master
Reviewed-on: SGD-Nord/konova#302
2023-02-23 10:19:55 +01:00
ede2591cb0 Merge pull request '#300 Extend mail templates' (#301) from 300_Extend_mail_template into master
Reviewed-on: SGD-Nord/konova#301
2023-02-23 10:18:32 +01:00
f3075412eb #300 Extend mail templates
* extends all relevant mail templates such that municipals of an entry will be shown in the mail
2023-02-23 10:17:45 +01:00
8e95e980a3 # Reduces db access
* reduces number of queries performed on detail views of intervention, compensation and eco_account
* renders deductable_rest of eco account beneath progressbar on eco account index view
    * clarifies ordering logic of related column
2023-02-22 10:53:25 +01:00
073c39a970 # Improves home_view()
* improves db fetching performance of landing page by ~75%
2023-02-22 10:02:56 +01:00
acee9daab8 # Improves filter_show_all()
* improves performance for filter_show_all() in ShareableTableFilterMixin and CheckboxCompensationTableFilter by ~40%
2023-02-22 09:44:35 +01:00
35c7836b5c # Improve is_shared_with()
* improves central is_shared_with() method of ShareableObjectMixin to run ~30% faster
2023-02-22 09:19:22 +01:00
89c83f8a55 Merge pull request 'recorded_quality_check' (#297) from recorded_quality_check into master
Reviewed-on: SGD-Nord/konova#297
2023-02-21 08:06:36 +01:00
1438cf4e89 Deployment preparation
* adds unrecording to invalid entries
* reduces quality check runs on entries of interest (compensations)
2023-02-21 08:03:56 +01:00
676b8e1e54 Specific quality check for recorded entries
* adds a new command specifically for recorded entries
2023-02-17 08:03:10 +01:00
78868be772 Merge pull request 'netgis_client_update' (#294) from netgis_client_update into master
Reviewed-on: SGD-Nord/konova#294
2023-02-13 14:41:06 +01:00
2e5345e522 #285 Drop atom_id from API
* refactors code usage from atom_id to id inside of api app
2023-02-01 08:08:52 +01:00
2950487f9c #284 Empty API data
* adds proper message for certain data parsing in case of an error
2023-02-01 07:03:54 +01:00
43 changed files with 804 additions and 338 deletions

View File

@ -61,7 +61,7 @@ class AbstractModelAPISerializerV1(AbstractModelAPISerializer):
if konova_code is None: if konova_code is None:
return None return None
return { return {
"atom_id": konova_code.atom_id, "id": konova_code.id,
"long_name": konova_code.long_name, "long_name": konova_code.long_name,
"short_name": konova_code.short_name, "short_name": konova_code.short_name,
} }
@ -70,7 +70,7 @@ class AbstractModelAPISerializerV1(AbstractModelAPISerializer):
""" Returns a konova code instance """ Returns a konova code instance
Args: Args:
json_str (str): The value for the code (atom id) json_str (str): The value for the code (id)
code_list_identifier (str): From which konova code list this code is supposed to be from code_list_identifier (str): From which konova code list this code is supposed to be from
Returns: Returns:
@ -83,7 +83,7 @@ class AbstractModelAPISerializerV1(AbstractModelAPISerializer):
return None return None
try: try:
code = KonovaCode.objects.get( code = KonovaCode.objects.get(
atom_id=json_str, id=json_str,
code_lists__in=[code_list_identifier] code_lists__in=[code_list_identifier]
) )
except ObjectDoesNotExist as e: except ObjectDoesNotExist as e:
@ -297,9 +297,12 @@ class AbstractCompensationAPISerializerV1Mixin:
""" """
deadlines = [] deadlines = []
for entry in deadline_data: for entry in deadline_data:
deadline_type = entry["type"] try:
date = entry["date"] deadline_type = entry["type"]
comment = entry["comment"] date = entry["date"]
comment = entry["comment"]
except KeyError:
raise ValueError(f"Invalid deadline content. Content was {entry} but should follow the specification")
# Check on validity # Check on validity
if deadline_type not in DeadlineType: if deadline_type not in DeadlineType:
@ -341,11 +344,14 @@ class AbstractCompensationAPISerializerV1Mixin:
""" """
states = [] states = []
for entry in states_data: for entry in states_data:
biotope_type = entry["biotope"] try:
biotope_details = [ biotope_type = entry["biotope"]
self._konova_code_from_json(e, CODELIST_BIOTOPES_EXTRA_CODES_ID) for e in entry["biotope_details"] biotope_details = [
] self._konova_code_from_json(e, CODELIST_BIOTOPES_EXTRA_CODES_ID) for e in entry["biotope_details"]
surface = float(entry["surface"]) ]
surface = float(entry["surface"])
except KeyError:
raise ValueError(f"Invalid biotope content. Content was {entry} but should follow the specification ")
# Check on validity # Check on validity
if surface <= 0: if surface <= 0:
@ -354,7 +360,7 @@ class AbstractCompensationAPISerializerV1Mixin:
# If this exact data is already existing, we do not create it new. Instead put it's id in the list of # If this exact data is already existing, we do not create it new. Instead put it's id in the list of
# entries, we will use to set the new actions # entries, we will use to set the new actions
state = states_manager.filter( state = states_manager.filter(
biotope_type__atom_id=biotope_type, biotope_type__id=biotope_type,
surface=surface, surface=surface,
).exclude( ).exclude(
id__in=states id__in=states
@ -385,16 +391,19 @@ class AbstractCompensationAPISerializerV1Mixin:
""" """
actions = [] actions = []
for entry in actions_data: for entry in actions_data:
action_types = [ try:
self._konova_code_from_json(e, CODELIST_COMPENSATION_ACTION_ID) for e in entry["action_types"] action_types = [
] self._konova_code_from_json(e, CODELIST_COMPENSATION_ACTION_ID) for e in entry["action_types"]
action_details = [ ]
self._konova_code_from_json(e, CODELIST_COMPENSATION_ACTION_DETAIL_ID) for e in entry["action_details"] action_details = [
] self._konova_code_from_json(e, CODELIST_COMPENSATION_ACTION_DETAIL_ID) for e in entry["action_details"]
amount = float(entry["amount"]) ]
# Mapping of old "qm" into "m²" amount = float(entry["amount"])
unit = UnitChoices.m2.value if entry["unit"] == "qm" else entry["unit"] # Mapping of old "qm" into "m²"
comment = entry["comment"] unit = UnitChoices.m2.value if entry["unit"] == "qm" else entry["unit"]
comment = entry["comment"]
except KeyError:
raise ValueError(f"Invalid action content. Content was {entry} but should follow specification")
# Check on validity # Check on validity
if amount <= 0: if amount <= 0:

View File

@ -55,10 +55,12 @@ class CheckboxCompensationTableFilter(CheckboxTableFilter):
""" """
if not value: if not value:
return queryset.filter( user_teams = self.user.shared_teams
result = queryset.filter(
Q(intervention__users__in=[self.user]) | # requesting user has access Q(intervention__users__in=[self.user]) | # requesting user has access
Q(intervention__teams__in=self.user.shared_teams) Q(intervention__teams__in=user_teams)
).distinct() ).distinct()
return result
else: else:
return queryset return queryset

View File

@ -328,6 +328,20 @@ class Compensation(AbstractCompensation, CEFMixin, CoherenceMixin, PikMixin):
# Compensations inherit their shared state from the interventions # Compensations inherit their shared state from the interventions
return self.intervention.is_shared_with(user) return self.intervention.is_shared_with(user)
def is_only_shared_with(self, user: User):
""" Share check
Checks whether a given user is the only one having shared access to this entry
Args:
user (User): The user to be checked
Returns:
"""
# Compensations inherit their shared state from the interventions
return self.intervention.is_only_shared_with(user)
def share_with_user(self, user: User): def share_with_user(self, user: User):
""" Adds user to list of shared access users """ Adds user to list of shared access users

View File

@ -8,6 +8,7 @@ Created on: 18.08.22
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
from django.utils.formats import number_format
from django.utils.html import format_html from django.utils.html import format_html
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
@ -111,6 +112,7 @@ class EcoAccountTable(BaseTable, TableRenderMixin, TableOrderMixin):
except ZeroDivisionError: except ZeroDivisionError:
value_relative = 0 value_relative = 0
html = render_to_string("konova/widgets/progressbar.html", {"value": value_relative}) html = render_to_string("konova/widgets/progressbar.html", {"value": value_relative})
html += f"{number_format(record.deductable_rest, decimal_pos=2)}"
return format_html(html) return format_html(html)
def render_r(self, value, record: EcoAccount): def render_r(self, value, record: EcoAccount):

View File

@ -30,6 +30,7 @@ class CompensationQualityChecker(AbstractQualityChecker):
""" """
after_states = self.obj.get_surface_after_states() after_states = self.obj.get_surface_after_states()
before_states = self.obj.get_surface_before_states() before_states = self.obj.get_surface_before_states()
if after_states != before_states: if after_states != before_states:
self.messages.append( self.messages.append(
_("States unequal") _("States unequal")

View File

@ -26,7 +26,7 @@ from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
from konova.utils.message_templates import COMPENSATION_REMOVED_TEMPLATE, DATA_CHECKED_PREVIOUSLY_TEMPLATE, \ from konova.utils.message_templates import COMPENSATION_REMOVED_TEMPLATE, DATA_CHECKED_PREVIOUSLY_TEMPLATE, \
RECORDED_BLOCKS_EDIT, CHECKED_RECORDED_RESET, FORM_INVALID, PARAMS_INVALID, IDENTIFIER_REPLACED, \ RECORDED_BLOCKS_EDIT, CHECKED_RECORDED_RESET, FORM_INVALID, PARAMS_INVALID, IDENTIFIER_REPLACED, \
COMPENSATION_ADDED_TEMPLATE COMPENSATION_ADDED_TEMPLATE, DO_NOT_FORGET_TO_SHARE
from konova.utils.user_checks import in_group from konova.utils.user_checks import in_group
@ -204,7 +204,11 @@ def detail_view(request: HttpRequest, id: str):
""" """
template = "compensation/detail/compensation/view.html" template = "compensation/detail/compensation/view.html"
comp = get_object_or_404( comp = get_object_or_404(
Compensation, Compensation.objects.select_related(
"modified",
"created",
"geometry"
),
id=id, id=id,
deleted=None, deleted=None,
intervention__deleted=None, intervention__deleted=None,
@ -232,6 +236,13 @@ def detail_view(request: HttpRequest, id: str):
if last_checked: if last_checked:
last_checked_tooltip = DATA_CHECKED_PREVIOUSLY_TEMPLATE.format(last_checked.get_timestamp_str_formatted(), last_checked.user) last_checked_tooltip = DATA_CHECKED_PREVIOUSLY_TEMPLATE.format(last_checked.get_timestamp_str_formatted(), last_checked.user)
requesting_user_is_only_shared_user = comp.is_only_shared_with(_user)
if requesting_user_is_only_shared_user:
messages.info(
request,
DO_NOT_FORGET_TO_SHARE
)
context = { context = {
"obj": comp, "obj": comp,
"last_checked": last_checked, "last_checked": last_checked,

View File

@ -22,7 +22,7 @@ from konova.forms import SimpleGeomForm
from konova.settings import ETS_GROUP, DEFAULT_GROUP, ZB_GROUP from konova.settings import ETS_GROUP, DEFAULT_GROUP, ZB_GROUP
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
from konova.utils.message_templates import CANCEL_ACC_RECORDED_OR_DEDUCTED, RECORDED_BLOCKS_EDIT, FORM_INVALID, \ from konova.utils.message_templates import CANCEL_ACC_RECORDED_OR_DEDUCTED, RECORDED_BLOCKS_EDIT, FORM_INVALID, \
IDENTIFIER_REPLACED IDENTIFIER_REPLACED, DO_NOT_FORGET_TO_SHARE
from konova.utils.user_checks import in_group from konova.utils.user_checks import in_group
@ -213,6 +213,13 @@ def detail_view(request: HttpRequest, id: str):
request = acc.set_status_messages(request) request = acc.set_status_messages(request)
requesting_user_is_only_shared_user = acc.is_only_shared_with(_user)
if requesting_user_is_only_shared_user:
messages.info(
request,
DO_NOT_FORGET_TO_SHARE
)
context = { context = {
"obj": acc, "obj": acc,
"geom_form": geom_form, "geom_form": geom_form,

View File

@ -22,7 +22,8 @@ from konova.forms import SimpleGeomForm
from konova.forms.modals import RemoveModalForm from konova.forms.modals import RemoveModalForm
from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
from konova.utils.message_templates import RECORDED_BLOCKS_EDIT, IDENTIFIER_REPLACED, FORM_INVALID from konova.utils.message_templates import RECORDED_BLOCKS_EDIT, IDENTIFIER_REPLACED, FORM_INVALID, \
DO_NOT_FORGET_TO_SHARE
from konova.utils.user_checks import in_group from konova.utils.user_checks import in_group
@ -148,6 +149,13 @@ def detail_view(request: HttpRequest, id: str):
ema.set_status_messages(request) ema.set_status_messages(request)
requesting_user_is_only_shared_user = ema.is_only_shared_with(_user)
if requesting_user_is_only_shared_user:
messages.info(
request,
DO_NOT_FORGET_TO_SHARE
)
context = { context = {
"obj": ema, "obj": ema,
"geom_form": geom_form, "geom_form": geom_form,

View File

@ -74,7 +74,8 @@ class CheckModalForm(BaseModalForm):
"checked_comps", "checked_comps",
f"{comp.identifier}: {msg}" f"{comp.identifier}: {msg}"
) )
comps_valid = checker.valid if comps_valid and not checker.valid:
comps_valid = checker.valid
deductions_valid = self._are_deductions_valid() deductions_valid = self._are_deductions_valid()
return deductions_valid and comps_valid return deductions_valid and comps_valid

View File

@ -22,7 +22,7 @@ from konova.forms.modals import RemoveModalForm
from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER from konova.sub_settings.context_settings import TAB_TITLE_IDENTIFIER
from konova.utils.message_templates import DATA_CHECKED_PREVIOUSLY_TEMPLATE, RECORDED_BLOCKS_EDIT, \ from konova.utils.message_templates import DATA_CHECKED_PREVIOUSLY_TEMPLATE, RECORDED_BLOCKS_EDIT, \
CHECKED_RECORDED_RESET, FORM_INVALID, IDENTIFIER_REPLACED CHECKED_RECORDED_RESET, FORM_INVALID, IDENTIFIER_REPLACED, DO_NOT_FORGET_TO_SHARE
from konova.utils.user_checks import in_group from konova.utils.user_checks import in_group
@ -142,6 +142,8 @@ def detail_view(request: HttpRequest, id: str):
"geometry", "geometry",
"legal", "legal",
"responsible", "responsible",
).prefetch_related(
"legal__revocations",
), ),
id=id, id=id,
deleted=None deleted=None
@ -158,10 +160,20 @@ def detail_view(request: HttpRequest, id: str):
last_checked = intervention.get_last_checked_action() last_checked = intervention.get_last_checked_action()
last_checked_tooltip = "" last_checked_tooltip = ""
if last_checked: if last_checked:
last_checked_tooltip = DATA_CHECKED_PREVIOUSLY_TEMPLATE.format(last_checked.get_timestamp_str_formatted(), last_checked.user) last_checked_tooltip = DATA_CHECKED_PREVIOUSLY_TEMPLATE.format(
last_checked.get_timestamp_str_formatted(),
last_checked.user
)
has_payment_without_document = intervention.payments.exists() and not intervention.get_documents()[1].exists() has_payment_without_document = intervention.payments.exists() and not intervention.get_documents()[1].exists()
requesting_user_is_only_shared_user = intervention.is_only_shared_with(_user)
if requesting_user_is_only_shared_user:
messages.info(
request,
DO_NOT_FORGET_TO_SHARE
)
context = { context = {
"obj": intervention, "obj": intervention,
"last_checked": last_checked, "last_checked": last_checked,

View File

@ -50,9 +50,11 @@ class ShareableTableFilterMixin(django_filters.FilterSet):
""" """
if not value: if not value:
return queryset.filter( user_teams = self.user.shared_teams
result = queryset.filter(
Q(users__in=[self.user]) | # requesting user has access Q(users__in=[self.user]) | # requesting user has access
Q(teams__in=self.user.shared_teams) Q(teams__in=user_teams)
).distinct() ).distinct()
return result
else: else:
return queryset return queryset

View File

@ -52,7 +52,6 @@ class Command(BaseKonovaCommand):
self.__ema = Ema.objects.filter(**_filter) self.__ema = Ema.objects.filter(**_filter)
def perform_quality_check(self): def perform_quality_check(self):
# Interventions
_runs = [ _runs = [
(self.__interventions, InterventionQualityChecker), (self.__interventions, InterventionQualityChecker),
(self.__compensations, CompensationQualityChecker), (self.__compensations, CompensationQualityChecker),

View File

@ -0,0 +1,66 @@
"""
Author: Michel Peltriaux
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
Contact: ksp-servicestelle@sgdnord.rlp.de
Created on: 16.02.23
"""
from compensation.models import Compensation, EcoAccount
from compensation.utils.quality import CompensationQualityChecker, EcoAccountQualityChecker
from ema.models import Ema
from ema.utils.quality import EmaQualityChecker
from intervention.models import Intervention
from intervention.utils.quality import InterventionQualityChecker
from konova.management.commands.setup import BaseKonovaCommand
from user.models import User
class Command(BaseKonovaCommand):
help = "Runs quality check on recorded entries"
__interventions = []
__compensations = []
__ecoaccount = []
__ema = []
def handle(self, *args, **options):
self.__get_objects()
self.perform_quality_check()
def __get_objects(self):
_filter = {
"recorded_id__isnull": False,
}
self.__interventions = Intervention.objects.filter(**_filter)
self.__compensations = Compensation.objects.filter(
intervention__recorded_id__isnull=False
)
self.__ecoaccount = EcoAccount.objects.filter(**_filter)
self.__ema = Ema.objects.filter(**_filter)
def perform_quality_check(self):
""" Performs quality check and unrecords failing entries
"""
_runs = [
#(self.__interventions, InterventionQualityChecker),
(self.__compensations, CompensationQualityChecker),
#(self.__ecoaccount, EcoAccountQualityChecker),
#(self.__ema, EmaQualityChecker),
]
invalid_entries = set()
admin_user = User.objects.get(
username="kspRoot"
)
for run in _runs:
entries = run[0]
CheckerClass = run[1]
for entry in entries:
checker = CheckerClass(entry)
checker.run_check()
if not checker.valid and CheckerClass is CompensationQualityChecker:
invalid_entries.add(entry.intervention)
for e in invalid_entries:
e.set_unrecorded(user=admin_user)
self._write_warning(e.identifier)

View File

@ -276,6 +276,22 @@ class Geometry(BaseResource):
return parcels return parcels
def get_underlying_municipals(self, parcels=None):
""" Getter for related municipals
If no QuerySet of parcels is provided, the parcels will be fetched
Returns:
municipals (QuerySet): The related municipals as queryset
"""
from konova.models import Municipal
if parcels is None:
parcels = self.get_underlying_parcels()
municipals = parcels.order_by("municipal").distinct("municipal").values("municipal__id")
municipals = Municipal.objects.filter(id__in=municipals).order_by("name")
return municipals
def count_underlying_parcels(self): def count_underlying_parcels(self):
""" Getter for number of underlying parcels """ Getter for number of underlying parcels
@ -302,7 +318,7 @@ class Geometry(BaseResource):
geom = self.geom geom = self.geom
if geom.srid != srid: if geom.srid != srid:
geom.transform(ct=srid) geom.transform(ct=srid)
polygons = [p for p in geom]
geojson = { geojson = {
"type": "FeatureCollection", "type": "FeatureCollection",
"crs": { "crs": {
@ -314,8 +330,9 @@ class Geometry(BaseResource):
"features": [ "features": [
{ {
"type": "Feature", "type": "Feature",
"geometry": json.loads(geom.json), "geometry": json.loads(p.json),
} }
for p in polygons
] ]
} }
return geojson return geojson

View File

@ -120,13 +120,14 @@ class DeletableObjectMixin(models.Model):
if send_mail: if send_mail:
# Send mail # Send mail
shared_users = self.shared_users.values_list("id", flat=True) shared_users = self.shared_users.values_list("id", flat=True)
municipals_names = list(self.geometry.get_underlying_municipals().values_list("name", flat=True))
for user_id in shared_users: for user_id in shared_users:
celery_send_mail_shared_data_deleted.delay(self.identifier, self.title, user_id) celery_send_mail_shared_data_deleted.delay(self.identifier, self.title, user_id, municipals_names)
# Send mail # Send mail
shared_teams = self.shared_teams.values_list("id", flat=True) shared_teams = self.shared_teams.values_list("id", flat=True)
for team_id in shared_teams: for team_id in shared_teams:
celery_send_mail_shared_data_deleted_team.delay(self.identifier, self.title, team_id) celery_send_mail_shared_data_deleted_team.delay(self.identifier, self.title, team_id, municipals_names)
self.save() self.save()
@ -277,12 +278,13 @@ class RecordableObjectMixin(models.Model):
shared_users = self.shared_users.values_list("id", flat=True) shared_users = self.shared_users.values_list("id", flat=True)
shared_teams = self.shared_teams.values_list("id", flat=True) shared_teams = self.shared_teams.values_list("id", flat=True)
municipals_names = list(self.geometry.get_underlying_municipals().values_list("name", flat=True))
for user_id in shared_users: for user_id in shared_users:
celery_send_mail_shared_data_unrecorded.delay(self.identifier, self.title, user_id) celery_send_mail_shared_data_unrecorded.delay(self.identifier, self.title, user_id, municipals_names)
for team_id in shared_teams: for team_id in shared_teams:
celery_send_mail_shared_data_unrecorded_team.delay(self.identifier, self.title, team_id) celery_send_mail_shared_data_unrecorded_team.delay(self.identifier, self.title, team_id, municipals_names)
return action return action
@ -307,12 +309,13 @@ class RecordableObjectMixin(models.Model):
shared_users = self.shared_users.values_list("id", flat=True) shared_users = self.shared_users.values_list("id", flat=True)
shared_teams = self.shared_teams.values_list("id", flat=True) shared_teams = self.shared_teams.values_list("id", flat=True)
municipals_names = list(self.geometry.get_underlying_municipals().values_list("name", flat=True))
for user_id in shared_users: for user_id in shared_users:
celery_send_mail_shared_data_recorded.delay(self.identifier, self.title, user_id) celery_send_mail_shared_data_recorded.delay(self.identifier, self.title, user_id, municipals_names)
for team_id in shared_teams: for team_id in shared_teams:
celery_send_mail_shared_data_recorded_team.delay(self.identifier, self.title, team_id) celery_send_mail_shared_data_recorded_team.delay(self.identifier, self.title, team_id, municipals_names)
return action return action
@ -404,15 +407,17 @@ class CheckableObjectMixin(models.Model):
self.checked = action self.checked = action
self.save() self.save()
municipals_names = list(self.geometry.get_underlying_municipals().values_list("name", flat=True))
# Send mail # Send mail
shared_users = self.shared_users.values_list("id", flat=True) shared_users = self.shared_users.values_list("id", flat=True)
for user_id in shared_users: for user_id in shared_users:
celery_send_mail_shared_data_checked.delay(self.identifier, self.title, user_id) celery_send_mail_shared_data_checked.delay(self.identifier, self.title, user_id, municipals_names)
# Send mail # Send mail
shared_teams = self.shared_teams.values_list("id", flat=True) shared_teams = self.shared_teams.values_list("id", flat=True)
for team_id in shared_teams: for team_id in shared_teams:
celery_send_mail_shared_data_checked_team.delay(self.identifier, self.title, team_id) celery_send_mail_shared_data_checked_team.delay(self.identifier, self.title, team_id, municipals_names)
self.log.add(action) self.log.add(action)
return action return action
@ -501,13 +506,34 @@ class ShareableObjectMixin(models.Model):
Returns: Returns:
""" """
directly_shared = self.shared_users.filter(id=user.id).exists() obj_shared_teams = self.shared_teams
team_shared = self.shared_teams.filter( obj_shared_users = self.shared_users
users__in=[user] user_shared_teams = user.shared_teams
).exists()
directly_shared = obj_shared_users.filter(id=user.id).exists()
team_shared = (obj_shared_teams & user_shared_teams).exists()
is_shared = directly_shared or team_shared is_shared = directly_shared or team_shared
return is_shared return is_shared
def is_only_shared_with(self, user):
""" Sharing check
Checks whether a given user is the only shared user for this object.
There should be no shared teams as well.
Args:
user ():
Returns:
"""
has_shared_teams = self.shared_teams.exists()
shared_users = self.shared_users
is_only_shared_user = user in shared_users and shared_users.count() == 1
return not has_shared_teams and is_only_shared_user
def share_with_team(self, team): def share_with_team(self, team):
""" Adds team to list of shared access teans """ Adds team to list of shared access teans
@ -574,10 +600,11 @@ class ShareableObjectMixin(models.Model):
id__in=shared_teams id__in=shared_teams
).values_list("id", flat=True) ).values_list("id", flat=True)
municipals_names = list(self.geometry.get_underlying_municipals().values_list("name", flat=True))
for team_id in new_teams: for team_id in new_teams:
celery_send_mail_shared_access_given_team.delay(self.identifier, self.title, team_id) celery_send_mail_shared_access_given_team.delay(self.identifier, self.title, team_id, municipals_names)
for team_id in removed_teams: for team_id in removed_teams:
celery_send_mail_shared_access_removed_team.delay(self.identifier, self.title, team_id) celery_send_mail_shared_access_removed_team.delay(self.identifier, self.title, team_id, municipals_names)
self.share_with_team_list(accessing_teams) self.share_with_team_list(accessing_teams)
@ -602,11 +629,12 @@ class ShareableObjectMixin(models.Model):
id__in=shared_users id__in=shared_users
).values_list("id", flat=True) ).values_list("id", flat=True)
municipals_names = list(self.geometry.get_underlying_municipals().values_list("name", flat=True))
# Send mails # Send mails
for user_id in removed_users: for user_id in removed_users:
celery_send_mail_shared_access_removed.delay(self.identifier, self.title, user_id) celery_send_mail_shared_access_removed.delay(self.identifier, self.title, user_id, municipals_names)
for user_id in new_users: for user_id in new_users:
celery_send_mail_shared_access_given.delay(self.identifier, self.title, user_id) celery_send_mail_shared_access_given.delay(self.identifier, self.title, user_id, municipals_names)
# Set new shared users # Set new shared users
self.share_with_user_list(accessing_users) self.share_with_user_list(accessing_users)
@ -669,8 +697,9 @@ class ShareableObjectMixin(models.Model):
default_users.append(user) default_users.append(user)
self.share_with_user_list(cleaned_users) self.share_with_user_list(cleaned_users)
municipals_names = list(self.geometry.get_underlying_municipals().values_list("name", flat=True))
for user in default_users: for user in default_users:
celery_send_mail_shared_access_removed.delay(self.identifier, self.title, user.id) celery_send_mail_shared_access_removed.delay(self.identifier, self.title, user.id, municipals_names)
class GeoReferencedMixin(models.Model): class GeoReferencedMixin(models.Model):
@ -767,5 +796,6 @@ class ResubmitableObjectMixin(models.Model):
""" """
resubmissions = self.resubmissions.all() resubmissions = self.resubmissions.all()
municipal_names = list(self.geometry.get_underlying_municipals().values_list("name", flat=True))
for resubmission in resubmissions: for resubmission in resubmissions:
resubmission.send_resubmission_mail(self.identifier) resubmission.send_resubmission_mail(self.identifier, municipal_names)

View File

@ -31,7 +31,7 @@ class Resubmission(BaseResource):
help_text="Optional comment for the user itself" help_text="Optional comment for the user itself"
) )
def send_resubmission_mail(self, obj_identifier): def send_resubmission_mail(self, obj_identifier, municipal_names):
""" Sends a resubmission mail """ Sends a resubmission mail
""" """
@ -41,6 +41,6 @@ class Resubmission(BaseResource):
return return
mailer = Mailer() mailer = Mailer()
mailer.send_mail_resubmission(obj_identifier, self) mailer.send_mail_resubmission(obj_identifier, self, municipal_names)
self.resubmission_sent = True self.resubmission_sent = True
self.save() self.save()

View File

@ -20,6 +20,8 @@ from konova.sub_settings.table_settings import *
from konova.sub_settings.lanis_settings import * from konova.sub_settings.lanis_settings import *
from konova.sub_settings.wfs_parcel_settings import * from konova.sub_settings.wfs_parcel_settings import *
# Max upload size for POST forms
DATA_UPLOAD_MAX_MEMORY_SIZE = 5242880
# ALLOWED FILE UPLOAD DEFINITIONS # ALLOWED FILE UPLOAD DEFINITIONS
# Default: Upload into upper folder of code # Default: Upload into upper folder of code

View File

@ -25,87 +25,87 @@ def celery_update_parcels(geometry_id: str, recheck: bool = True):
@shared_task @shared_task
def celery_send_mail_shared_access_removed(obj_identifier, obj_title=None, user_id=None): def celery_send_mail_shared_access_removed(obj_identifier, obj_title=None, user_id=None, municipals_names=[]):
from user.models import User from user.models import User
user = User.objects.get(id=user_id) user = User.objects.get(id=user_id)
user.send_mail_shared_access_removed(obj_identifier, obj_title) user.send_mail_shared_access_removed(obj_identifier, obj_title, municipals_names)
@shared_task @shared_task
def celery_send_mail_shared_access_given(obj_identifier, obj_title=None, user_id=None): def celery_send_mail_shared_access_given(obj_identifier, obj_title=None, user_id=None, municipals_names=[]):
from user.models import User from user.models import User
user = User.objects.get(id=user_id) user = User.objects.get(id=user_id)
user.send_mail_shared_access_given(obj_identifier, obj_title) user.send_mail_shared_access_given(obj_identifier, obj_title, municipals_names)
@shared_task @shared_task
def celery_send_mail_shared_access_removed_team(obj_identifier, obj_title=None, team_id=None): def celery_send_mail_shared_access_removed_team(obj_identifier, obj_title=None, team_id=None, municipals_names=[]):
from user.models import Team from user.models import Team
team = Team.objects.get(id=team_id) team = Team.objects.get(id=team_id)
team.send_mail_shared_access_removed(obj_identifier, obj_title) team.send_mail_shared_access_removed(obj_identifier, obj_title, municipals_names)
@shared_task @shared_task
def celery_send_mail_shared_access_given_team(obj_identifier, obj_title=None, team_id=None): def celery_send_mail_shared_access_given_team(obj_identifier, obj_title=None, team_id=None, municipals_names=[]):
from user.models import Team from user.models import Team
team = Team.objects.get(id=team_id) team = Team.objects.get(id=team_id)
team.send_mail_shared_access_given_team(obj_identifier, obj_title) team.send_mail_shared_access_given_team(obj_identifier, obj_title, municipals_names)
@shared_task @shared_task
def celery_send_mail_shared_data_recorded(obj_identifier, obj_title=None, user_id=None): def celery_send_mail_shared_data_recorded(obj_identifier, obj_title=None, user_id=None, municipals_names=[]):
from user.models import User from user.models import User
user = User.objects.get(id=user_id) user = User.objects.get(id=user_id)
user.send_mail_shared_data_recorded(obj_identifier, obj_title) user.send_mail_shared_data_recorded(obj_identifier, obj_title, municipals_names)
@shared_task @shared_task
def celery_send_mail_shared_data_unrecorded(obj_identifier, obj_title=None, user_id=None): def celery_send_mail_shared_data_unrecorded(obj_identifier, obj_title=None, user_id=None, municipals_names=[]):
from user.models import User from user.models import User
user = User.objects.get(id=user_id) user = User.objects.get(id=user_id)
user.send_mail_shared_data_unrecorded(obj_identifier, obj_title) user.send_mail_shared_data_unrecorded(obj_identifier, obj_title, municipals_names)
@shared_task @shared_task
def celery_send_mail_shared_data_recorded_team(obj_identifier, obj_title=None, team_id=None): def celery_send_mail_shared_data_recorded_team(obj_identifier, obj_title=None, team_id=None, municipals_names=[]):
from user.models import Team from user.models import Team
team = Team.objects.get(id=team_id) team = Team.objects.get(id=team_id)
team.send_mail_shared_data_recorded(obj_identifier, obj_title) team.send_mail_shared_data_recorded(obj_identifier, obj_title, municipals_names)
@shared_task @shared_task
def celery_send_mail_shared_data_unrecorded_team(obj_identifier, obj_title=None, team_id=None): def celery_send_mail_shared_data_unrecorded_team(obj_identifier, obj_title=None, team_id=None, municipals_names=[]):
from user.models import Team from user.models import Team
team = Team.objects.get(id=team_id) team = Team.objects.get(id=team_id)
team.send_mail_shared_data_unrecorded(obj_identifier, obj_title) team.send_mail_shared_data_unrecorded(obj_identifier, obj_title, municipals_names)
@shared_task @shared_task
def celery_send_mail_shared_data_deleted(obj_identifier, obj_title=None, user_id=None): def celery_send_mail_shared_data_deleted(obj_identifier, obj_title=None, user_id=None, municipals_names=[]):
from user.models import User from user.models import User
user = User.objects.get(id=user_id) user = User.objects.get(id=user_id)
user.send_mail_shared_data_deleted(obj_identifier, obj_title) user.send_mail_shared_data_deleted(obj_identifier, obj_title, municipals_names)
@shared_task @shared_task
def celery_send_mail_shared_data_checked(obj_identifier, obj_title=None, user_id=None): def celery_send_mail_shared_data_checked(obj_identifier, obj_title=None, user_id=None, municipals_names=[]):
from user.models import User from user.models import User
user = User.objects.get(id=user_id) user = User.objects.get(id=user_id)
user.send_mail_shared_data_checked(obj_identifier, obj_title) user.send_mail_shared_data_checked(obj_identifier, obj_title, municipals_names)
@shared_task @shared_task
def celery_send_mail_shared_data_deleted_team(obj_identifier, obj_title=None, team_id=None): def celery_send_mail_shared_data_deleted_team(obj_identifier, obj_title=None, team_id=None, municipals_names=[]):
from user.models import Team from user.models import Team
team = Team.objects.get(id=team_id) team = Team.objects.get(id=team_id)
team.send_mail_shared_data_deleted(obj_identifier, obj_title) team.send_mail_shared_data_deleted(obj_identifier, obj_title, municipals_names)
@shared_task @shared_task
def celery_send_mail_shared_data_checked_team(obj_identifier, obj_title=None, team_id=None): def celery_send_mail_shared_data_checked_team(obj_identifier, obj_title=None, team_id=None, municipals_names=[]):
from user.models import Team from user.models import Team
team = Team.objects.get(id=team_id) team = Team.objects.get(id=team_id)
team.send_mail_shared_data_checked(obj_identifier, obj_title) team.send_mail_shared_data_checked(obj_identifier, obj_title, municipals_names)
@shared_task @shared_task

View File

@ -9,7 +9,7 @@ from django.contrib.gis.db.models.functions import Translate
from konova.models import Geometry, GeometryConflict from konova.models import Geometry, GeometryConflict
from konova.tests.test_views import BaseTestCase from konova.tests.test_views import BaseTestCase
from konova.utils.wfs.spatial import ParcelWFSFetcher from konova.utils.schneider.fetcher import ParcelFetcher
class GeometryTestCase(BaseTestCase): class GeometryTestCase(BaseTestCase):
@ -63,18 +63,14 @@ class GeometryTestCase(BaseTestCase):
num_conflict = GeometryConflict.objects.all().count() num_conflict = GeometryConflict.objects.all().count()
self.assertEqual(0, num_conflict) self.assertEqual(0, num_conflict)
def test_wfs_fetch(self): def test_fetch(self):
""" Tests the fetching functionality of ParcelWFSFetcher """ Tests the fetching functionality of ParcelFetcher
+++ Test relies on the availability of the RLP Flurstück WFS +++ +++ Test relies on the availability of the spatial computation component 'Schneider' +++
Returns: Returns:
""" """
fetcher = ParcelWFSFetcher( fetcher = ParcelFetcher(geometry=self.geom_1)
geometry_id=self.geom_1.id, features = fetcher.get_parcels()
) self.assertNotEqual(0, len(features), msg="Spatial fetcher get feature did not work!")
features = fetcher.get_features(
"ave:Flurstueck",
)
self.assertNotEqual(0, len(features), msg="Spatial wfs get feature did not work!")

View File

@ -45,12 +45,14 @@ class Mailer:
auth_password=self.auth_password auth_password=self.auth_password
) )
def send_mail_shared_access_removed(self, obj_identifier, obj_title, user): def send_mail_shared_access_removed(self, obj_identifier, obj_title, user, municipals_names):
""" Send a mail if user has no access to the object anymore """ Send a mail if user has no access to the object anymore
Args: Args:
obj_identifier (str): The object identifier obj_identifier (str): The object identifier
obj_title (str): The object title obj_title (str): The object title
user (User): Related user
municipals_names (iterable): List of municipals of the entry
Returns: Returns:
@ -59,6 +61,7 @@ class Mailer:
"user": user, "user": user,
"obj_identifier": obj_identifier, "obj_identifier": obj_identifier,
"obj_title": obj_title, "obj_title": obj_title,
"municipals_names": municipals_names,
"EMAIL_REPLY_TO": EMAIL_REPLY_TO, "EMAIL_REPLY_TO": EMAIL_REPLY_TO,
} }
msg = render_to_string("email/sharing/shared_access_removed.html", context) msg = render_to_string("email/sharing/shared_access_removed.html", context)
@ -69,11 +72,14 @@ class Mailer:
msg msg
) )
def send_mail_shared_access_given(self, obj_identifier, obj_title, user): def send_mail_shared_access_given(self, obj_identifier, obj_title, user, municipals_names):
""" Send a mail if user just got access to the object """ Send a mail if user just got access to the object
Args: Args:
obj_identifier (str): The object identifier obj_identifier (str): The object identifier
obj_title (str): The object title
user (User): The related user
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -82,6 +88,7 @@ class Mailer:
"user": user, "user": user,
"obj_identifier": obj_identifier, "obj_identifier": obj_identifier,
"obj_title": obj_title, "obj_title": obj_title,
"municipals_names": municipals_names,
"EMAIL_REPLY_TO": EMAIL_REPLY_TO, "EMAIL_REPLY_TO": EMAIL_REPLY_TO,
} }
msg = render_to_string("email/sharing/shared_access_given.html", context) msg = render_to_string("email/sharing/shared_access_given.html", context)
@ -92,7 +99,7 @@ class Mailer:
msg msg
) )
def send_mail_shared_access_given_team(self, obj_identifier, obj_title, team, users_to_notify): def send_mail_shared_access_given_team(self, obj_identifier, obj_title, team, users_to_notify, municipals_names):
""" Send a mail if a team just got access to the object """ Send a mail if a team just got access to the object
Args: Args:
@ -100,6 +107,7 @@ class Mailer:
obj_title (str): Title of the main object obj_title (str): Title of the main object
team (Team): Team to be notified team (Team): Team to be notified
users_to_notify (QueryDict): Contains the team users which should be notified users_to_notify (QueryDict): Contains the team users which should be notified
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -108,6 +116,7 @@ class Mailer:
"team": team, "team": team,
"obj_identifier": obj_identifier, "obj_identifier": obj_identifier,
"obj_title": obj_title, "obj_title": obj_title,
"municipals_names": municipals_names,
"EMAIL_REPLY_TO": EMAIL_REPLY_TO, "EMAIL_REPLY_TO": EMAIL_REPLY_TO,
} }
msg = render_to_string("email/sharing/shared_access_given_team.html", context) msg = render_to_string("email/sharing/shared_access_given_team.html", context)
@ -118,7 +127,7 @@ class Mailer:
msg msg
) )
def send_mail_shared_access_removed_team(self, obj_identifier, obj_title, team, users_to_notify): def send_mail_shared_access_removed_team(self, obj_identifier, obj_title, team, users_to_notify, municipals_names):
""" Send a mail if a team just lost access to the object """ Send a mail if a team just lost access to the object
Args: Args:
@ -126,6 +135,7 @@ class Mailer:
obj_title (str): Title of the main object obj_title (str): Title of the main object
team (Team): Team to be notified team (Team): Team to be notified
users_to_notify (QueryDict): Contains the team users which should be notified users_to_notify (QueryDict): Contains the team users which should be notified
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -134,6 +144,7 @@ class Mailer:
"team": team, "team": team,
"obj_identifier": obj_identifier, "obj_identifier": obj_identifier,
"obj_title": obj_title, "obj_title": obj_title,
"municipals_names": municipals_names,
"EMAIL_REPLY_TO": EMAIL_REPLY_TO, "EMAIL_REPLY_TO": EMAIL_REPLY_TO,
} }
msg = render_to_string("email/sharing/shared_access_removed_team.html", context) msg = render_to_string("email/sharing/shared_access_removed_team.html", context)
@ -144,7 +155,7 @@ class Mailer:
msg msg
) )
def send_mail_shared_data_unrecorded_team(self, obj_identifier, obj_title, team, users_to_notify): def send_mail_shared_data_unrecorded_team(self, obj_identifier, obj_title, team, users_to_notify, municipals_names):
""" Send a mail if data has just been unrecorded """ Send a mail if data has just been unrecorded
Args: Args:
@ -152,6 +163,7 @@ class Mailer:
obj_title (str): Title of the main object obj_title (str): Title of the main object
team (Team): Team to be notified team (Team): Team to be notified
users_to_notify (QueryDict): Contains the team users which should be notified users_to_notify (QueryDict): Contains the team users which should be notified
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -160,6 +172,7 @@ class Mailer:
"team": team, "team": team,
"obj_identifier": obj_identifier, "obj_identifier": obj_identifier,
"obj_title": obj_title, "obj_title": obj_title,
"municipals_names": municipals_names,
"EMAIL_REPLY_TO": EMAIL_REPLY_TO, "EMAIL_REPLY_TO": EMAIL_REPLY_TO,
} }
msg = render_to_string("email/recording/shared_data_unrecorded_team.html", context) msg = render_to_string("email/recording/shared_data_unrecorded_team.html", context)
@ -170,7 +183,7 @@ class Mailer:
msg msg
) )
def send_mail_shared_data_recorded_team(self, obj_identifier, obj_title, team, users_to_notify): def send_mail_shared_data_recorded_team(self, obj_identifier, obj_title, team, users_to_notify, municipals_names):
""" Send a mail if data has just been recorded """ Send a mail if data has just been recorded
Args: Args:
@ -178,6 +191,7 @@ class Mailer:
obj_title (str): Title of the main object obj_title (str): Title of the main object
team (Team): Team to be notified team (Team): Team to be notified
users_to_notify (QueryDict): Contains the team users which should be notified users_to_notify (QueryDict): Contains the team users which should be notified
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -186,6 +200,7 @@ class Mailer:
"team": team, "team": team,
"obj_identifier": obj_identifier, "obj_identifier": obj_identifier,
"obj_title": obj_title, "obj_title": obj_title,
"municipals_names": municipals_names,
"EMAIL_REPLY_TO": EMAIL_REPLY_TO, "EMAIL_REPLY_TO": EMAIL_REPLY_TO,
} }
msg = render_to_string("email/recording/shared_data_recorded_team.html", context) msg = render_to_string("email/recording/shared_data_recorded_team.html", context)
@ -196,7 +211,7 @@ class Mailer:
msg msg
) )
def send_mail_shared_data_checked_team(self, obj_identifier, obj_title, team, users_to_notify): def send_mail_shared_data_checked_team(self, obj_identifier, obj_title, team, users_to_notify, municipals_names):
""" Send a mail if data has just been checked """ Send a mail if data has just been checked
Args: Args:
@ -204,6 +219,7 @@ class Mailer:
obj_title (str): Title of the main object obj_title (str): Title of the main object
team (Team): Team to be notified team (Team): Team to be notified
users_to_notify (QueryDict): Contains the team users which should be notified users_to_notify (QueryDict): Contains the team users which should be notified
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -212,6 +228,7 @@ class Mailer:
"team": team, "team": team,
"obj_identifier": obj_identifier, "obj_identifier": obj_identifier,
"obj_title": obj_title, "obj_title": obj_title,
"municipals_names": municipals_names,
"EMAIL_REPLY_TO": EMAIL_REPLY_TO, "EMAIL_REPLY_TO": EMAIL_REPLY_TO,
} }
msg = render_to_string("email/checking/shared_data_checked_team.html", context) msg = render_to_string("email/checking/shared_data_checked_team.html", context)
@ -249,11 +266,15 @@ class Mailer:
msg msg
) )
def send_mail_shared_data_deleted_team(self, obj_identifier, obj_title, team, users_to_notify): def send_mail_shared_data_deleted_team(self, obj_identifier, obj_title, team, users_to_notify, municipals_names):
""" Send a mail if data has just been deleted """ Send a mail if data has just been deleted
Args: Args:
obj_identifier (str): The object identifier obj_identifier (str): The object identifier
obj_title (str): The object title
team (Team): The related team
users_to_notify (QuerySet): Contains team users who want to be notified
municipals_names (iterable): List of municipals for the entry
Returns: Returns:
@ -262,6 +283,7 @@ class Mailer:
"team": team, "team": team,
"obj_identifier": obj_identifier, "obj_identifier": obj_identifier,
"obj_title": obj_title, "obj_title": obj_title,
"municipals_names": municipals_names,
"EMAIL_REPLY_TO": EMAIL_REPLY_TO, "EMAIL_REPLY_TO": EMAIL_REPLY_TO,
} }
msg = render_to_string("email/deleting/shared_data_deleted_team.html", context) msg = render_to_string("email/deleting/shared_data_deleted_team.html", context)
@ -272,11 +294,14 @@ class Mailer:
msg msg
) )
def send_mail_shared_data_recorded(self, obj_identifier, obj_title, user): def send_mail_shared_data_recorded(self, obj_identifier, obj_title, user, municipals_names):
""" Send a mail if the user's shared data has just been unrecorded """ Send a mail if the user's shared data has just been unrecorded
Args: Args:
obj_identifier (str): The object identifier obj_identifier (str): The object identifier
obj_title (str): The object title
user (User): The related user
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -285,6 +310,7 @@ class Mailer:
"user": user, "user": user,
"obj_identifier": obj_identifier, "obj_identifier": obj_identifier,
"obj_title": obj_title, "obj_title": obj_title,
"municipals_names": municipals_names,
"EMAIL_REPLY_TO": EMAIL_REPLY_TO, "EMAIL_REPLY_TO": EMAIL_REPLY_TO,
} }
msg = render_to_string("email/recording/shared_data_recorded.html", context) msg = render_to_string("email/recording/shared_data_recorded.html", context)
@ -295,11 +321,14 @@ class Mailer:
msg msg
) )
def send_mail_shared_data_unrecorded(self, obj_identifier, obj_title, user): def send_mail_shared_data_unrecorded(self, obj_identifier, obj_title, user, municipals_names):
""" Send a mail if the user's shared data has just been unrecorded """ Send a mail if the user's shared data has just been unrecorded
Args: Args:
obj_identifier (str): The object identifier obj_identifier (str): The object identifier
obj_title (str): The object title
user (User): The related user
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -308,6 +337,7 @@ class Mailer:
"user": user, "user": user,
"obj_identifier": obj_identifier, "obj_identifier": obj_identifier,
"obj_title": obj_title, "obj_title": obj_title,
"municipals_names": municipals_names,
"EMAIL_REPLY_TO": EMAIL_REPLY_TO, "EMAIL_REPLY_TO": EMAIL_REPLY_TO,
} }
msg = render_to_string("email/recording/shared_data_unrecorded.html", context) msg = render_to_string("email/recording/shared_data_unrecorded.html", context)
@ -318,11 +348,14 @@ class Mailer:
msg msg
) )
def send_mail_shared_data_deleted(self, obj_identifier, obj_title, user): def send_mail_shared_data_deleted(self, obj_identifier, obj_title, user, municipals_names):
""" Send a mail if shared data has just been deleted """ Send a mail if shared data has just been deleted
Args: Args:
obj_identifier (str): The object identifier obj_identifier (str): The object identifier
obj_title (str): The object title
user (User): The related user
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -331,6 +364,7 @@ class Mailer:
"user": user, "user": user,
"obj_identifier": obj_identifier, "obj_identifier": obj_identifier,
"obj_title": obj_title, "obj_title": obj_title,
"municipals_names": municipals_names,
"EMAIL_REPLY_TO": EMAIL_REPLY_TO, "EMAIL_REPLY_TO": EMAIL_REPLY_TO,
} }
msg = render_to_string("email/deleting/shared_data_deleted.html", context) msg = render_to_string("email/deleting/shared_data_deleted.html", context)
@ -341,11 +375,14 @@ class Mailer:
msg msg
) )
def send_mail_shared_data_checked(self, obj_identifier, obj_title, user): def send_mail_shared_data_checked(self, obj_identifier, obj_title, user, municipals_names):
""" Send a mail if shared data just has been checked """ Send a mail if shared data just has been checked
Args: Args:
obj_identifier (str): The object identifier obj_identifier (str): The object identifier
obj_title (str): The object title
user (User): The related user
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -354,6 +391,7 @@ class Mailer:
"user": user, "user": user,
"obj_identifier": obj_identifier, "obj_identifier": obj_identifier,
"obj_title": obj_title, "obj_title": obj_title,
"municipals_names": municipals_names,
"EMAIL_REPLY_TO": EMAIL_REPLY_TO, "EMAIL_REPLY_TO": EMAIL_REPLY_TO,
} }
msg = render_to_string("email/checking/shared_data_checked.html", context) msg = render_to_string("email/checking/shared_data_checked.html", context)
@ -413,12 +451,13 @@ class Mailer:
msg msg
) )
def send_mail_resubmission(self, obj_identifier, resubmission): def send_mail_resubmission(self, obj_identifier, resubmission, municipals_names):
""" Send a resubmission mail for a user """ Send a resubmission mail for a user
Args: Args:
obj_identifier (str): The (resubmitted) object's identifier obj_identifier (str): The (resubmitted) object's identifier
resubmission (Resubmission): The resubmission resubmission (Resubmission): The resubmission
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -426,6 +465,7 @@ class Mailer:
context = { context = {
"obj_identifier": obj_identifier, "obj_identifier": obj_identifier,
"resubmission": resubmission, "resubmission": resubmission,
"municipals_names": municipals_names,
"EMAIL_REPLY_TO": EMAIL_REPLY_TO, "EMAIL_REPLY_TO": EMAIL_REPLY_TO,
} }
msg = render_to_string("email/resubmission/resubmission.html", context) msg = render_to_string("email/resubmission/resubmission.html", context)

View File

@ -23,6 +23,7 @@ RECORDED_BLOCKS_EDIT = _("Entry is recorded. To edit data, the entry first needs
DATA_UNSHARED = _("This data is not shared with you") DATA_UNSHARED = _("This data is not shared with you")
DATA_UNSHARED_EXPLANATION = _("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 recording.") DATA_UNSHARED_EXPLANATION = _("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 recording.")
DATA_SHARE_SET = _("Share settings updated") DATA_SHARE_SET = _("Share settings updated")
DO_NOT_FORGET_TO_SHARE = _("Do not forget to share your entry! Currently you are the only one having shared access.")
# FILES # FILES
FILE_TYPE_UNSUPPORTED = _("Unsupported file type") FILE_TYPE_UNSUPPORTED = _("Unsupported file type")

View File

@ -44,9 +44,7 @@ def get_geom_parcels(request: HttpRequest, id: str):
status_code = 200 status_code = 200
if parcels_available or not geometry_exists: if parcels_available or not geometry_exists:
parcels = parcels.order_by("-municipal", "flr", "flrstck_zhlr", "flrstck_nnr") municipals = geom.get_underlying_municipals(parcels)
municipals = parcels.order_by("municipal").distinct("municipal").values("municipal__id")
municipals = Municipal.objects.filter(id__in=municipals)
rpp = 100 rpp = 100
num_all_parcels = parcels.count() num_all_parcels = parcels.count()

View File

@ -35,6 +35,7 @@ def home_view(request: HttpRequest):
template = "konova/home.html" template = "konova/home.html"
now = timezone.now() now = timezone.now()
user = request.user user = request.user
user_teams = user.shared_teams
# Fetch the four newest active and published ServerMessages # Fetch the four newest active and published ServerMessages
msgs = ServerMessage.objects.filter( msgs = ServerMessage.objects.filter(
@ -51,7 +52,7 @@ def home_view(request: HttpRequest):
) )
# Then fetch only user related ones # Then fetch only user related ones
user_interventions = interventions.filter( user_interventions = interventions.filter(
Q(users__in=[user]) | Q(teams__in=user.shared_teams) Q(users__in=[user]) | Q(teams__in=user_teams)
).distinct() ).distinct()
# Repeat for other objects # Repeat for other objects
@ -59,13 +60,13 @@ def home_view(request: HttpRequest):
deleted=None, deleted=None,
) )
user_comps = comps.filter( user_comps = comps.filter(
Q(intervention__users__in=[user]) | Q(intervention__teams__in=user.shared_teams) Q(intervention__users__in=[user]) | Q(intervention__teams__in=user_teams)
).distinct() ).distinct()
eco_accs = EcoAccount.objects.filter( eco_accs = EcoAccount.objects.filter(
deleted=None, deleted=None,
) )
user_ecco_accs = eco_accs.filter( user_ecco_accs = eco_accs.filter(
Q(users__in=[user]) | Q(teams__in=user.shared_teams) Q(users__in=[user]) | Q(teams__in=user_teams)
).distinct() ).distinct()
additional_context = { additional_context = {

Binary file not shown.

View File

@ -9,8 +9,8 @@
#: compensation/forms/modals/payment.py:23 #: compensation/forms/modals/payment.py:23
#: compensation/forms/modals/payment.py:34 #: compensation/forms/modals/payment.py:34
#: compensation/forms/modals/payment.py:50 #: compensation/forms/modals/payment.py:50
#: intervention/forms/intervention.py:55 intervention/forms/intervention.py:175 #: intervention/forms/intervention.py:56 intervention/forms/intervention.py:176
#: intervention/forms/intervention.py:187 #: intervention/forms/intervention.py:188
#: intervention/forms/modals/revocation.py:20 #: intervention/forms/modals/revocation.py:20
#: intervention/forms/modals/revocation.py:33 #: intervention/forms/modals/revocation.py:33
#: intervention/forms/modals/revocation.py:46 #: intervention/forms/modals/revocation.py:46
@ -43,7 +43,7 @@ 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: 2022-12-06 08:23+0100\n" "POT-Creation-Date: 2023-03-07 07:09+0100\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"
@ -72,9 +72,9 @@ msgstr "Einträge erstellt bis..."
#: analysis/forms.py:49 compensation/forms/mixins.py:21 #: analysis/forms.py:49 compensation/forms/mixins.py:21
#: compensation/templates/compensation/detail/eco_account/view.html:59 #: compensation/templates/compensation/detail/eco_account/view.html:59
#: compensation/templates/compensation/report/eco_account/report.html:16 #: compensation/templates/compensation/report/eco_account/report.html:16
#: compensation/utils/quality.py:111 ema/templates/ema/detail/view.html:49 #: compensation/utils/quality.py:112 ema/templates/ema/detail/view.html:49
#: ema/templates/ema/report/report.html:16 ema/utils/quality.py:26 #: ema/templates/ema/report/report.html:16 ema/utils/quality.py:26
#: intervention/forms/intervention.py:103 #: intervention/forms/intervention.py:104
#: intervention/templates/intervention/detail/view.html:56 #: intervention/templates/intervention/detail/view.html:56
#: intervention/templates/intervention/report/report.html:37 #: intervention/templates/intervention/report/report.html:37
#: intervention/utils/quality.py:62 konova/filters/mixins/office.py:34 #: intervention/utils/quality.py:62 konova/filters/mixins/office.py:34
@ -85,11 +85,11 @@ msgstr "Eintragungsstelle"
msgid "Select the responsible office" msgid "Select the responsible office"
msgstr "Verantwortliche Stelle" msgstr "Verantwortliche Stelle"
#: analysis/forms.py:60 compensation/forms/compensation.py:93 #: analysis/forms.py:60 compensation/forms/compensation.py:94
#: compensation/forms/mixins.py:32 compensation/forms/mixins.py:62 #: compensation/forms/mixins.py:32 compensation/forms/mixins.py:62
#: intervention/forms/intervention.py:65 intervention/forms/intervention.py:82 #: intervention/forms/intervention.py:66 intervention/forms/intervention.py:83
#: intervention/forms/intervention.py:98 intervention/forms/intervention.py:114 #: intervention/forms/intervention.py:99 intervention/forms/intervention.py:115
#: intervention/forms/intervention.py:155 intervention/forms/modals/share.py:41 #: intervention/forms/intervention.py:156 intervention/forms/modals/share.py:41
#: intervention/forms/modals/share.py:55 user/forms/modals/team.py:48 #: intervention/forms/modals/share.py:55 user/forms/modals/team.py:48
#: user/forms/modals/team.py:112 #: user/forms/modals/team.py:112
msgid "Click for selection" msgid "Click for selection"
@ -200,7 +200,7 @@ msgstr "Geprüft"
#: analysis/templates/analysis/reports/includes/intervention/compensated_by.html:10 #: analysis/templates/analysis/reports/includes/intervention/compensated_by.html:10
#: analysis/templates/analysis/reports/includes/intervention/laws.html:23 #: analysis/templates/analysis/reports/includes/intervention/laws.html:23
#: analysis/templates/analysis/reports/includes/old_data/amount.html:19 #: analysis/templates/analysis/reports/includes/old_data/amount.html:19
#: compensation/tables/compensation.py:44 compensation/tables/eco_account.py:48 #: compensation/tables/compensation.py:44 compensation/tables/eco_account.py:49
#: compensation/templates/compensation/detail/compensation/view.html:93 #: compensation/templates/compensation/detail/compensation/view.html:93
#: compensation/templates/compensation/detail/eco_account/includes/deductions.html:31 #: compensation/templates/compensation/detail/eco_account/includes/deductions.html:31
#: compensation/templates/compensation/detail/eco_account/view.html:45 #: compensation/templates/compensation/detail/eco_account/view.html:45
@ -309,7 +309,7 @@ msgstr ""
" " " "
#: analysis/templates/analysis/reports/includes/intervention/laws.html:14 #: analysis/templates/analysis/reports/includes/intervention/laws.html:14
#: intervention/forms/intervention.py:70 #: intervention/forms/intervention.py:71
#: intervention/templates/intervention/detail/view.html:39 #: intervention/templates/intervention/detail/view.html:39
#: intervention/templates/intervention/report/report.html:20 #: intervention/templates/intervention/report/report.html:20
msgid "Law" msgid "Law"
@ -335,7 +335,7 @@ msgid "Intervention"
msgstr "Eingriff" msgstr "Eingriff"
#: analysis/templates/analysis/reports/includes/old_data/amount.html:34 #: analysis/templates/analysis/reports/includes/old_data/amount.html:34
#: compensation/tables/eco_account.py:92 #: compensation/tables/eco_account.py:93
#: compensation/templates/compensation/detail/eco_account/view.html:20 #: compensation/templates/compensation/detail/eco_account/view.html:20
#: intervention/forms/modals/deduction.py:31 #: intervention/forms/modals/deduction.py:31
#: intervention/forms/modals/deduction.py:38 #: intervention/forms/modals/deduction.py:38
@ -357,7 +357,7 @@ msgid "Show only unrecorded"
msgstr "Nur unverzeichnete anzeigen" msgstr "Nur unverzeichnete anzeigen"
#: compensation/forms/compensation.py:30 compensation/tables/compensation.py:23 #: compensation/forms/compensation.py:30 compensation/tables/compensation.py:23
#: compensation/tables/eco_account.py:23 ema/tables.py:26 #: compensation/tables/eco_account.py:24 ema/tables.py:26
#: intervention/forms/intervention.py:29 intervention/tables.py:23 #: intervention/forms/intervention.py:29 intervention/tables.py:23
#: intervention/templates/intervention/detail/includes/compensations.html:30 #: intervention/templates/intervention/detail/includes/compensations.html:30
msgid "Identifier" msgid "Identifier"
@ -368,8 +368,8 @@ msgstr "Kennung"
msgid "Generated automatically - not editable" msgid "Generated automatically - not editable"
msgstr "Automatisch generiert - nicht bearbeitbar" msgstr "Automatisch generiert - nicht bearbeitbar"
#: compensation/forms/compensation.py:42 compensation/tables/compensation.py:28 #: compensation/forms/compensation.py:43 compensation/tables/compensation.py:28
#: compensation/tables/eco_account.py:28 #: compensation/tables/eco_account.py:29
#: 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:32 #: compensation/templates/compensation/detail/compensation/view.html:32
#: compensation/templates/compensation/detail/eco_account/includes/documents.html:28 #: compensation/templates/compensation/detail/eco_account/includes/documents.html:28
@ -379,7 +379,7 @@ msgstr "Automatisch generiert - nicht bearbeitbar"
#: ema/tables.py:31 ema/templates/ema/detail/includes/documents.html:28 #: ema/tables.py:31 ema/templates/ema/detail/includes/documents.html:28
#: ema/templates/ema/detail/view.html:31 #: ema/templates/ema/detail/view.html:31
#: ema/templates/ema/report/report.html:12 #: ema/templates/ema/report/report.html:12
#: intervention/forms/intervention.py:41 intervention/tables.py:28 #: intervention/forms/intervention.py:42 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:33 #: intervention/templates/intervention/detail/includes/documents.html:33
#: intervention/templates/intervention/detail/view.html:31 #: intervention/templates/intervention/detail/view.html:31
@ -388,15 +388,15 @@ msgstr "Automatisch generiert - nicht bearbeitbar"
msgid "Title" msgid "Title"
msgstr "Bezeichnung" msgstr "Bezeichnung"
#: compensation/forms/compensation.py:44 intervention/forms/intervention.py:43 #: compensation/forms/compensation.py:45 intervention/forms/intervention.py:44
msgid "An explanatory name" msgid "An explanatory name"
msgstr "Aussagekräftiger Titel" msgstr "Aussagekräftiger Titel"
#: compensation/forms/compensation.py:48 ema/forms.py:51 ema/forms.py:114 #: compensation/forms/compensation.py:49 ema/forms.py:51 ema/forms.py:114
msgid "Compensation XY; Location ABC" msgid "Compensation XY; Location ABC"
msgstr "Kompensation XY; Flur ABC" msgstr "Kompensation XY; Flur ABC"
#: compensation/forms/compensation.py:55 #: compensation/forms/compensation.py:56
#: compensation/forms/modals/compensation_action.py:81 #: compensation/forms/modals/compensation_action.py:81
#: compensation/forms/modals/deadline.py:49 #: compensation/forms/modals/deadline.py:49
#: compensation/forms/modals/payment.py:49 #: compensation/forms/modals/payment.py:49
@ -409,7 +409,7 @@ msgstr "Kompensation XY; Flur ABC"
#: ema/templates/ema/detail/includes/actions.html:34 #: ema/templates/ema/detail/includes/actions.html:34
#: ema/templates/ema/detail/includes/deadlines.html:39 #: ema/templates/ema/detail/includes/deadlines.html:39
#: ema/templates/ema/detail/includes/documents.html:34 #: ema/templates/ema/detail/includes/documents.html:34
#: intervention/forms/intervention.py:199 #: intervention/forms/intervention.py:200
#: intervention/forms/modals/revocation.py:45 #: intervention/forms/modals/revocation.py:45
#: intervention/templates/intervention/detail/includes/documents.html:39 #: intervention/templates/intervention/detail/includes/documents.html:39
#: intervention/templates/intervention/detail/includes/payments.html:34 #: intervention/templates/intervention/detail/includes/payments.html:34
@ -420,33 +420,33 @@ msgstr "Kompensation XY; Flur ABC"
msgid "Comment" msgid "Comment"
msgstr "Kommentar" msgstr "Kommentar"
#: compensation/forms/compensation.py:57 #: compensation/forms/compensation.py:58
#: compensation/forms/modals/compensation_action.py:83 #: compensation/forms/modals/compensation_action.py:83
#: intervention/forms/intervention.py:201 #: intervention/forms/intervention.py:202
#: konova/forms/modals/resubmission_form.py:37 #: konova/forms/modals/resubmission_form.py:37
msgid "Additional comment" msgid "Additional comment"
msgstr "Zusätzlicher Kommentar" msgstr "Zusätzlicher Kommentar"
#: compensation/forms/compensation.py:84 #: compensation/forms/compensation.py:85
#: compensation/templates/compensation/detail/compensation/view.html:36 #: compensation/templates/compensation/detail/compensation/view.html:36
#: compensation/templates/compensation/report/compensation/report.html:16 #: compensation/templates/compensation/report/compensation/report.html:16
msgid "compensates intervention" msgid "compensates intervention"
msgstr "kompensiert Eingriff" msgstr "kompensiert Eingriff"
#: compensation/forms/compensation.py:86 #: compensation/forms/compensation.py:87
msgid "Select the intervention for which this compensation compensates" msgid "Select the intervention for which this compensation compensates"
msgstr "Wählen Sie den Eingriff, für den diese Kompensation bestimmt ist" msgstr "Wählen Sie den Eingriff, für den diese Kompensation bestimmt ist"
#: compensation/forms/compensation.py:113 #: compensation/forms/compensation.py:114
#: compensation/views/compensation/compensation.py:115 #: compensation/views/compensation/compensation.py:115
msgid "New compensation" msgid "New compensation"
msgstr "Neue Kompensation" msgstr "Neue Kompensation"
#: compensation/forms/compensation.py:189 #: compensation/forms/compensation.py:190
msgid "Edit compensation" msgid "Edit compensation"
msgstr "Bearbeite Kompensation" msgstr "Bearbeite Kompensation"
#: compensation/forms/eco_account.py:30 compensation/utils/quality.py:95 #: compensation/forms/eco_account.py:30 compensation/utils/quality.py:96
msgid "Available Surface" msgid "Available Surface"
msgstr "Verfügbare Fläche" msgstr "Verfügbare Fläche"
@ -456,7 +456,7 @@ msgstr "Die für Abbuchungen zur Verfügung stehende Menge"
#: compensation/forms/eco_account.py:42 #: compensation/forms/eco_account.py:42
#: compensation/templates/compensation/detail/eco_account/view.html:67 #: compensation/templates/compensation/detail/eco_account/view.html:67
#: compensation/utils/quality.py:83 #: compensation/utils/quality.py:84
msgid "Agreement date" msgid "Agreement date"
msgstr "Vereinbarungsdatum" msgstr "Vereinbarungsdatum"
@ -486,16 +486,16 @@ msgstr ""
#: compensation/forms/mixins.py:37 #: compensation/forms/mixins.py:37
#: compensation/templates/compensation/detail/eco_account/view.html:63 #: compensation/templates/compensation/detail/eco_account/view.html:63
#: compensation/templates/compensation/report/eco_account/report.html:20 #: compensation/templates/compensation/report/eco_account/report.html:20
#: compensation/utils/quality.py:113 ema/templates/ema/detail/view.html:53 #: compensation/utils/quality.py:114 ema/templates/ema/detail/view.html:53
#: ema/templates/ema/report/report.html:20 ema/utils/quality.py:28 #: ema/templates/ema/report/report.html:20 ema/utils/quality.py:28
#: intervention/forms/intervention.py:131 #: intervention/forms/intervention.py:132
#: intervention/templates/intervention/detail/view.html:60 #: intervention/templates/intervention/detail/view.html:60
#: intervention/templates/intervention/report/report.html:41 #: intervention/templates/intervention/report/report.html:41
#: intervention/utils/quality.py:55 #: intervention/utils/quality.py:55
msgid "Conservation office file number" msgid "Conservation office file number"
msgstr "Aktenzeichen Eintragungsstelle" msgstr "Aktenzeichen Eintragungsstelle"
#: compensation/forms/mixins.py:43 intervention/forms/intervention.py:137 #: compensation/forms/mixins.py:43 intervention/forms/intervention.py:138
msgid "ETS-123/ABC.456" msgid "ETS-123/ABC.456"
msgstr "" msgstr ""
@ -511,11 +511,11 @@ msgstr "Zu welcher Kategorie dieser Maßnahmenträger gehört"
msgid "Eco-Account handler detail" msgid "Eco-Account handler detail"
msgstr "Detailangabe zum Maßnahmenträger" msgstr "Detailangabe zum Maßnahmenträger"
#: compensation/forms/mixins.py:71 intervention/forms/intervention.py:164 #: compensation/forms/mixins.py:71 intervention/forms/intervention.py:165
msgid "Detail input on the handler" msgid "Detail input on the handler"
msgstr "Name der Behörde, Stadt, Firma, ..." msgstr "Name der Behörde, Stadt, Firma, ..."
#: compensation/forms/mixins.py:74 intervention/forms/intervention.py:167 #: compensation/forms/mixins.py:74 intervention/forms/intervention.py:168
msgid "Company Mustermann" msgid "Company Mustermann"
msgstr "Firma Mustermann" msgstr "Firma Mustermann"
@ -759,23 +759,23 @@ msgstr ""
"Es wurde bereits mehr Fläche abgebucht, als Sie nun als abbuchbar einstellen " "Es wurde bereits mehr Fläche abgebucht, als Sie nun als abbuchbar einstellen "
"wollen. Kontaktieren Sie die für die Abbuchungen verantwortlichen Nutzer!" "wollen. Kontaktieren Sie die für die Abbuchungen verantwortlichen Nutzer!"
#: compensation/tables/compensation.py:33 compensation/tables/eco_account.py:33 #: compensation/tables/compensation.py:33 compensation/tables/eco_account.py:34
#: ema/tables.py:36 intervention/tables.py:33 #: ema/tables.py:36 intervention/tables.py:33
#: konova/filters/mixins/geo_reference.py:42 #: konova/filters/mixins/geo_reference.py:42
msgid "Parcel gmrkng" msgid "Parcel gmrkng"
msgstr "Gemarkung" msgstr "Gemarkung"
#: compensation/tables/compensation.py:50 compensation/tables/eco_account.py:54 #: compensation/tables/compensation.py:50 compensation/tables/eco_account.py:55
#: ema/tables.py:47 intervention/tables.py:50 #: ema/tables.py:47 intervention/tables.py:50
msgid "Editable" msgid "Editable"
msgstr "Freigegeben" msgstr "Freigegeben"
#: compensation/tables/compensation.py:56 compensation/tables/eco_account.py:60 #: compensation/tables/compensation.py:56 compensation/tables/eco_account.py:61
#: ema/tables.py:53 intervention/tables.py:56 #: ema/tables.py:53 intervention/tables.py:56
msgid "Last edit" msgid "Last edit"
msgstr "Zuletzt bearbeitet" msgstr "Zuletzt bearbeitet"
#: compensation/tables/compensation.py:87 compensation/tables/eco_account.py:92 #: compensation/tables/compensation.py:87 compensation/tables/eco_account.py:93
#: ema/tables.py:86 intervention/tables.py:87 #: ema/tables.py:86 intervention/tables.py:87
msgid "Open {}" msgid "Open {}"
msgstr "Öffne {}" msgstr "Öffne {}"
@ -791,22 +791,22 @@ msgid "Not recorded yet"
msgstr "Noch nicht verzeichnet" msgstr "Noch nicht verzeichnet"
#: compensation/tables/compensation.py:144 #: compensation/tables/compensation.py:144
#: compensation/tables/eco_account.py:131 ema/tables.py:108 #: compensation/tables/eco_account.py:133 ema/tables.py:108
#: intervention/tables.py:142 #: intervention/tables.py:142
msgid "Recorded on {} by {}" msgid "Recorded on {} by {}"
msgstr "Am {} von {} verzeichnet worden" msgstr "Am {} von {} verzeichnet worden"
#: compensation/tables/eco_account.py:38 #: compensation/tables/eco_account.py:39
#: compensation/templates/compensation/detail/eco_account/view.html:36 #: compensation/templates/compensation/detail/eco_account/view.html:36
#: konova/templates/konova/widgets/progressbar.html:3 #: konova/templates/konova/widgets/progressbar.html:3
msgid "Available" msgid "Available"
msgstr "Verfügbar" msgstr "Verfügbar"
#: compensation/tables/eco_account.py:69 #: compensation/tables/eco_account.py:70
msgid "Eco Accounts" msgid "Eco Accounts"
msgstr "Ökokonten" msgstr "Ökokonten"
#: compensation/tables/eco_account.py:128 #: compensation/tables/eco_account.py:130
msgid "Not recorded yet. Can not be used for deductions, yet." msgid "Not recorded yet. Can not be used for deductions, 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."
@ -1012,7 +1012,7 @@ msgstr "Dokument löschen"
#: compensation/templates/compensation/detail/compensation/includes/states-after.html:8 #: compensation/templates/compensation/detail/compensation/includes/states-after.html:8
#: compensation/templates/compensation/detail/eco_account/includes/states-after.html:8 #: compensation/templates/compensation/detail/eco_account/includes/states-after.html:8
#: compensation/utils/quality.py:40 #: compensation/utils/quality.py:41
#: ema/templates/ema/detail/includes/states-after.html:8 #: ema/templates/ema/detail/includes/states-after.html:8
msgid "States after" msgid "States after"
msgstr "Zielzustand" msgstr "Zielzustand"
@ -1058,7 +1058,7 @@ msgstr "Zustand entfernen"
#: compensation/templates/compensation/detail/compensation/includes/states-before.html:8 #: compensation/templates/compensation/detail/compensation/includes/states-before.html:8
#: compensation/templates/compensation/detail/eco_account/includes/states-before.html:8 #: compensation/templates/compensation/detail/eco_account/includes/states-before.html:8
#: compensation/utils/quality.py:38 #: compensation/utils/quality.py:39
#: ema/templates/ema/detail/includes/states-before.html:8 #: ema/templates/ema/detail/includes/states-before.html:8
msgid "States before" msgid "States before"
msgstr "Ausgangszustand" msgstr "Ausgangszustand"
@ -1250,25 +1250,25 @@ msgstr "Abbuchungen für"
msgid "None" msgid "None"
msgstr "-" msgstr "-"
#: compensation/utils/quality.py:35 #: compensation/utils/quality.py:36
msgid "States unequal" msgid "States unequal"
msgstr "Ungleiche Zustandsflächenmengen" msgstr "Ungleiche Zustandsflächenmengen"
#: compensation/utils/quality.py:59 #: compensation/utils/quality.py:60
msgid "Finished deadlines" msgid "Finished deadlines"
msgstr "Umsetzungstermin" msgstr "Umsetzungstermin"
#: compensation/utils/quality.py:85 intervention/utils/quality.py:97 #: compensation/utils/quality.py:86 intervention/utils/quality.py:97
msgid "Legal data" msgid "Legal data"
msgstr "Rechtliche Daten" msgstr "Rechtliche Daten"
#: compensation/utils/quality.py:99 #: compensation/utils/quality.py:100
msgid "Deductable surface can not be larger than state surface" msgid "Deductable surface can not be larger than state surface"
msgstr "" msgstr ""
"Die abbuchbare Fläche darf die Gesamtfläche der Zielzustände nicht " "Die abbuchbare Fläche darf die Gesamtfläche der Zielzustände nicht "
"überschreiten" "überschreiten"
#: compensation/utils/quality.py:115 ema/utils/quality.py:30 #: compensation/utils/quality.py:116 ema/utils/quality.py:30
#: intervention/utils/quality.py:68 #: intervention/utils/quality.py:68
msgid "Responsible data" msgid "Responsible data"
msgstr "Daten zu den verantwortlichen Stellen" msgstr "Daten zu den verantwortlichen Stellen"
@ -1278,13 +1278,13 @@ msgid "Compensations - Overview"
msgstr "Kompensationen - Übersicht" msgstr "Kompensationen - Übersicht"
#: compensation/views/compensation/compensation.py:177 #: compensation/views/compensation/compensation.py:177
#: konova/utils/message_templates.py:37 #: konova/utils/message_templates.py:38
msgid "Compensation {} edited" msgid "Compensation {} edited"
msgstr "Kompensation {} bearbeitet" msgstr "Kompensation {} bearbeitet"
#: compensation/views/compensation/compensation.py:187 #: compensation/views/compensation/compensation.py:187
#: compensation/views/eco_account/eco_account.py:161 ema/views/ema.py:212 #: compensation/views/eco_account/eco_account.py:161 ema/views/ema.py:212
#: intervention/views/intervention.py:230 #: intervention/views/intervention.py:243
msgid "Edit {}" msgid "Edit {}"
msgstr "Bearbeite {}" msgstr "Bearbeite {}"
@ -1306,7 +1306,7 @@ msgstr "Ökokonto {} hinzugefügt"
msgid "Eco-Account {} edited" msgid "Eco-Account {} edited"
msgstr "Ökokonto {} bearbeitet" msgstr "Ökokonto {} bearbeitet"
#: compensation/views/eco_account/eco_account.py:267 #: compensation/views/eco_account/eco_account.py:268
msgid "Eco-account removed" msgid "Eco-account removed"
msgstr "Ökokonto entfernt" msgstr "Ökokonto entfernt"
@ -1354,70 +1354,70 @@ msgstr "EMA {} bearbeitet"
msgid "EMA removed" msgid "EMA removed"
msgstr "EMA entfernt" msgstr "EMA entfernt"
#: intervention/forms/intervention.py:47 #: intervention/forms/intervention.py:48
msgid "Construction XY; Location ABC" msgid "Construction XY; Location ABC"
msgstr "Bauvorhaben XY; Flur ABC" msgstr "Bauvorhaben XY; Flur ABC"
#: intervention/forms/intervention.py:53 #: intervention/forms/intervention.py:54
#: intervention/templates/intervention/detail/view.html:35 #: intervention/templates/intervention/detail/view.html:35
#: intervention/templates/intervention/report/report.html:16 #: intervention/templates/intervention/report/report.html:16
#: intervention/utils/quality.py:95 #: intervention/utils/quality.py:95
msgid "Process type" msgid "Process type"
msgstr "Verfahrenstyp" msgstr "Verfahrenstyp"
#: intervention/forms/intervention.py:72 #: intervention/forms/intervention.py:73
msgid "Multiple selection possible" msgid "Multiple selection possible"
msgstr "Mehrfachauswahl möglich" msgstr "Mehrfachauswahl möglich"
#: intervention/forms/intervention.py:87 #: intervention/forms/intervention.py:88
#: intervention/templates/intervention/detail/view.html:48 #: intervention/templates/intervention/detail/view.html:48
#: intervention/templates/intervention/report/report.html:29 #: intervention/templates/intervention/report/report.html:29
#: intervention/utils/quality.py:59 konova/filters/mixins/office.py:66 #: intervention/utils/quality.py:59 konova/filters/mixins/office.py:66
msgid "Registration office" msgid "Registration office"
msgstr "Zulassungsbehörde" msgstr "Zulassungsbehörde"
#: intervention/forms/intervention.py:119 #: intervention/forms/intervention.py:120
#: intervention/templates/intervention/detail/view.html:52 #: intervention/templates/intervention/detail/view.html:52
#: intervention/templates/intervention/report/report.html:33 #: intervention/templates/intervention/report/report.html:33
#: intervention/utils/quality.py:52 #: intervention/utils/quality.py:52
msgid "Registration office file number" msgid "Registration office file number"
msgstr "Aktenzeichen Zulassungsbehörde" msgstr "Aktenzeichen Zulassungsbehörde"
#: intervention/forms/intervention.py:125 #: intervention/forms/intervention.py:126
msgid "ZB-123/ABC.456" msgid "ZB-123/ABC.456"
msgstr "" msgstr ""
#: intervention/forms/intervention.py:143 #: intervention/forms/intervention.py:144
msgid "Intervention handler type" msgid "Intervention handler type"
msgstr "Art des Eingriffsverursachers" msgstr "Art des Eingriffsverursachers"
#: intervention/forms/intervention.py:145 #: intervention/forms/intervention.py:146
msgid "What type of handler is responsible for the intervention?" msgid "What type of handler is responsible for the intervention?"
msgstr "Zu welcher Kategorie dieser Eingriffsverursacher gehört" msgstr "Zu welcher Kategorie dieser Eingriffsverursacher gehört"
#: intervention/forms/intervention.py:160 #: intervention/forms/intervention.py:161
msgid "Intervention handler detail" msgid "Intervention handler detail"
msgstr "Detailangabe zum Eingriffsverursacher" msgstr "Detailangabe zum Eingriffsverursacher"
#: intervention/forms/intervention.py:174 #: intervention/forms/intervention.py:175
#: intervention/templates/intervention/detail/view.html:101 #: intervention/templates/intervention/detail/view.html:101
#: intervention/templates/intervention/report/report.html:81 #: intervention/templates/intervention/report/report.html:81
#: intervention/utils/quality.py:86 #: intervention/utils/quality.py:86
msgid "Registration date" msgid "Registration date"
msgstr "Datum Zulassung bzw. Satzungsbeschluss" msgstr "Datum Zulassung bzw. Satzungsbeschluss"
#: intervention/forms/intervention.py:186 #: intervention/forms/intervention.py:187
#: intervention/templates/intervention/detail/view.html:105 #: intervention/templates/intervention/detail/view.html:105
#: intervention/templates/intervention/report/report.html:85 #: intervention/templates/intervention/report/report.html:85
msgid "Binding on" msgid "Binding on"
msgstr "Datum Bestandskraft bzw. Rechtskraft" msgstr "Datum Bestandskraft bzw. Rechtskraft"
#: intervention/forms/intervention.py:212 #: intervention/forms/intervention.py:213
#: intervention/views/intervention.py:100 #: intervention/views/intervention.py:100
msgid "New intervention" msgid "New intervention"
msgstr "Neuer Eingriff" msgstr "Neuer Eingriff"
#: intervention/forms/intervention.py:302 #: intervention/forms/intervention.py:303
msgid "Edit intervention" msgid "Edit intervention"
msgstr "Eingriff bearbeiten" msgstr "Eingriff bearbeiten"
@ -1653,11 +1653,11 @@ msgstr "Eingriffe - Übersicht"
msgid "Intervention {} added" msgid "Intervention {} added"
msgstr "Eingriff {} hinzugefügt" msgstr "Eingriff {} hinzugefügt"
#: intervention/views/intervention.py:218 #: intervention/views/intervention.py:231
msgid "Intervention {} edited" msgid "Intervention {} edited"
msgstr "Eingriff {} bearbeitet" msgstr "Eingriff {} bearbeitet"
#: intervention/views/intervention.py:255 #: intervention/views/intervention.py:268
msgid "{} removed" msgid "{} removed"
msgstr "{} entfernt" msgstr "{} entfernt"
@ -1744,7 +1744,8 @@ msgstr "Verzeichnete anzeigen"
#: konova/filters/mixins/record.py:27 #: konova/filters/mixins/record.py:27
msgid "If activated also shows entries which have been already recorded" msgid "If activated also shows entries which have been already recorded"
msgstr "Wenn aktiviert werden auch Einträge angezeigt, die bereits verzeichnet wurden" msgstr ""
"Wenn aktiviert werden auch Einträge angezeigt, die bereits verzeichnet wurden"
#: konova/filters/mixins/self_created.py:23 #: konova/filters/mixins/self_created.py:23
msgid "Show only self created" msgid "Show only self created"
@ -1752,7 +1753,9 @@ msgstr "Nur selbst erstellte anzeigen"
#: konova/filters/mixins/self_created.py:28 #: konova/filters/mixins/self_created.py:28
msgid "If activated only shows entries which have been created by you" msgid "If activated only shows entries which have been created by you"
msgstr "Wenn aktiviert werden nur Einträge angezeigt, die von Ihnen erstellt worden sind" msgstr ""
"Wenn aktiviert werden nur Einträge angezeigt, die von Ihnen erstellt worden "
"sind"
#: konova/filters/mixins/share.py:22 #: konova/filters/mixins/share.py:22
msgid "Show unshared" msgid "Show unshared"
@ -1760,13 +1763,15 @@ msgstr "Nicht freigegebene anzeigen"
#: konova/filters/mixins/share.py:27 #: konova/filters/mixins/share.py:27
msgid "If activated also shows entries which are not shared with you" msgid "If activated also shows entries which are not shared with you"
msgstr "Wenn aktiviert werden auch Einträge angezeigt, die nicht für Sie freigegeben sind" msgstr ""
"Wenn aktiviert werden auch Einträge angezeigt, die nicht für Sie freigegeben "
"sind"
#: konova/forms/base_form.py:23 templates/form/collapsable/form.html:62 #: konova/forms/base_form.py:23 templates/form/collapsable/form.html:62
msgid "Save" msgid "Save"
msgstr "Speichern" msgstr "Speichern"
#: konova/forms/base_form.py:57 #: konova/forms/base_form.py:72
msgid "Not editable" msgid "Not editable"
msgstr "Nicht editierbar" msgstr "Nicht editierbar"
@ -1822,11 +1827,11 @@ msgstr ""
msgid "Confirm" msgid "Confirm"
msgstr "Bestätige" msgstr "Bestätige"
#: konova/forms/modals/remove_form.py:31 konova/forms/remove_form.py:30 #: konova/forms/modals/remove_form.py:32 konova/forms/remove_form.py:30
msgid "Remove" msgid "Remove"
msgstr "Löschen" msgstr "Löschen"
#: konova/forms/modals/remove_form.py:32 #: konova/forms/modals/remove_form.py:33
msgid "Are you sure?" msgid "Are you sure?"
msgstr "Sind Sie sicher?" msgstr "Sind Sie sicher?"
@ -1976,39 +1981,39 @@ msgstr "In Zwischenablage kopiert"
msgid "Search" msgid "Search"
msgstr "Suchen" msgstr "Suchen"
#: konova/utils/mailer.py:68 konova/utils/mailer.py:143 #: konova/utils/mailer.py:71 konova/utils/mailer.py:154
msgid "{} - Shared access removed" msgid "{} - Shared access removed"
msgstr "{} - Zugriff entzogen" msgstr "{} - Zugriff entzogen"
#: konova/utils/mailer.py:91 konova/utils/mailer.py:117 #: konova/utils/mailer.py:98 konova/utils/mailer.py:126
msgid "{} - Shared access given" msgid "{} - Shared access given"
msgstr "{} - Zugriff freigegeben" msgstr "{} - Zugriff freigegeben"
#: konova/utils/mailer.py:169 konova/utils/mailer.py:317 #: konova/utils/mailer.py:182 konova/utils/mailer.py:347
msgid "{} - Shared data unrecorded" msgid "{} - Shared data unrecorded"
msgstr "{} - Freigegebene Daten entzeichnet" msgstr "{} - Freigegebene Daten entzeichnet"
#: konova/utils/mailer.py:195 konova/utils/mailer.py:294 #: konova/utils/mailer.py:210 konova/utils/mailer.py:320
msgid "{} - Shared data recorded" msgid "{} - Shared data recorded"
msgstr "{} - Freigegebene Daten verzeichnet" msgstr "{} - Freigegebene Daten verzeichnet"
#: konova/utils/mailer.py:221 konova/utils/mailer.py:363 #: konova/utils/mailer.py:238 konova/utils/mailer.py:401
msgid "{} - Shared data checked" msgid "{} - Shared data checked"
msgstr "{} - Freigegebene Daten geprüft" msgstr "{} - Freigegebene Daten geprüft"
#: konova/utils/mailer.py:248 konova/utils/mailer.py:391 #: konova/utils/mailer.py:265 konova/utils/mailer.py:429
msgid "{} - Deduction changed" msgid "{} - Deduction changed"
msgstr "{} - Abbuchung geändert" msgstr "{} - Abbuchung geändert"
#: konova/utils/mailer.py:271 konova/utils/mailer.py:340 #: konova/utils/mailer.py:293 konova/utils/mailer.py:374
msgid "{} - Shared data deleted" msgid "{} - Shared data deleted"
msgstr "{} - Freigegebene Daten gelöscht" msgstr "{} - Freigegebene Daten gelöscht"
#: konova/utils/mailer.py:412 templates/email/api/verify_token.html:4 #: konova/utils/mailer.py:450 templates/email/api/verify_token.html:4
msgid "Request for new API token" msgid "Request for new API token"
msgstr "Anfrage für neuen API Token" msgstr "Anfrage für neuen API Token"
#: konova/utils/mailer.py:435 #: konova/utils/mailer.py:475
msgid "Resubmission - {}" msgid "Resubmission - {}"
msgstr "Wiedervorlage - {}" msgstr "Wiedervorlage - {}"
@ -2085,15 +2090,22 @@ msgstr ""
msgid "Share settings updated" msgid "Share settings updated"
msgstr "Freigabe Einstellungen aktualisiert" msgstr "Freigabe Einstellungen aktualisiert"
#: konova/utils/message_templates.py:28 #: konova/utils/message_templates.py:26
msgid ""
"Do not forget to share your entry! Currently you are the only one having "
"shared access."
msgstr ""
"Denken Sie daran Ihren Eintrag freizugeben! Aktuell haben nur Sie eine Freigabe hierauf."
#: konova/utils/message_templates.py:29
msgid "Unsupported file type" msgid "Unsupported file type"
msgstr "Dateiformat nicht unterstützt" msgstr "Dateiformat nicht unterstützt"
#: konova/utils/message_templates.py:29 #: konova/utils/message_templates.py:30
msgid "File too large" msgid "File too large"
msgstr "Datei zu groß" msgstr "Datei zu groß"
#: konova/utils/message_templates.py:32 #: konova/utils/message_templates.py:33
msgid "" msgid ""
"Action canceled. Eco account is recorded or deductions exist. Only " "Action canceled. Eco account is recorded or deductions exist. Only "
"conservation office member can perform this action." "conservation office member can perform this action."
@ -2101,136 +2113,136 @@ msgstr ""
"Aktion abgebrochen. Ökokonto ist bereits verzeichnet oder Abbuchungen liegen " "Aktion abgebrochen. Ökokonto ist bereits verzeichnet oder Abbuchungen liegen "
"vor. Nur Eintragungsstellennutzer können diese Aktion jetzt durchführen." "vor. Nur Eintragungsstellennutzer können diese Aktion jetzt durchführen."
#: konova/utils/message_templates.py:35 #: konova/utils/message_templates.py:36
msgid "Compensation {} added" msgid "Compensation {} added"
msgstr "Kompensation {} hinzugefügt" msgstr "Kompensation {} hinzugefügt"
#: konova/utils/message_templates.py:36 #: konova/utils/message_templates.py:37
msgid "Compensation {} removed" msgid "Compensation {} removed"
msgstr "Kompensation {} entfernt" msgstr "Kompensation {} entfernt"
#: konova/utils/message_templates.py:38 #: konova/utils/message_templates.py:39
msgid "Added compensation action" msgid "Added compensation action"
msgstr "Maßnahme hinzugefügt" msgstr "Maßnahme hinzugefügt"
#: konova/utils/message_templates.py:39 #: konova/utils/message_templates.py:40
msgid "Added compensation state" msgid "Added compensation state"
msgstr "Zustand hinzugefügt" msgstr "Zustand hinzugefügt"
#: konova/utils/message_templates.py:42 #: konova/utils/message_templates.py:43
msgid "State removed" msgid "State removed"
msgstr "Zustand gelöscht" msgstr "Zustand gelöscht"
#: konova/utils/message_templates.py:43 #: konova/utils/message_templates.py:44
msgid "State edited" msgid "State edited"
msgstr "Zustand bearbeitet" msgstr "Zustand bearbeitet"
#: konova/utils/message_templates.py:44 #: konova/utils/message_templates.py:45
msgid "State added" msgid "State added"
msgstr "Zustand hinzugefügt" msgstr "Zustand hinzugefügt"
#: konova/utils/message_templates.py:47 #: konova/utils/message_templates.py:48
msgid "Action added" msgid "Action added"
msgstr "Maßnahme hinzugefügt" msgstr "Maßnahme hinzugefügt"
#: konova/utils/message_templates.py:48 #: konova/utils/message_templates.py:49
msgid "Action edited" msgid "Action edited"
msgstr "Maßnahme bearbeitet" msgstr "Maßnahme bearbeitet"
#: konova/utils/message_templates.py:49 #: konova/utils/message_templates.py:50
msgid "Action removed" msgid "Action removed"
msgstr "Maßnahme entfernt" msgstr "Maßnahme entfernt"
#: konova/utils/message_templates.py:52 #: konova/utils/message_templates.py:53
msgid "Deduction added" msgid "Deduction added"
msgstr "Abbuchung hinzugefügt" msgstr "Abbuchung hinzugefügt"
#: konova/utils/message_templates.py:53 #: konova/utils/message_templates.py:54
msgid "Deduction edited" msgid "Deduction edited"
msgstr "Abbuchung bearbeitet" msgstr "Abbuchung bearbeitet"
#: konova/utils/message_templates.py:54 #: konova/utils/message_templates.py:55
msgid "Deduction removed" msgid "Deduction removed"
msgstr "Abbuchung entfernt" msgstr "Abbuchung entfernt"
#: konova/utils/message_templates.py:55 #: konova/utils/message_templates.py:56
msgid "Unknown deduction" msgid "Unknown deduction"
msgstr "Unbekannte Abbuchung" msgstr "Unbekannte Abbuchung"
#: konova/utils/message_templates.py:58 #: konova/utils/message_templates.py:59
msgid "Deadline added" msgid "Deadline added"
msgstr "Frist/Termin hinzugefügt" msgstr "Frist/Termin hinzugefügt"
#: konova/utils/message_templates.py:59 #: konova/utils/message_templates.py:60
msgid "Deadline edited" msgid "Deadline edited"
msgstr "Frist/Termin bearbeitet" msgstr "Frist/Termin bearbeitet"
#: konova/utils/message_templates.py:60 #: konova/utils/message_templates.py:61
msgid "Deadline removed" msgid "Deadline removed"
msgstr "Frist/Termin gelöscht" msgstr "Frist/Termin gelöscht"
#: konova/utils/message_templates.py:63 #: konova/utils/message_templates.py:64
msgid "Payment added" msgid "Payment added"
msgstr "Zahlung hinzugefügt" msgstr "Zahlung hinzugefügt"
#: konova/utils/message_templates.py:64 #: konova/utils/message_templates.py:65
msgid "Payment edited" msgid "Payment edited"
msgstr "Zahlung bearbeitet" msgstr "Zahlung bearbeitet"
#: konova/utils/message_templates.py:65 #: konova/utils/message_templates.py:66
msgid "Payment removed" msgid "Payment removed"
msgstr "Zahlung gelöscht" msgstr "Zahlung gelöscht"
#: konova/utils/message_templates.py:68 #: konova/utils/message_templates.py:69
msgid "Revocation added" msgid "Revocation added"
msgstr "Widerspruch hinzugefügt" msgstr "Widerspruch hinzugefügt"
#: konova/utils/message_templates.py:69 #: konova/utils/message_templates.py:70
msgid "Revocation edited" msgid "Revocation edited"
msgstr "Widerspruch bearbeitet" msgstr "Widerspruch bearbeitet"
#: konova/utils/message_templates.py:70 #: konova/utils/message_templates.py:71
msgid "Revocation removed" msgid "Revocation removed"
msgstr "Widerspruch entfernt" msgstr "Widerspruch entfernt"
#: konova/utils/message_templates.py:73 #: konova/utils/message_templates.py:74
msgid "Document '{}' deleted" msgid "Document '{}' deleted"
msgstr "Dokument '{}' gelöscht" msgstr "Dokument '{}' gelöscht"
#: konova/utils/message_templates.py:74 #: konova/utils/message_templates.py:75
msgid "Document added" msgid "Document added"
msgstr "Dokument hinzugefügt" msgstr "Dokument hinzugefügt"
#: konova/utils/message_templates.py:75 #: konova/utils/message_templates.py:76
msgid "Document edited" msgid "Document edited"
msgstr "Dokument bearbeitet" msgstr "Dokument bearbeitet"
#: konova/utils/message_templates.py:78 #: konova/utils/message_templates.py:79
msgid "Edited general data" msgid "Edited general data"
msgstr "Allgemeine Daten bearbeitet" msgstr "Allgemeine Daten bearbeitet"
#: konova/utils/message_templates.py:79 #: konova/utils/message_templates.py:80
msgid "Added deadline" msgid "Added deadline"
msgstr "Frist/Termin hinzugefügt" msgstr "Frist/Termin hinzugefügt"
#: konova/utils/message_templates.py:82 #: konova/utils/message_templates.py:83
msgid "Geometry conflict detected with {}" msgid "Geometry conflict detected with {}"
msgstr "Geometriekonflikt mit folgenden Einträgen erkannt: {}" msgstr "Geometriekonflikt mit folgenden Einträgen erkannt: {}"
#: konova/utils/message_templates.py:85 #: konova/utils/message_templates.py:86
msgid "This intervention has {} revocations" msgid "This intervention has {} revocations"
msgstr "Dem Eingriff liegen {} Widersprüche vor" msgstr "Dem Eingriff liegen {} Widersprüche vor"
#: konova/utils/message_templates.py:88 #: konova/utils/message_templates.py:89
msgid "Checked on {} by {}" msgid "Checked on {} by {}"
msgstr "Am {} von {} geprüft worden" msgstr "Am {} von {} geprüft worden"
#: konova/utils/message_templates.py:89 #: konova/utils/message_templates.py:90
msgid "Data has changed since last check on {} by {}" msgid "Data has changed since last check on {} by {}"
msgstr "" msgstr ""
"Daten wurden nach der letzten Prüfung geändert. Letzte Prüfung am {} durch {}" "Daten wurden nach der letzten Prüfung geändert. Letzte Prüfung am {} durch {}"
#: konova/utils/message_templates.py:90 #: konova/utils/message_templates.py:91
msgid "Current data not checked yet" msgid "Current data not checked yet"
msgstr "Momentane Daten noch nicht geprüft" msgstr "Momentane Daten noch nicht geprüft"
@ -2258,7 +2270,7 @@ msgstr "Für Sie freigegeben - Datensatz kann bearbeitet werden"
msgid "Access not granted" msgid "Access not granted"
msgstr "Nicht freigegeben - Datensatz nur lesbar" msgstr "Nicht freigegeben - Datensatz nur lesbar"
#: konova/views/home.py:79 templates/navbars/navbar.html:16 #: konova/views/home.py:80 templates/navbars/navbar.html:16
msgid "Home" msgid "Home"
msgstr "Home" msgstr "Home"
@ -2358,21 +2370,21 @@ msgstr ""
"Admin Backend aktiviert worden ist." "Admin Backend aktiviert worden ist."
#: templates/email/api/verify_token.html:19 #: templates/email/api/verify_token.html:19
#: templates/email/checking/shared_data_checked.html:20 #: templates/email/checking/shared_data_checked.html:30
#: templates/email/checking/shared_data_checked_team.html:20 #: templates/email/checking/shared_data_checked_team.html:30
#: templates/email/deleting/shared_data_deleted.html:20 #: templates/email/deleting/shared_data_deleted.html:30
#: templates/email/deleting/shared_data_deleted_team.html:20 #: templates/email/deleting/shared_data_deleted_team.html:30
#: templates/email/other/deduction_changed.html:41 #: templates/email/other/deduction_changed.html:41
#: templates/email/other/deduction_changed_team.html:41 #: templates/email/other/deduction_changed_team.html:41
#: templates/email/recording/shared_data_recorded.html:20 #: templates/email/recording/shared_data_recorded.html:30
#: templates/email/recording/shared_data_recorded_team.html:20 #: templates/email/recording/shared_data_recorded_team.html:30
#: templates/email/recording/shared_data_unrecorded.html:20 #: templates/email/recording/shared_data_unrecorded.html:30
#: templates/email/recording/shared_data_unrecorded_team.html:20 #: templates/email/recording/shared_data_unrecorded_team.html:31
#: templates/email/resubmission/resubmission.html:21 #: templates/email/resubmission/resubmission.html:31
#: templates/email/sharing/shared_access_given.html:21 #: templates/email/sharing/shared_access_given.html:31
#: templates/email/sharing/shared_access_given_team.html:21 #: templates/email/sharing/shared_access_given_team.html:32
#: templates/email/sharing/shared_access_removed.html:21 #: templates/email/sharing/shared_access_removed.html:31
#: templates/email/sharing/shared_access_removed_team.html:21 #: templates/email/sharing/shared_access_removed_team.html:31
msgid "Best regards" msgid "Best regards"
msgstr "Beste Grüße" msgstr "Beste Grüße"
@ -2397,8 +2409,40 @@ msgstr "Hallo "
msgid "the following dataset has just been checked" msgid "the following dataset has just been checked"
msgstr "der folgende Datensatz wurde soeben geprüft " msgstr "der folgende Datensatz wurde soeben geprüft "
#: templates/email/checking/shared_data_checked.html:17 #: templates/email/checking/shared_data_checked.html:18
#: templates/email/checking/shared_data_checked_team.html:17 #: templates/email/checking/shared_data_checked_team.html:18
#: templates/email/deleting/shared_data_deleted.html:18
#: templates/email/deleting/shared_data_deleted_team.html:18
#: templates/email/recording/shared_data_recorded.html:18
#: templates/email/recording/shared_data_recorded_team.html:18
#: templates/email/recording/shared_data_unrecorded.html:18
#: templates/email/recording/shared_data_unrecorded_team.html:18
#: templates/email/resubmission/resubmission.html:21
#: templates/email/sharing/shared_access_given.html:18
#: templates/email/sharing/shared_access_given_team.html:18
#: templates/email/sharing/shared_access_removed.html:18
#: templates/email/sharing/shared_access_removed_team.html:18
msgid "This entry is located in"
msgstr "Dieser Eintrag befindet sich in"
#: templates/email/checking/shared_data_checked.html:24
#: templates/email/checking/shared_data_checked_team.html:24
#: templates/email/deleting/shared_data_deleted.html:24
#: templates/email/deleting/shared_data_deleted_team.html:24
#: templates/email/recording/shared_data_recorded.html:24
#: templates/email/recording/shared_data_recorded_team.html:24
#: templates/email/recording/shared_data_unrecorded.html:24
#: templates/email/recording/shared_data_unrecorded_team.html:24
#: templates/email/resubmission/resubmission.html:27
#: templates/email/sharing/shared_access_given.html:24
#: templates/email/sharing/shared_access_given_team.html:25
#: templates/email/sharing/shared_access_removed.html:24
#: templates/email/sharing/shared_access_removed_team.html:24
msgid "Unknown - No administrative location recognized"
msgstr "Unbekannt - Keine administrative Verortung möglich"
#: templates/email/checking/shared_data_checked.html:27
#: templates/email/checking/shared_data_checked_team.html:27
msgid "" msgid ""
"This means, the responsible registration office just confirmed the " "This means, the responsible registration office just confirmed the "
"correctness of this dataset." "correctness of this dataset."
@ -2426,8 +2470,8 @@ msgstr "Freigegebene Daten gelöscht"
msgid "the following dataset has just been deleted" msgid "the following dataset has just been deleted"
msgstr "der folgende Datensatz wurde soeben gelöscht " msgstr "der folgende Datensatz wurde soeben gelöscht "
#: templates/email/deleting/shared_data_deleted.html:17 #: templates/email/deleting/shared_data_deleted.html:27
#: templates/email/deleting/shared_data_deleted_team.html:17 #: templates/email/deleting/shared_data_deleted_team.html:27
#: templates/email/other/deduction_changed.html:38 #: templates/email/other/deduction_changed.html:38
#: templates/email/other/deduction_changed_team.html:38 #: templates/email/other/deduction_changed_team.html:38
msgid "" msgid ""
@ -2478,14 +2522,14 @@ msgstr "Freigegebene Daten verzeichnet"
msgid "the following dataset has just been recorded" msgid "the following dataset has just been recorded"
msgstr "der folgende Datensatz wurde soeben verzeichnet " msgstr "der folgende Datensatz wurde soeben verzeichnet "
#: templates/email/recording/shared_data_recorded.html:17 #: templates/email/recording/shared_data_recorded.html:27
#: templates/email/recording/shared_data_recorded_team.html:17 #: templates/email/recording/shared_data_recorded_team.html:27
msgid "This means the data is now publicly available, e.g. in LANIS" msgid "This means the data is now publicly available, e.g. in LANIS"
msgstr "" msgstr ""
"Das bedeutet, dass die Daten nun öffentlich verfügbar sind, z.B. im LANIS." "Das bedeutet, dass die Daten nun öffentlich verfügbar sind, z.B. im LANIS."
#: templates/email/recording/shared_data_recorded.html:27 #: templates/email/recording/shared_data_recorded.html:37
#: templates/email/recording/shared_data_recorded_team.html:27 #: templates/email/recording/shared_data_recorded_team.html:37
msgid "" msgid ""
"Please note: Recorded intervention means the compensations are recorded as " "Please note: Recorded intervention means the compensations are recorded as "
"well." "well."
@ -2503,13 +2547,13 @@ msgstr "Freigegebene Daten entzeichnet"
msgid "the following dataset has just been unrecorded" msgid "the following dataset has just been unrecorded"
msgstr "der folgende Datensatz wurde soeben entzeichnet " msgstr "der folgende Datensatz wurde soeben entzeichnet "
#: templates/email/recording/shared_data_unrecorded.html:17 #: templates/email/recording/shared_data_unrecorded.html:27
#: templates/email/recording/shared_data_unrecorded_team.html:17 #: templates/email/recording/shared_data_unrecorded_team.html:28
msgid "This means the data is no longer publicly available." msgid "This means the data is no longer publicly available."
msgstr "Das bedeutet, dass die Daten nicht länger öffentlich verfügbar sind." msgstr "Das bedeutet, dass die Daten nicht länger öffentlich verfügbar sind."
#: templates/email/recording/shared_data_unrecorded.html:27 #: templates/email/recording/shared_data_unrecorded.html:37
#: templates/email/recording/shared_data_unrecorded_team.html:27 #: templates/email/recording/shared_data_unrecorded_team.html:38
msgid "" msgid ""
"Please note: Unrecorded intervention means the compensations are unrecorded " "Please note: Unrecorded intervention means the compensations are unrecorded "
"as well." "as well."
@ -2534,13 +2578,13 @@ msgstr "Zugriff freigegeben"
msgid "the following dataset has just been shared with you" msgid "the following dataset has just been shared with you"
msgstr "der folgende Datensatz wurde soeben für Sie freigegeben " msgstr "der folgende Datensatz wurde soeben für Sie freigegeben "
#: templates/email/sharing/shared_access_given.html:17 #: templates/email/sharing/shared_access_given.html:27
#: templates/email/sharing/shared_access_given_team.html:17 #: templates/email/sharing/shared_access_given_team.html:28
msgid "This means you can now edit this dataset." msgid "This means you can now edit this dataset."
msgstr "Das bedeutet, dass Sie diesen Datensatz nun auch bearbeiten können." msgstr "Das bedeutet, dass Sie diesen Datensatz nun auch bearbeiten können."
#: templates/email/sharing/shared_access_given.html:18 #: templates/email/sharing/shared_access_given.html:28
#: templates/email/sharing/shared_access_given_team.html:18 #: templates/email/sharing/shared_access_given_team.html:29
msgid "" msgid ""
"The shared dataset appears now by default on your overview for this dataset " "The shared dataset appears now by default on your overview for this dataset "
"type." "type."
@ -2548,8 +2592,8 @@ msgstr ""
"Der freigegebene Datensatz ist nun standardmäßig in Ihrer Übersicht für den " "Der freigegebene Datensatz ist nun standardmäßig in Ihrer Übersicht für den "
"Datensatztyp im KSP gelistet." "Datensatztyp im KSP gelistet."
#: templates/email/sharing/shared_access_given.html:28 #: templates/email/sharing/shared_access_given.html:38
#: templates/email/sharing/shared_access_given_team.html:28 #: templates/email/sharing/shared_access_given_team.html:39
msgid "" msgid ""
"Please note: Shared access on an intervention means you automatically have " "Please note: Shared access on an intervention means you automatically have "
"editing access to related compensations." "editing access to related compensations."
@ -2574,13 +2618,13 @@ msgstr ""
"Ihnen wurde soeben der bearbeitende Zugriff auf den folgenden Datensatz " "Ihnen wurde soeben der bearbeitende Zugriff auf den folgenden Datensatz "
"entzogen: " "entzogen: "
#: templates/email/sharing/shared_access_removed.html:17 #: templates/email/sharing/shared_access_removed.html:27
#: templates/email/sharing/shared_access_removed_team.html:17 #: templates/email/sharing/shared_access_removed_team.html:27
msgid "However, you are still able to view the dataset content." msgid "However, you are still able to view the dataset content."
msgstr "Sie können den Datensatz aber immer noch im KSP einsehen." msgstr "Sie können den Datensatz aber immer noch im KSP einsehen."
#: templates/email/sharing/shared_access_removed.html:18 #: templates/email/sharing/shared_access_removed.html:28
#: templates/email/sharing/shared_access_removed_team.html:18 #: templates/email/sharing/shared_access_removed_team.html:28
msgid "" msgid ""
"Please use the provided search filter on the dataset`s overview pages to " "Please use the provided search filter on the dataset`s overview pages to "
"find them." "find them."
@ -2665,7 +2709,7 @@ msgstr ""
"Vergessen Sie nicht ihn anschließend wieder zu verzeichnen.\n" "Vergessen Sie nicht ihn anschließend wieder zu verzeichnen.\n"
" " " "
#: templates/form/table/generic_table_form_body.html:24 #: templates/form/table/generic_table_form_body.html:30
msgid "Fields with * are required." msgid "Fields with * are required."
msgstr "* sind Pflichtfelder." msgstr "* sind Pflichtfelder."

View File

@ -14,6 +14,16 @@
<br> <br>
<strong>{{obj_title}}</strong> <strong>{{obj_title}}</strong>
<br> <br>
<br>
{% trans 'This entry is located in' %}
<ul>
{% for municipal in municipals_names %}
<li>{{municipal}}</li>
{% empty %}
</ul>
{% trans 'Unknown - No administrative location recognized' %}
{% endfor %}
</ul>
{% trans 'This means, the responsible registration office just confirmed the correctness of this dataset.' %} {% trans 'This means, the responsible registration office just confirmed the correctness of this dataset.' %}
<br> <br>
<br> <br>

View File

@ -14,6 +14,16 @@
<br> <br>
<strong>{{obj_title}}</strong> <strong>{{obj_title}}</strong>
<br> <br>
<br>
{% trans 'This entry is located in' %}
<ul>
{% for municipal in municipals_names %}
<li>{{municipal}}</li>
{% empty %}
</ul>
{% trans 'Unknown - No administrative location recognized' %}
{% endfor %}
</ul>
{% trans 'This means, the responsible registration office just confirmed the correctness of this dataset.' %} {% trans 'This means, the responsible registration office just confirmed the correctness of this dataset.' %}
<br> <br>
<br> <br>

View File

@ -14,6 +14,16 @@
<br> <br>
<strong>"{{obj_title}}"</strong> <strong>"{{obj_title}}"</strong>
<br> <br>
<br>
{% trans 'This entry is located in' %}
<ul>
{% for municipal in municipals_names %}
<li>{{municipal}}</li>
{% empty %}
</ul>
{% trans 'Unknown - No administrative location recognized' %}
{% endfor %}
</ul>
{% trans 'If this should not have been happened, please contact us. See the signature for details.' %} {% trans 'If this should not have been happened, please contact us. See the signature for details.' %}
<br> <br>
<br> <br>

View File

@ -14,6 +14,16 @@
<br> <br>
<strong>"{{obj_title}}"</strong> <strong>"{{obj_title}}"</strong>
<br> <br>
<br>
{% trans 'This entry is located in' %}
<ul>
{% for municipal in municipals_names %}
<li>{{municipal}}</li>
{% empty %}
</ul>
{% trans 'Unknown - No administrative location recognized' %}
{% endfor %}
</ul>
{% trans 'If this should not have been happened, please contact us. See the signature for details.' %} {% trans 'If this should not have been happened, please contact us. See the signature for details.' %}
<br> <br>
<br> <br>

View File

@ -14,6 +14,16 @@
<br> <br>
<strong>"{{obj_title}}"</strong> <strong>"{{obj_title}}"</strong>
<br> <br>
<br>
{% trans 'This entry is located in' %}
<ul>
{% for municipal in municipals_names %}
<li>{{municipal}}</li>
{% empty %}
</ul>
{% trans 'Unknown - No administrative location recognized' %}
{% endfor %}
</ul>
{% trans 'This means the data is now publicly available, e.g. in LANIS' %} {% trans 'This means the data is now publicly available, e.g. in LANIS' %}
<br> <br>
<br> <br>

View File

@ -14,6 +14,16 @@
<br> <br>
<strong>"{{obj_title}}"</strong> <strong>"{{obj_title}}"</strong>
<br> <br>
<br>
{% trans 'This entry is located in' %}
<ul>
{% for municipal in municipals_names %}
<li>{{municipal}}</li>
{% empty %}
</ul>
{% trans 'Unknown - No administrative location recognized' %}
{% endfor %}
</ul>
{% trans 'This means the data is now publicly available, e.g. in LANIS' %} {% trans 'This means the data is now publicly available, e.g. in LANIS' %}
<br> <br>
<br> <br>

View File

@ -14,6 +14,16 @@
<br> <br>
<strong>"{{obj_title}}"</strong> <strong>"{{obj_title}}"</strong>
<br> <br>
<br>
{% trans 'This entry is located in' %}
<ul>
{% for municipal in municipals_names %}
<li>{{municipal}}</li>
{% empty %}
</ul>
{% trans 'Unknown - No administrative location recognized' %}
{% endfor %}
</ul>
{% trans 'This means the data is no longer publicly available.' %} {% trans 'This means the data is no longer publicly available.' %}
<br> <br>
<br> <br>

View File

@ -14,6 +14,17 @@
<br> <br>
<strong>"{{obj_title}}"</strong> <strong>"{{obj_title}}"</strong>
<br> <br>
<br>
{% trans 'This entry is located in' %}
<ul>
{% for municipal in municipals_names %}
<li>{{municipal}}</li>
{% empty %}
</ul>
{% trans 'Unknown - No administrative location recognized' %}
<br>
{% endfor %}
</ul>
{% trans 'This means the data is no longer publicly available.' %} {% trans 'This means the data is no longer publicly available.' %}
<br> <br>
<br> <br>

View File

@ -18,6 +18,16 @@
{% endif %} {% endif %}
<br> <br>
<br> <br>
{% trans 'This entry is located in' %}
<ul>
{% for municipal in municipals_names %}
<li>{{municipal}}</li>
{% empty %}
</ul>
{% trans 'Unknown - No administrative location recognized' %}
{% endfor %}
</ul>
<br>
{% trans 'Best regards' %} {% trans 'Best regards' %}
<br> <br>
KSP KSP

View File

@ -14,6 +14,16 @@
<br> <br>
<strong>"{{obj_title}}"</strong> <strong>"{{obj_title}}"</strong>
<br> <br>
<br>
{% trans 'This entry is located in' %}
<ul>
{% for municipal in municipals_names %}
<li>{{municipal}}</li>
{% empty %}
</ul>
{% trans 'Unknown - No administrative location recognized' %}
{% endfor %}
</ul>
{% trans 'This means you can now edit this dataset.' %} {% trans 'This means you can now edit this dataset.' %}
{% trans 'The shared dataset appears now by default on your overview for this dataset type.' %} {% trans 'The shared dataset appears now by default on your overview for this dataset type.' %}
<br> <br>

View File

@ -14,6 +14,17 @@
<br> <br>
<strong>"{{obj_title}}"</strong> <strong>"{{obj_title}}"</strong>
<br> <br>
<br>
{% trans 'This entry is located in' %}
<br>
<ul>
{% for municipal in municipals_names %}
<li>{{municipal}}</li>
{% empty %}
</ul>
{% trans 'Unknown - No administrative location recognized' %}
{% endfor %}
</ul>
{% trans 'This means you can now edit this dataset.' %} {% trans 'This means you can now edit this dataset.' %}
{% trans 'The shared dataset appears now by default on your overview for this dataset type.' %} {% trans 'The shared dataset appears now by default on your overview for this dataset type.' %}
<br> <br>

View File

@ -14,6 +14,16 @@
<br> <br>
<strong>"{{obj_title}}"</strong> <strong>"{{obj_title}}"</strong>
<br> <br>
<br>
{% trans 'This entry is located in' %}
<ul>
{% for municipal in municipals_names %}
<li>{{municipal}}</li>
{% empty %}
</ul>
{% trans 'Unknown - No administrative location recognized' %}
{% endfor %}
</ul>
{% trans 'However, you are still able to view the dataset content.' %} {% trans 'However, you are still able to view the dataset content.' %}
{% trans 'Please use the provided search filter on the dataset`s overview pages to find them.' %} {% trans 'Please use the provided search filter on the dataset`s overview pages to find them.' %}
<br> <br>

View File

@ -14,6 +14,16 @@
<br> <br>
<strong>"{{obj_title}}"</strong> <strong>"{{obj_title}}"</strong>
<br> <br>
<br>
{% trans 'This entry is located in' %}
<ul>
{% for municipal in municipals_names %}
<li>{{municipal}}</li>
{% empty %}
</ul>
{% trans 'Unknown - No administrative location recognized' %}
{% endfor %}
</ul>
{% trans 'However, you are still able to view the dataset content.' %} {% trans 'However, you are still able to view the dataset content.' %}
{% trans 'Please use the provided search filter on the dataset`s overview pages to find them.' %} {% trans 'Please use the provided search filter on the dataset`s overview pages to find them.' %}
<br> <br>

View File

@ -237,7 +237,7 @@ netgis.MapOpenLayers.prototype.initInteractions = function()
this.interactions[ netgis.Modes.MODIFY_FEATURES ] = this.interactions[ netgis.Modes.MODIFY_FEATURES ] =
[ [
new ol.interaction.Modify( { source: this.editLayer.getSource(), deleteCondition: ol.events.condition.doubleClick, style: this.styleModify.bind( this ) } ), new ol.interaction.Modify( { source: this.editLayer.getSource(), deleteCondition: ol.events.condition.doubleClick, style: this.styleModify.bind( this ) } ),
//new ol.interaction.DragPan(), new ol.interaction.DragPan( { condition: function( e ) { return ( e.originalEvent.which === 2 ); } } ),
new ol.interaction.MouseWheelZoom() new ol.interaction.MouseWheelZoom()
]; ];
@ -596,6 +596,27 @@ netgis.MapOpenLayers.prototype.styleModify = function( feature )
} }
); );
var geom = feature.getGeometry();
if ( geom instanceof ol.geom.Polygon )
{
var area = geom.getArea();
style.setText
(
new ol.style.Text
(
{
text: [ netgis.util.formatArea( area, true ), "4mm sans-serif" ],
font: this.labelFont,
fill: new ol.style.Fill( { color: this.client.config.styles.modify.stroke } ),
backgroundFill: new ol.style.Fill( { color: "rgba( 255, 255, 255, 0.5 )" } ),
padding: [ 2, 4, 2, 4 ]
}
)
);
}
return [ style, vertex ]; return [ style, vertex ];
}; };
@ -1169,6 +1190,8 @@ netgis.MapOpenLayers.prototype.onSingleClick = function( e )
{ {
this.editLayer.getSource().removeFeature( this.hover ); this.editLayer.getSource().removeFeature( this.hover );
this.hover = null; this.hover = null;
this.client.invoke( netgis.Events.SET_MODE, netgis.Modes.VIEW );
} }
break; break;
@ -1246,6 +1269,8 @@ netgis.MapOpenLayers.prototype.onCutFeatureDrawEnd = function( e )
this.splitMultiPolygons( this.editLayer ); this.splitMultiPolygons( this.editLayer );
this.editEventsSilent = false; this.editEventsSilent = false;
this.updateEditOutput(); this.updateEditOutput();
this.client.invoke( netgis.Events.SET_MODE, netgis.Modes.VIEW );
}; };
netgis.MapOpenLayers.prototype.onModifyFeaturesEnd = function( e ) netgis.MapOpenLayers.prototype.onModifyFeaturesEnd = function( e )
@ -1328,30 +1353,43 @@ netgis.MapOpenLayers.prototype.onDrawPointsEnd = function( e )
if ( preview ) if ( preview )
{ {
var src = this.editLayer.getSource(); var src = this.editLayer.getSource();
// Add Buffer Feature
src.addFeature( preview.clone() ); src.addFeature( preview.clone() );
//TODO: remove sketch point ? // Remove Sketch Feature
//this.editLayer.getSource().removeFeature( e.feature ); window.setTimeout
(
/*window.setTimeout( function() { function()
var features = src.getFeatures(); {
src.removeFeature( features[ features.length - 1 ] ); src.removeFeature( e.feature );
src.addFeature( preview.clone() ); },
}, 10 );*/ 10
);
/*e.preventDefault();
e.stopPropagation();
return false;*/
} }
}; };
netgis.MapOpenLayers.prototype.onDrawLinesEnd = function( e ) netgis.MapOpenLayers.prototype.onDrawLinesEnd = function( e )
{ {
var preview = this.previewLayer.getSource().getFeatures()[ 0 ]; var preview = this.previewLayer.getSource().getFeatures()[ 0 ];
if ( ! preview ) return;
var src = this.editLayer.getSource(); if ( preview )
src.addFeature( preview.clone() ); {
var src = this.editLayer.getSource();
// Add Buffer Feature
src.addFeature( preview.clone() );
// Remove Sketch Feature
window.setTimeout
(
function()
{
src.removeFeature( e.feature );
},
10
);
}
}; };
netgis.MapOpenLayers.prototype.onDrawBufferOn = function( e ) netgis.MapOpenLayers.prototype.onDrawBufferOn = function( e )

View File

@ -31,17 +31,17 @@ netgis.Toolbar.prototype.load = function()
this.toolbars[ netgis.Modes.DRAW_POINTS ] = this.createToolbar(); this.toolbars[ netgis.Modes.DRAW_POINTS ] = this.createToolbar();
this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarButton( '<i class="fas fa-times"></i><span>Punkte zeichnen:</span>', this.onToolbarClose.bind( this ) ) ); this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarButton( '<i class="fas fa-times"></i><span>Punkte zeichnen:</span>', this.onToolbarClose.bind( this ) ) );
this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarCheckbox( "Einrasten", this.onSnapChange.bind( this ) ) ); this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarCheckbox( "Einrasten", this.onSnapChange.bind( this ) ) );
//this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarCheckbox( "Puffern", this.onDrawBufferChange.bind( this ) ) ); this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarCheckbox( "Puffern", this.onDrawBufferChange.bind( this ) ) );
//this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarInput( "Radius (Meter):", bufferDefaultRadius, this.onDrawBufferRadiusChange.bind( this ) ) ); this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarInput( "Radius (Meter):", bufferDefaultRadius, this.onDrawBufferRadiusChange.bind( this ) ) );
//this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarInput( "Segmente:", bufferDefaultSegments, this.onDrawBufferSegmentsChange.bind( this ) ) ); this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarInput( "Segmente:", bufferDefaultSegments, this.onDrawBufferSegmentsChange.bind( this ) ) );
this.root.appendChild( this.toolbars[ netgis.Modes.DRAW_POINTS ] ); this.root.appendChild( this.toolbars[ netgis.Modes.DRAW_POINTS ] );
this.toolbars[ netgis.Modes.DRAW_LINES ] = this.createToolbar(); this.toolbars[ netgis.Modes.DRAW_LINES ] = this.createToolbar();
this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarButton( '<i class="fas fa-times"></i><span>Linien zeichnen:</span>', this.onToolbarClose.bind( this ) ) ); this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarButton( '<i class="fas fa-times"></i><span>Linien zeichnen:</span>', this.onToolbarClose.bind( this ) ) );
this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarCheckbox( "Einrasten", this.onSnapChange.bind( this ) ) ); this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarCheckbox( "Einrasten", this.onSnapChange.bind( this ) ) );
//this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarCheckbox( "Puffern", this.onDrawBufferChange.bind( this ) ) ); this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarCheckbox( "Puffern", this.onDrawBufferChange.bind( this ) ) );
//this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarInput( "Radius (Meter):", bufferDefaultRadius, this.onDrawBufferRadiusChange.bind( this ) ) ); this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarInput( "Radius (Meter):", bufferDefaultRadius, this.onDrawBufferRadiusChange.bind( this ) ) );
//this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarInput( "Segmente:", bufferDefaultSegments, this.onDrawBufferSegmentsChange.bind( this ) ) ); this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarInput( "Segmente:", bufferDefaultSegments, this.onDrawBufferSegmentsChange.bind( this ) ) );
this.root.appendChild( this.toolbars[ netgis.Modes.DRAW_LINES ] ); this.root.appendChild( this.toolbars[ netgis.Modes.DRAW_LINES ] );
this.showDrawBufferOptions( false ); this.showDrawBufferOptions( false );
@ -62,7 +62,7 @@ netgis.Toolbar.prototype.load = function()
this.root.appendChild( this.toolbars[ netgis.Modes.CUT_FEATURE_DRAW ] ); this.root.appendChild( this.toolbars[ netgis.Modes.CUT_FEATURE_DRAW ] );
this.toolbars[ netgis.Modes.MODIFY_FEATURES ] = this.createToolbar(); this.toolbars[ netgis.Modes.MODIFY_FEATURES ] = this.createToolbar();
this.append( this.toolbars[ netgis.Modes.MODIFY_FEATURES ], this.createToolbarButton( '<i class="fas fa-times"></i><span>Features verschieben:</span>', this.onToolbarClose.bind( this ) ) ); this.append( this.toolbars[ netgis.Modes.MODIFY_FEATURES ], this.createToolbarButton( '<i class="fas fa-times"></i><span>Feature-Eckpunkte verschieben:</span>', this.onToolbarClose.bind( this ) ) );
this.root.appendChild( this.toolbars[ netgis.Modes.MODIFY_FEATURES ] ); this.root.appendChild( this.toolbars[ netgis.Modes.MODIFY_FEATURES ] );
this.toolbars[ netgis.Modes.DELETE_FEATURES ] = this.createToolbar(); this.toolbars[ netgis.Modes.DELETE_FEATURES ] = this.createToolbar();
@ -198,6 +198,7 @@ netgis.Toolbar.prototype.createToolbarInput = function( title, value, callback )
input.setAttribute( "min", 0 ); input.setAttribute( "min", 0 );
input.value = value; input.value = value;
input.addEventListener( "change", callback ); input.addEventListener( "change", callback );
input.addEventListener( "keyup", callback );
label.appendChild( input ); label.appendChild( input );
return label; return label;
@ -266,12 +267,12 @@ netgis.Toolbar.prototype.onSetMode = function( e )
case netgis.Modes.DRAW_LINES: case netgis.Modes.DRAW_LINES:
{ {
var checkbox = this.toolbars[ netgis.Modes.DRAW_POINTS ].getElementsByTagName( "input" )[ 1 ]; var checkbox = this.toolbars[ netgis.Modes.DRAW_POINTS ].getElementsByTagName( "input" )[ 1 ];
/*
if ( checkbox.checked ) if ( checkbox.checked )
{ {
this.client.invoke( netgis.Events.DRAW_BUFFER_ON, null ); this.client.invoke( netgis.Events.DRAW_BUFFER_ON, null );
} }
*/
break; break;
} }
} }
@ -496,6 +497,20 @@ netgis.Toolbar.prototype.onDrawBufferChange = function( e )
this.client.invoke( on ? netgis.Events.DRAW_BUFFER_ON : netgis.Events.DRAW_BUFFER_OFF, null ); this.client.invoke( on ? netgis.Events.DRAW_BUFFER_ON : netgis.Events.DRAW_BUFFER_OFF, null );
this.showDrawBufferOptions( on ); this.showDrawBufferOptions( on );
// Update Buffer Values
if ( on )
{
var points = true;
if ( ! this.toolbars[ netgis.Modes.DRAW_LINES ].classList.contains( "netgis-hide" ) ) points = false;
var inputs = this.toolbars[ points ? netgis.Modes.DRAW_POINTS : netgis.Modes.DRAW_LINES ].getElementsByTagName( "input" );
var radius = Number.parseInt( inputs[ 2 ].value );
var segments = Number.parseInt( inputs[ 3 ].value );
this.client.invoke( netgis.Events.DRAW_BUFFER_RADIUS_CHANGE, radius );
this.client.invoke( netgis.Events.DRAW_BUFFER_SEGMENTS_CHANGE, segments );
}
}; };
netgis.Toolbar.prototype.onDrawBufferRadiusChange = function( e ) netgis.Toolbar.prototype.onDrawBufferRadiusChange = function( e )
@ -533,16 +548,16 @@ netgis.Toolbar.prototype.showDrawBufferOptions = function( on )
if ( on ) if ( on )
{ {
//pointsItems[ 3 ].classList.remove( "netgis-hide" ); pointsItems[ 3 ].classList.remove( "netgis-hide" );
//pointsItems[ 4 ].classList.remove( "netgis-hide" ); pointsItems[ 4 ].classList.remove( "netgis-hide" );
//linesItems[ 3 ].classList.remove( "netgis-hide" ); linesItems[ 3 ].classList.remove( "netgis-hide" );
//linesItems[ 4 ].classList.remove( "netgis-hide" ); linesItems[ 4 ].classList.remove( "netgis-hide" );
} }
else else
{ {
//pointsItems[ 3 ].classList.add( "netgis-hide" ); pointsItems[ 3 ].classList.add( "netgis-hide" );
//pointsItems[ 4 ].classList.add( "netgis-hide" ); pointsItems[ 4 ].classList.add( "netgis-hide" );
//linesItems[ 3 ].classList.add( "netgis-hide" ); linesItems[ 3 ].classList.add( "netgis-hide" );
//linesItems[ 4 ].classList.add( "netgis-hide" ); linesItems[ 4 ].classList.add( "netgis-hide" );
} }
}; };

View File

@ -190,6 +190,7 @@ netgis.util =
output = i + ( large ? " km²" : " m²" ); output = i + ( large ? " km²" : " m²" );
//NOTE: HTML Superscript / Unicode (&sup2; etc.) not supported in OL Labels //NOTE: HTML Superscript / Unicode (&sup2; etc.) not supported in OL Labels
return output; return output;
}; };

View File

@ -31,12 +31,13 @@ class Team(UuidModel, DeletableObjectMixin):
self.deleted = delete_action self.deleted = delete_action
self.save() self.save()
def send_mail_shared_access_given_team(self, obj_identifier, obj_title): def send_mail_shared_access_given_team(self, obj_identifier, obj_title, municipals_names):
""" Sends a mail to the team members in case of given shared access """ Sends a mail to the team members in case of given shared access
Args: Args:
obj_identifier (): obj_identifier (str): The entry identifier
obj_title (): obj_title (str): The entry title
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -45,14 +46,15 @@ class Team(UuidModel, DeletableObjectMixin):
users_to_notify = self.users.filter( users_to_notify = self.users.filter(
notifications__in=[UserNotificationEnum.NOTIFY_ON_SHARED_ACCESS_GAINED.value] notifications__in=[UserNotificationEnum.NOTIFY_ON_SHARED_ACCESS_GAINED.value]
) )
mailer.send_mail_shared_access_given_team(obj_identifier, obj_title, self, users_to_notify) mailer.send_mail_shared_access_given_team(obj_identifier, obj_title, self, users_to_notify, municipals_names)
def send_mail_shared_access_removed(self, obj_identifier, obj_title): def send_mail_shared_access_removed(self, obj_identifier, obj_title, municipals_names):
""" Sends a mail to the team members in case of removed shared access """ Sends a mail to the team members in case of removed shared access
Args: Args:
obj_identifier (): obj_identifier (str): The entry identifier
obj_title (): obj_title (str): The entry title
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -61,14 +63,15 @@ class Team(UuidModel, DeletableObjectMixin):
users_to_notify = self.users.filter( users_to_notify = self.users.filter(
notifications__in=[UserNotificationEnum.NOTIFY_ON_SHARED_ACCESS_REMOVED.value] notifications__in=[UserNotificationEnum.NOTIFY_ON_SHARED_ACCESS_REMOVED.value]
) )
mailer.send_mail_shared_access_removed_team(obj_identifier, obj_title, self, users_to_notify) mailer.send_mail_shared_access_removed_team(obj_identifier, obj_title, self, users_to_notify, municipals_names)
def send_mail_shared_data_unrecorded(self, obj_identifier, obj_title): def send_mail_shared_data_unrecorded(self, obj_identifier, obj_title, municipals_names):
""" Sends a mail to the team members in case of unrecorded data """ Sends a mail to the team members in case of unrecorded data
Args: Args:
obj_identifier (): obj_identifier (str): The entry identifier
obj_title (): obj_title (str): The entry title
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -77,14 +80,15 @@ class Team(UuidModel, DeletableObjectMixin):
users_to_notify = self.users.filter( users_to_notify = self.users.filter(
notifications__in=[UserNotificationEnum.NOTIFY_ON_SHARED_DATA_RECORDED.value] notifications__in=[UserNotificationEnum.NOTIFY_ON_SHARED_DATA_RECORDED.value]
) )
mailer.send_mail_shared_data_unrecorded_team(obj_identifier, obj_title, self, users_to_notify) mailer.send_mail_shared_data_unrecorded_team(obj_identifier, obj_title, self, users_to_notify, municipals_names)
def send_mail_shared_data_recorded(self, obj_identifier, obj_title): def send_mail_shared_data_recorded(self, obj_identifier, obj_title, municipals_names):
""" Sends a mail to the team members in case of unrecorded data """ Sends a mail to the team members in case of unrecorded data
Args: Args:
obj_identifier (): obj_identifier (str): The entry identifier
obj_title (): obj_title (str): The entry title
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -93,14 +97,15 @@ class Team(UuidModel, DeletableObjectMixin):
users_to_notify = self.users.filter( users_to_notify = self.users.filter(
notifications__in=[UserNotificationEnum.NOTIFY_ON_SHARED_DATA_RECORDED.value] notifications__in=[UserNotificationEnum.NOTIFY_ON_SHARED_DATA_RECORDED.value]
) )
mailer.send_mail_shared_data_recorded_team(obj_identifier, obj_title, self, users_to_notify) mailer.send_mail_shared_data_recorded_team(obj_identifier, obj_title, self, users_to_notify, municipals_names)
def send_mail_shared_data_checked(self, obj_identifier, obj_title): def send_mail_shared_data_checked(self, obj_identifier, obj_title, municipals_names):
""" Sends a mail to the team members in case of checked data """ Sends a mail to the team members in case of checked data
Args: Args:
obj_identifier (): obj_identifier (str): The entry identifier
obj_title (): obj_title (str): The entry title
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -109,7 +114,7 @@ class Team(UuidModel, DeletableObjectMixin):
users_to_notify = self.users.filter( users_to_notify = self.users.filter(
notifications__in=[UserNotificationEnum.NOTIFY_ON_SHARED_DATA_CHECKED.value] notifications__in=[UserNotificationEnum.NOTIFY_ON_SHARED_DATA_CHECKED.value]
) )
mailer.send_mail_shared_data_checked_team(obj_identifier, obj_title, self, users_to_notify) mailer.send_mail_shared_data_checked_team(obj_identifier, obj_title, self, users_to_notify, municipals_names)
def send_mail_deduction_changed(self, obj_identifier, obj_title, data_changes): def send_mail_deduction_changed(self, obj_identifier, obj_title, data_changes):
""" Sends a mail to the team members in case of changed deduction values """ Sends a mail to the team members in case of changed deduction values
@ -128,12 +133,13 @@ class Team(UuidModel, DeletableObjectMixin):
) )
mailer.send_mail_deduction_changed_team(obj_identifier, obj_title, self, data_changes, users_to_notify) mailer.send_mail_deduction_changed_team(obj_identifier, obj_title, self, data_changes, users_to_notify)
def send_mail_shared_data_deleted(self, obj_identifier, obj_title): def send_mail_shared_data_deleted(self, obj_identifier, obj_title, municipals_names):
""" Sends a mail to the team members in case of deleted data """ Sends a mail to the team members in case of deleted data
Args: Args:
obj_identifier (): obj_identifier (str): The entry identifier
obj_title (): obj_title (str): The entry title
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -142,7 +148,7 @@ class Team(UuidModel, DeletableObjectMixin):
users_to_notify = self.users.filter( users_to_notify = self.users.filter(
notifications__in=[UserNotificationEnum.NOTIFY_ON_SHARED_DATA_DELETED.value] notifications__in=[UserNotificationEnum.NOTIFY_ON_SHARED_DATA_DELETED.value]
) )
mailer.send_mail_shared_data_deleted_team(obj_identifier, obj_title, self, users_to_notify) mailer.send_mail_shared_data_deleted_team(obj_identifier, obj_title, self, users_to_notify, municipals_names)
def remove_user(self, user): def remove_user(self, user):
""" Removes a user from the team """ Removes a user from the team

View File

@ -60,12 +60,13 @@ class User(AbstractUser):
name=ETS_GROUP name=ETS_GROUP
).exists() ).exists()
def send_mail_shared_access_removed(self, obj_identifier, obj_title): def send_mail_shared_access_removed(self, obj_identifier, obj_title, municipals_names):
""" Sends a mail to the user in case of removed shared access """ Sends a mail to the user in case of removed shared access
Args: Args:
obj_identifier (): obj_identifier ():
obj_title (): obj_title ():
municipals_names ():
Returns: Returns:
@ -73,13 +74,15 @@ class User(AbstractUser):
notification_set = self.is_notification_setting_set(UserNotificationEnum.NOTIFY_ON_SHARED_ACCESS_REMOVED) notification_set = self.is_notification_setting_set(UserNotificationEnum.NOTIFY_ON_SHARED_ACCESS_REMOVED)
if notification_set: if notification_set:
mailer = Mailer() mailer = Mailer()
mailer.send_mail_shared_access_removed(obj_identifier, obj_title, self) mailer.send_mail_shared_access_removed(obj_identifier, obj_title, self, municipals_names)
def send_mail_shared_access_given(self, obj_identifier, obj_title): def send_mail_shared_access_given(self, obj_identifier, obj_title, municipals_names):
""" Sends a mail to the user in case of given shared access """ Sends a mail to the user in case of given shared access
Args: Args:
obj_identifier (): obj_identifier (str): The entry identifier
obj_title (str): The entry title
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -87,13 +90,15 @@ class User(AbstractUser):
notification_set = self.is_notification_setting_set(UserNotificationEnum.NOTIFY_ON_SHARED_ACCESS_GAINED) notification_set = self.is_notification_setting_set(UserNotificationEnum.NOTIFY_ON_SHARED_ACCESS_GAINED)
if notification_set: if notification_set:
mailer = Mailer() mailer = Mailer()
mailer.send_mail_shared_access_given(obj_identifier, obj_title, self) mailer.send_mail_shared_access_given(obj_identifier, obj_title, self, municipals_names)
def send_mail_shared_data_recorded(self, obj_identifier, obj_title): def send_mail_shared_data_recorded(self, obj_identifier, obj_title, municipals_names):
""" Sends a mail to the user in case of shared data has been recorded """ Sends a mail to the user in case of shared data has been recorded
Args: Args:
obj_identifier (): obj_identifier (str): The entry identifier
obj_title (str): The entry title
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -101,13 +106,15 @@ class User(AbstractUser):
notification_set = self.is_notification_setting_set(UserNotificationEnum.NOTIFY_ON_SHARED_DATA_RECORDED) notification_set = self.is_notification_setting_set(UserNotificationEnum.NOTIFY_ON_SHARED_DATA_RECORDED)
if notification_set: if notification_set:
mailer = Mailer() mailer = Mailer()
mailer.send_mail_shared_data_recorded(obj_identifier, obj_title, self) mailer.send_mail_shared_data_recorded(obj_identifier, obj_title, self, municipals_names)
def send_mail_shared_data_unrecorded(self, obj_identifier, obj_title): def send_mail_shared_data_unrecorded(self, obj_identifier, obj_title, municipals_names):
""" Sends a mail to the user in case of shared data has been unrecorded """ Sends a mail to the user in case of shared data has been unrecorded
Args: Args:
obj_identifier (): obj_identifier (str): The entry identifier
obj_title (str): The entry title
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -115,13 +122,15 @@ class User(AbstractUser):
notification_set = self.is_notification_setting_set(UserNotificationEnum.NOTIFY_ON_SHARED_DATA_RECORDED) notification_set = self.is_notification_setting_set(UserNotificationEnum.NOTIFY_ON_SHARED_DATA_RECORDED)
if notification_set: if notification_set:
mailer = Mailer() mailer = Mailer()
mailer.send_mail_shared_data_unrecorded(obj_identifier, obj_title, self) mailer.send_mail_shared_data_unrecorded(obj_identifier, obj_title, self, municipals_names)
def send_mail_shared_data_deleted(self, obj_identifier, obj_title): def send_mail_shared_data_deleted(self, obj_identifier, obj_title, municipals_names):
""" Sends a mail to the user in case of shared data has been deleted """ Sends a mail to the user in case of shared data has been deleted
Args: Args:
obj_identifier (): obj_identifier (str): The entry identifier
obj_title (str): The entry title
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -129,13 +138,15 @@ class User(AbstractUser):
notification_set = self.is_notification_setting_set(UserNotificationEnum.NOTIFY_ON_SHARED_DATA_DELETED) notification_set = self.is_notification_setting_set(UserNotificationEnum.NOTIFY_ON_SHARED_DATA_DELETED)
if notification_set: if notification_set:
mailer = Mailer() mailer = Mailer()
mailer.send_mail_shared_data_deleted(obj_identifier, obj_title, self) mailer.send_mail_shared_data_deleted(obj_identifier, obj_title, self, municipals_names)
def send_mail_shared_data_checked(self, obj_identifier, obj_title): def send_mail_shared_data_checked(self, obj_identifier, obj_title, municipals_names):
""" Sends a mail to the user in case of shared data has been deleted """ Sends a mail to the user in case of shared data has been deleted
Args: Args:
obj_identifier (): obj_identifier (str): The entry identifier
obj_title (str): The entry title
municipals_names (iterable): List of municipals for this entry
Returns: Returns:
@ -143,7 +154,7 @@ class User(AbstractUser):
notification_set = self.is_notification_setting_set(UserNotificationEnum.NOTIFY_ON_SHARED_DATA_CHECKED) notification_set = self.is_notification_setting_set(UserNotificationEnum.NOTIFY_ON_SHARED_DATA_CHECKED)
if notification_set: if notification_set:
mailer = Mailer() mailer = Mailer()
mailer.send_mail_shared_data_checked(obj_identifier, obj_title, self) mailer.send_mail_shared_data_checked(obj_identifier, obj_title, self, municipals_names)
def send_mail_deduction_changed(self, obj_identifier, obj_title, data_changes): def send_mail_deduction_changed(self, obj_identifier, obj_title, data_changes):
""" Sends a mail to the user in case of a changed deduction """ Sends a mail to the user in case of a changed deduction