summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-04-16 16:40:50 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-04-16 16:40:50 +0200
commitc96c21da408852a284cc182654e545c1f6a25e89 (patch)
tree0f6b3edc67b6374cf19e1ac385c7003a7b014bfa /ishtar_common/templates
parentd862a1351a9af43b1757209c4282af8d2b2cdacb (diff)
downloadIshtar-c96c21da408852a284cc182654e545c1f6a25e89.tar.bz2
Ishtar-c96c21da408852a284cc182654e545c1f6a25e89.zip
🐛 Geo sheet: do not zoom or select point with no x, y coordinates
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/ishtar/blocks/sheet_map.html14
1 files changed, 8 insertions, 6 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/sheet_map.html b/ishtar_common/templates/ishtar/blocks/sheet_map.html
index f37213c2f..0a00a950b 100644
--- a/ishtar_common/templates/ishtar/blocks/sheet_map.html
+++ b/ishtar_common/templates/ishtar/blocks/sheet_map.html
@@ -10,6 +10,8 @@
<h4>{% trans "Geographic data" %}</h4>
<ul>{% for geodata in geodata_list %}
<li>
+ {% with coordinates=geodata.display_coordinates_3d %}
+ {% if coordinates.0 != None and coordinates.1 != None%}
<a role="link" href="#" aria-disabled="true" class="map-zoom-link"
id="map-zoom-{{geo_item.SLUG}}-{{geo_item.pk}}-{{geodata.pk}}"
data-map-id="map-{{window_id}}-{{geo_item.SLUG}}-{{geo_item.pk}}"
@@ -22,12 +24,12 @@
class="map-ol-{{geo_item.SLUG}}-{{geo_item.pk}}"
id="map-ol-{{geo_item.SLUG}}-{{geo_item.pk}}-{{geodata.pk}}"
{% if not forloop.counter0 %}checked{% endif %}
- >
+ >{% endif %}
&nbsp; <label for="map-ol-{{geo_item.SLUG}}-{{geo_item.pk}}-{{geodata.pk}}">
<strong>{% if geodata.data_type %}{{geodata.data_type}}{% else %}{{geodata.name}}{% endif %}</strong></label><br/>
- {% if geodata.geometry_type == "POINT" %}{% with coordinates=geodata.display_coordinates_3d %}
- {% if geodata.data_type %}{{geodata.name}}{% endif %}
- <br><span>
+ {% if geodata.geometry_type == "POINT" %}
+ {% if geodata.data_type %}{{geodata.name}}<br>{% endif %}
+ <span>
{% if coordinates.0 != None %}
<strong>{% trans "X:" %}</strong> {{coordinates.0}} ;
<strong>{% trans "Y:" %}</strong> {{coordinates.1}}
@@ -36,8 +38,8 @@
{% if coordinates.0 != None %}; {% endif %}
<strong>{% trans "Z:" %}</strong> {{coordinates.2}}
{% endif %}
- {% endwith %}{% if geodata.spatial_reference_system %} - ({{geodata.spatial_reference_system.label}}){% endif %}{% endif %}
- </span>
+ {% if geodata.spatial_reference_system %} - ({{geodata.spatial_reference_system.label}}){% endif %}{% endif %}
+ </span>{% endwith %}
</li>{% endfor %}
{% if geo_item.SLUG == "operation" and display_context_records %}
<li>