From bd4d63259ca7f672a6b8e6fefea45f853ab8acd6 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 17 Jan 2023 13:24:02 +0100 Subject: Sheet warehouse: fix localisation --- .../templates/ishtar/sheet_warehouse.html | 30 +++++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'archaeological_warehouse/templates') diff --git a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html index 4f4cfd6ba..287bf8683 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html +++ b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html @@ -11,6 +11,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 %} @@ -95,16 +109,18 @@ {% field_flex def_div_label item.default_location_types|join:", " %} {% field_flex_full "Comment" item.comment "
" "
" %} {% include "ishtar/blocks/sheet_creation_section.html" %} - {% include "ishtar/blocks/sheet_json.html" %} + {% include "ishtar/blocks/sheet_json.html" %} - {% if item.point_2d or item.multi_polygon or item.get_address or item.get_address_complement or item.get_postal_code or item.get_town %} + {% if display_geo or item.get_address or item.get_address_complement or item.get_postal_code or item.get_town %}

{% trans "Localisation"%}

+ {% if PROFILE.locate_warehouses and display_geo %}
{% with geo_item=item %} - {% if PROFILE.locate_warehouses %}{% include "ishtar/blocks/sheet_map.html"%}{% endif %} + {% include "ishtar/blocks/sheet_map.html"%} {% endwith %}
+ {% endif %}
{% with full=True %}{% include "ishtar/blocks/sheet_address_section.html" %}{% endwith %}
@@ -236,6 +252,12 @@ {% endif %} {% endif %} + {% if not is_external and PROFILE.locate_warehouses %} +
+ {% with geo_item=item %}{% include "ishtar/blocks/sheet_geographic.html" %}{% endwith %} +
+ {% endif %} -{% endwith %} {% endwith %} {% endwith %} +{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endblock %} -- cgit v1.2.3