From 32b4271ea9e7540a7613429563fffde20e57690d Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 6 Feb 2025 15:24:37 +0100 Subject: 🐛 more robust filters for sheets (refs #6109) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/ishtar/sheet_operation.html | 23 +++++++++++----------- .../templates/ishtar/sheet_site.html | 6 +++--- 2 files changed, 15 insertions(+), 14 deletions(-) (limited to 'archaeological_operations') diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index a74c78ab1..86c425979 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -24,17 +24,18 @@ {% with permission_change_geo=permission_change_own_geovectordata|or_:permission_change_geovectordata %} {% with display_data=item.data %} -{% with display_relations=item|safe_or:"right_relations.count|left_relations.count" %} +{% with display_relations=item|safe_or:"right_relations.count|left_relations.count"|safe_and_not:"right_relations_not_available"|safe_and_not:"left_relations_not_available" %} {% with display_sites=item|safe_or:"archaeological_sites.count|grouped_parcels|administrative_act.count|archaeological_sites_list" %} {% with perm_documents=permission_view_own_document|or_:permission_view_document %} -{% with has_documents=item|safe_or:"documents.count|documents_list" %} +{% with has_documents=item|safe_or:"documents.count|documents_list"|safe_and_not:"documents_not_available" %} {% with display_documents=perm_documents|and_:has_documents %} {% with perm_context_records=permission_view_own_contextrecord|or_:permission_view_contextrecord %} -{% with has_context_records=item|safe_or:"context_record.count" %} +{% with has_context_records=item|safe_or:"context_record.count"|safe_and_not:"context_record_not_available" %} {% with display_context_records=perm_context_records|and_:has_context_records %} {% with perm_find=permission_view_own_find|or_:permission_view_find %} {% with has_finds=item|safe_or:"has_finds" %} {% with display_finds=perm_find|and_:has_finds %} +{% with has_image=item|safe_or:"images.count"|safe_and_not:"images_not_available" %} {% if output != "ODT" and output != "PDF" %}