#49 Frontend rendering
* adds rendering for detail view * adds new includable html snippet for parcel rendering * refactors generic includables in konova/ app into konova/templates/includes/... * fixes bug where parcels have been reused from the database due to wrong model structure * adds get_underlying_parcels() for Geometry model * adds get_underlying_parcels() for GeoReferencedMixin models * fixes bug where missing geometry would lead to an error during geometry conflict check * removes unused wfs attribute from AbstractWFSFetcher * adds/updates translations
This commit is contained in:
@@ -170,6 +170,7 @@ def detail_view(request: HttpRequest, id: str):
|
||||
template = "compensation/detail/compensation/view.html"
|
||||
comp = get_object_or_404(Compensation, id=id)
|
||||
geom_form = SimpleGeomForm(instance=comp)
|
||||
parcels = comp.get_underlying_parcels()
|
||||
_user = request.user
|
||||
is_data_shared = comp.intervention.is_shared_with(_user)
|
||||
|
||||
@@ -189,6 +190,7 @@ def detail_view(request: HttpRequest, id: str):
|
||||
context = {
|
||||
"obj": comp,
|
||||
"geom_form": geom_form,
|
||||
"parcels": parcels,
|
||||
"has_access": is_data_shared,
|
||||
"actions": actions,
|
||||
"before_states": before_states,
|
||||
|
||||
@@ -181,6 +181,7 @@ def detail_view(request: HttpRequest, id: str):
|
||||
id=id
|
||||
)
|
||||
geom_form = SimpleGeomForm(instance=acc)
|
||||
parcels = acc.get_underlying_parcels()
|
||||
_user = request.user
|
||||
is_data_shared = acc.is_shared_with(_user)
|
||||
|
||||
@@ -207,6 +208,7 @@ def detail_view(request: HttpRequest, id: str):
|
||||
context = {
|
||||
"obj": acc,
|
||||
"geom_form": geom_form,
|
||||
"parcels": parcels,
|
||||
"has_access": is_data_shared,
|
||||
"before_states": before_states,
|
||||
"after_states": after_states,
|
||||
|
||||
Reference in New Issue
Block a user