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:
@@ -122,6 +122,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
{% if geom_form.area == 0 %}
|
||||
<div class="alert alert-info">{% trans 'No geometry added, yet.' %}</div>
|
||||
{% endif %}
|
||||
{{geom_form.media}}
|
||||
{{geom_form.geom}}
|
||||
</div>
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user