Intervention Detail View

* adds hint for empty map in case of missing geometry
* adds empty geometry workaround, so openlayers is rendered without digitalization tools
* adds translations
This commit is contained in:
mipel
2021-07-22 16:06:13 +02:00
parent a304f8d42e
commit eaa9c43afe
5 changed files with 44 additions and 31 deletions

View File

@@ -88,9 +88,6 @@ def open_view(request: HttpRequest, id: str):
intervention = get_object_or_404(Intervention, id=id)
has_access = intervention.has_access(user=request.user)
if not has_access:
messages.info(request, _("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."))
geom_form = SimpleGeomForm(
instance=intervention
)
@@ -100,6 +97,10 @@ def open_view(request: HttpRequest, id: str):
"has_access": has_access,
"geom_form": geom_form,
}
if not has_access:
messages.info(request, _("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."))
context = BaseContext(request, context).context
return render(request, template, context)