diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-02-06 15:24:37 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-02-19 14:45:57 +0100 |
commit | 32b4271ea9e7540a7613429563fffde20e57690d (patch) | |
tree | b99b9d116e9c0a64b18fbf3c24d32ed58db6238d /archaeological_context_records | |
parent | 43e629c861fe5f73d4a0db94c9c49ac9592228c8 (diff) | |
download | Ishtar-32b4271ea9e7540a7613429563fffde20e57690d.tar.bz2 Ishtar-32b4271ea9e7540a7613429563fffde20e57690d.zip |
🐛 more robust filters for sheets (refs #6109)
Diffstat (limited to 'archaeological_context_records')
-rw-r--r-- | archaeological_context_records/templates/ishtar/sheet_contextrecord.html | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index 5c2f46664..29d7f80c6 100644 --- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html +++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html @@ -20,15 +20,15 @@ {% with dating_list=item|m2m_listing:"datings" %} {% with can_view_documents=permission_view_own_document|or_:permission_view_document %} -{% with has_documents=item|safe_or:"documents.count" %} +{% with has_documents=item|safe_or:"documents.count|documents_list"|safe_and_not:"documents_not_available" %} {% with display_documents=can_view_documents|and_:has_documents %} -{% with display_relations=item|safe_or:"right_relations.count|left_relations.count" %} -{% with has_image=item|safe_or:"images.count" %} -{% with has_cultural_attributions=item|safe_or:"cultural_attributions.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 has_image=item|safe_or:"images.count"|safe_and_not:"images_not_available" %} +{% with has_cultural_attributions=item|safe_or:"cultural_attributions.count"|safe_and_not:"cultural_attributions_not_available" %} {% with display_interpretation=item|safe_or:"identifications.count"|or_:item.interpretation|or_:item.activity %} {% with display_datations=dating_list|or_:item.taq|or_:item.taq_estimated|or_:item.tpq|or_:item.tpq_estimated|or_:has_cultural_attributions %} {% with can_view_finds=permission_view_own_find|or_:permission_view_find %} -{% with has_finds=item|safe_or:"base_finds.count" %} +{% with has_finds=item|safe_or:"base_finds.count"|safe_and_not:"base_finds_not_available" %} {% with display_finds=has_finds|and_:can_view_finds %} {% with display_data=item.data %} @@ -287,7 +287,7 @@ role="tabpanel" aria-labelledby="{{window_id}}-finds-tab"> {% trans "Finds" as finds %} - {% if item.all_base_finds.count %} + {% if item.all_base_finds.count and not item.base_finds_not_available %} {% dynamic_table_document finds 'finds_for_cr' 'all_base_finds__context_record' item.pk 'TABLE_COLS_FOR_CR' output %} {% else %} <div class="alert alert-info"> |