From 6cc3ceef90190505d1ad27aa29811b194cd13926 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 17 Jan 2023 13:42:33 +0100 Subject: Sheet container: fix localisation - fix data --- .../templates/ishtar/sheet_container.html | 32 +++++++++++++++++----- 1 file changed, 25 insertions(+), 7 deletions(-) (limited to 'archaeological_warehouse') diff --git a/archaeological_warehouse/templates/ishtar/sheet_container.html b/archaeological_warehouse/templates/ishtar/sheet_container.html index 3cc03cad1..061a3c788 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_container.html +++ b/archaeological_warehouse/templates/ishtar/sheet_container.html @@ -15,6 +15,11 @@ {% with has_documents=item.documents.count %} {% with display_documents=can_view_documents|and_:has_documents %} +{% with display_geo=item.geodata.count %} +{% with permission_change_own_geovectordata=permission_change_own_geovectordata %} +{% with permission_change_geovectordata=permission_change_geovectordata %} +{% with permission_change_geo=permission_change_own_geovectordata|or_:permission_change_geovectordata %} + {% if output != "ODT" and output != "PDF"%} {% endif %} @@ -130,9 +144,9 @@ {% endif %}{% endwith %} {% include "ishtar/blocks/sheet_creation_section.html" %} {% field_flex_full "Comment" item.comment "
" "
" %} - {% include "ishtar/blocks/sheet_json.html" %} + {% include "ishtar/blocks/sheet_json.html" %} {% with item.container_type as container_type %} {% if container_type.length or container_type.width or container_type.height or container_type.volume or container_type.reference %}

{% trans "Container type" %}

@@ -147,16 +161,14 @@ {% endif %} {% endwith %} - {% if PROFILE.locate_warehouses %} - {% if item.point_2d or item.multi_polygon %} -

{% trans "Localisation"%}

+ {% if PROFILE.locate_warehouses and display_geo %} +

{% trans "Localisation" %}

{% with geo_item=item %} - {% include "ishtar/blocks/sheet_map.html" %} + {% include "ishtar/blocks/sheet_map.html"%} {% endwith %}
{% endif %} - {% endif %}
{% endif %} + {% if not is_external and PROFILE.locate_warehouses %} +
+ {% with geo_item=item %}{% include "ishtar/blocks/sheet_geographic.html" %}{% endwith %} +
+ {% endif %}
@@ -300,5 +318,5 @@ $(document).ready( function () { } ); -{% endwith %} {% endwith %} {% endwith %} {% endwith %} +{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endblock %} -- cgit v1.2.3