From 9a33671a0c5f788f85d23c34f880d0994789e675 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 17 Jul 2022 12:34:47 +0200 Subject: Geo - sheet: fix coordinates display --- .../templates/ishtar/blocks/sheet_coordinates.html | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'ishtar_common/templates') diff --git a/ishtar_common/templates/ishtar/blocks/sheet_coordinates.html b/ishtar_common/templates/ishtar/blocks/sheet_coordinates.html index dbcecef8c..0093ed31f 100644 --- a/ishtar_common/templates/ishtar/blocks/sheet_coordinates.html +++ b/ishtar_common/templates/ishtar/blocks/sheet_coordinates.html @@ -1,27 +1,28 @@ -{% load i18n window_field %}{% if PROFILE.mapping %} -{% if geo_item.x or geo_item.y or geo_item.z %} +{% load i18n window_field %}{% if PROFILE.mapping and geo_item.main_geodata %} +{% with geodata=geo_item.main_geodata %} +{% if geodata.cached_x or geodata.cached_z %}
{% trans "Coordinates" %}
- {% with coordinates=geo_item.display_coordinates %} + {% with coordinates=geodata.display_coordinates %} {% trans "X:"%} {{coordinates.0|default_if_none:"-"}} - {% if geo_item.estimated_error_x %} ({% trans "error:" %} {{geo_item.estimated_error_x}}){% endif %}, + {% if geodata.estimated_error_x %} ({% trans "error:" %} {{geodata.estimated_error_x}}){% endif %}, {% trans "Y:"%} {{coordinates.1|default_if_none:"-"}} - {% if geo_item.estimated_error_y %} ({% trans "error:" %} {{geo_item.estimated_error_y}}){% endif %}, + {% if geodata.estimated_error_y %} ({% trans "error:" %} {{geodata.estimated_error_y}}){% endif %}, {% endwith %} - {% trans "Z:"%} {{geo_item.z|default_if_none:"-"}} - {% if geo_item.estimated_error_z %} ({% trans "error:" %} {{geo_item.estimated_error_z}}){% endif %} - {% with srs=geo_item.display_spatial_reference_system %} + {% trans "Z:"%} {{geodata.z|default_if_none:"-"}} + {% if geodata.estimated_error_z %} ({% trans "error:" %} {{geodata.estimated_error_z}}){% endif %} + {% with srs=geodata.display_spatial_reference_system %} {% if srs %} – {{srs.label}} - {% trans "SRID"%} {{srs.srid}} {% endif %} {% endwith %}
-{% if geo_item.most_precise_geo == 'point' %} -{% trans "Point source" as point_source %} -{% field_flex_full point_source geo_item.geo_point_source %} -{% else %} -{% trans "Polygon source" as polygon_source %} -{% field_flex_full polygon_source geo_item.geo_polygon_source %} -{% endif %} +{% field_flex_full "Data type" geodata.data_type %} +{% field_flex_full "Source" geodata.source_label %} +{% field_flex_full "Name" geodata.name %} +{% field_flex_full "Origin" geodata.origin %} +{% field_flex_full "Provider" geodata.provider %} +{% field_flex_full "Comment" geodata.comment %} {% endif %} +{% endwith %} {% endif %} -- cgit v1.2.3