From ba5ab7f9b8248aeb36a54df0f85d27d4ddd74f82 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 16 Nov 2021 16:42:35 +0100 Subject: Container sheet: display image when no main image is selected --- archaeological_warehouse/templates/ishtar/sheet_container.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'archaeological_warehouse') diff --git a/archaeological_warehouse/templates/ishtar/sheet_container.html b/archaeological_warehouse/templates/ishtar/sheet_container.html index 737be11f6..5472d04cd 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_container.html +++ b/archaeological_warehouse/templates/ishtar/sheet_container.html @@ -10,6 +10,7 @@ {% endblock %} {% block content %} +{% with has_image=item.images.count %} {% with can_view_documents=permission_view_own_document|or_:permission_view_document %} {% with has_documents=item.documents.count %} {% with display_documents=can_view_documents|and_:has_documents %} @@ -55,12 +56,12 @@ role="tabpanel" aria-labelledby="{{window_id}}-general-tab">
- {% if item.main_image %} + {% if has_image %}
{% include "ishtar/blocks/window_image.html" %}
{% endif %} - {% if item.main_image %} + {% if has_image %}
{#
> #} {% else %}
@@ -300,5 +301,5 @@ $(document).ready( function () { } ); -{% endwith %} {% endwith %} {% endwith %} +{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endblock %} -- cgit v1.2.3