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_files | |
parent | 43e629c861fe5f73d4a0db94c9c49ac9592228c8 (diff) | |
download | Ishtar-32b4271ea9e7540a7613429563fffde20e57690d.tar.bz2 Ishtar-32b4271ea9e7540a7613429563fffde20e57690d.zip |
🐛 more robust filters for sheets (refs #6109)
Diffstat (limited to 'archaeological_files')
-rw-r--r-- | archaeological_files/templates/ishtar/sheet_file.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html index c29a9ebc1..3cd693320 100644 --- a/archaeological_files/templates/ishtar/sheet_file.html +++ b/archaeological_files/templates/ishtar/sheet_file.html @@ -9,7 +9,7 @@ {% block content %} {% with can_view_documents=permission_view_own_document|or_:permission_view_document %} -{% with has_documents=item.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 has_costs=item.has_equipment_costs|or_:item.has_ground_jobs|or_:item.has_jobs %} @@ -243,7 +243,7 @@ {% trans "Document for this archaeological file" as fle_docs %} {% if permission_view_own_document or permission_view_document %} - {% if item.documents.count %} + {% if has_documents %} {% dynamic_table_document fle_docs 'documents' 'files' item.pk '' output %} {% endif %} {% endif %} @@ -289,7 +289,7 @@ {% endif %} </div> <h3>{% trans "Human and technical requirements" %}</h3> - {% if item.ground_jobs.count %} + {% if item.ground_jobs.count and not item.ground_jobs_not_available%} <div class="col-12"> <h4>{% trans "Ground jobs" %}</h4> <table class="table table-striped"> @@ -341,7 +341,7 @@ </table> </div> {% endif %} - {% if item.jobs.count %} + {% if item.jobs.count and not item.jobs_not_available%} <div class="col-12"> <h4>{% trans "Post-excavation jobs" %}</h4> <table class="table table-striped"> |