From ade19f292add8de4483a593b6d49b434449e79b3 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 17 Jan 2023 13:24:02 +0100 Subject: Sheet warehouse: fix localisation --- CHANGES.md | 3 +++ .../templates/ishtar/sheet_warehouse.html | 30 +++++++++++++++++++--- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 35a7bc156..f54d5c251 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,9 @@ date: 2023-01-13 Ishtar changelog ================ +- Table: fix default sort when pk is not "id" +- Sheet warehouse: fix localisation + v4.0.34 - 2023-01-13 -------------------- 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