# 349 LANIS link improvements
* replaces 'dumb' link template with LANIS mapinterface support * adds fallback default LANIS link
This commit is contained in:
@@ -15,7 +15,8 @@ from django.urls import reverse
|
||||
|
||||
from compensation.models import AbstractCompensation, PikMixin
|
||||
from ema.managers import EmaManager
|
||||
from ema.settings import EMA_IDENTIFIER_LENGTH, EMA_IDENTIFIER_TEMPLATE
|
||||
from ema.settings import EMA_IDENTIFIER_LENGTH, EMA_IDENTIFIER_TEMPLATE, EMA_LANIS_LAYER_NAME_RECORDED, \
|
||||
EMA_LANIS_LAYER_NAME_UNRECORDED
|
||||
from ema.utils.quality import EmaQualityChecker
|
||||
from konova.models import AbstractDocument, generate_document_file_upload_path, RecordableObjectMixin, ShareableObjectMixin
|
||||
from konova.utils.message_templates import DATA_UNSHARED_EXPLANATION, DOCUMENT_REMOVED_TEMPLATE
|
||||
@@ -109,6 +110,20 @@ class Ema(AbstractCompensation, ShareableObjectMixin, RecordableObjectMixin, Pik
|
||||
"""
|
||||
return reverse("ema:share-token", args=(self.id, self.access_token))
|
||||
|
||||
def get_lanis_layer_name(self):
|
||||
""" Getter for specific LANIS/WFS object layer
|
||||
|
||||
Returns:
|
||||
|
||||
"""
|
||||
retval = None
|
||||
if self.is_recorded:
|
||||
retval = EMA_LANIS_LAYER_NAME_RECORDED
|
||||
else:
|
||||
retval = EMA_LANIS_LAYER_NAME_UNRECORDED
|
||||
|
||||
return retval
|
||||
|
||||
|
||||
class EmaDocument(AbstractDocument):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user