diff options
Diffstat (limited to 'archaeological_warehouse')
-rw-r--r-- | archaeological_warehouse/templates/ishtar/sheet_container.html | 12 | ||||
-rw-r--r-- | archaeological_warehouse/templates/ishtar/sheet_warehouse.html | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/archaeological_warehouse/templates/ishtar/sheet_container.html b/archaeological_warehouse/templates/ishtar/sheet_container.html index c34e5de7c..a3acd20e7 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_container.html +++ b/archaeological_warehouse/templates/ishtar/sheet_container.html @@ -10,9 +10,9 @@ {% endblock %} {% block content %} -{% with has_image=item.images.count %} +{% with has_image=item|safe_or:"images.count"|safe_and_not:"images_not_available" %} {% 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 permission_change_own_geovectordata=permission_change_own_geovectordata %} @@ -69,7 +69,7 @@ role="tabpanel" aria-labelledby="{{window_id}}-general-tab"> <div class="clearfix"> - {% if has_image %} + {% if has_image and item.images.count %} <div class="card float-left col-12 col-md-4"> {% include "ishtar/blocks/window_image.html" %} </div> @@ -186,19 +186,19 @@ role="tabpanel" aria-labelledby="{{window_id}}-content-tab"> {% if item.container_content.count or item.children.count or item.contained_documents.count %} - {% if item.children.count %} + {% if item.children.count and not item.children_not_available %} <h4>{% trans "Divisions" %}</h4> {% dynamic_table_document '' 'divisions' 'container_tree_child__container_parent__id' item.pk 'TABLE_COLS' output %} <h4>{% trans "Containers" %}</h4> {% dynamic_table_document '' 'non-divisions' 'container_tree_child__container_parent__id' item.pk 'TABLE_COLS' output %} {% endif %} - {% if item.container_content.count %} + {% if item.container_content.count and not item.container_content_not_available %} <h4>{% trans "Finds" %}</h4> {% dynamic_table_document '' 'finds_inside_container' 'container' item.pk 'TABLE_COLS' output 'large' %} {% endif %} - {% if item.contained_documents.count %} + {% if item.contained_documents.count and not item.contained_documents_not_available %} {% trans "Documents" as document_lbl %} {% dynamic_table_document document_lbl 'documents' 'container_id' item.pk 'TABLE_COLS' output 'large' %} {% endif %} diff --git a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html index 377f3a5d3..68e0c0174 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html +++ b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html @@ -8,7 +8,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 permission_change_own_geovectordata=permission_change_own_geovectordata %} @@ -138,7 +138,7 @@ <div class="tab-pane fade" id="{{window_id}}-content" role="tabpanel" aria-labelledby="{{window_id}}-content-tab"> - {% if item.containers.count %} + {% if item.containers.count and not item.containers_not_available %} <h4>{% trans "Divisions" %}</h4> {% dynamic_table_document '' 'divisions' 'location_id' item.pk 'TABLE_COLS' output %} <h4>{% trans "Containers" %}</h4> |