diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-11-16 16:42:35 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-11-16 16:43:13 +0100 |
commit | ba5ab7f9b8248aeb36a54df0f85d27d4ddd74f82 (patch) | |
tree | 0e614be5d474bc860fe86573c5c486c9fd866d49 /archaeological_warehouse/templates | |
parent | 084e8134e90f8109cd625b14337d82ac9e6247a3 (diff) | |
download | Ishtar-ba5ab7f9b8248aeb36a54df0f85d27d4ddd74f82.tar.bz2 Ishtar-ba5ab7f9b8248aeb36a54df0f85d27d4ddd74f82.zip |
Container sheet: display image when no main image is selected
Diffstat (limited to 'archaeological_warehouse/templates')
-rw-r--r-- | archaeological_warehouse/templates/ishtar/sheet_container.html | 7 |
1 files changed, 4 insertions, 3 deletions
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"> <div class="clearfix"> - {% if item.main_image %} + {% if has_image %} <div class="card float-left col-12 col-md-4"> {% include "ishtar/blocks/window_image.html" %} </div> {% endif %} - {% if item.main_image %} + {% if has_image %} <div class="float-left col-12 col-md-6 col-lg-8 text-center">{# </div>> #} {% else %} <div class="float-left col-6 col-md-3 text-center"> @@ -300,5 +301,5 @@ $(document).ready( function () { } ); </script> -{% endwith %} {% endwith %} {% endwith %} +{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endblock %} |