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 --- CHANGES.md | 5 +++++ archaeological_warehouse/templates/ishtar/sheet_container.html | 7 ++++--- ishtar_common/version.py | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 88f44ccc2..3fddd5fcf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,11 @@ Ishtar changelog ================ +v3.1.42 - 2021-11-16 +-------------------- +### Bugs ### +- Container sheet: display image when no main image is selected + v3.1.41 - 2021-11-16 -------------------- ### Features ### 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 %} diff --git a/ishtar_common/version.py b/ishtar_common/version.py index 0e205919a..81eb48a37 100644 --- a/ishtar_common/version.py +++ b/ishtar_common/version.py @@ -1,5 +1,5 @@ -# 3.1.41 -VERSION = (3, 1, 41) +# 3.1.42 +VERSION = (3, 1, 42) def get_version(): -- cgit v1.2.3