summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-01-08 16:01:39 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-02-05 10:56:43 +0100
commit2d08645c3245c467ea55af70f5cd5dcc74e4b74a (patch)
treeaf86ebf24a31c4c7d592d66dbe732e9b856ca99c /ishtar_common
parent3025359e8eb25136a30fe48690dca1ed605d5784 (diff)
downloadIshtar-2d08645c3245c467ea55af70f5cd5dcc74e4b74a.tar.bz2
Ishtar-2d08645c3245c467ea55af70f5cd5dcc74e4b74a.zip
🐛 Geo sheet: do not zoom or select point with no x, y coordinates
Diffstat (limited to 'ishtar_common')
-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>