summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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
commitba5ab7f9b8248aeb36a54df0f85d27d4ddd74f82 (patch)
tree0e614be5d474bc860fe86573c5c486c9fd866d49
parent084e8134e90f8109cd625b14337d82ac9e6247a3 (diff)
downloadIshtar-ba5ab7f9b8248aeb36a54df0f85d27d4ddd74f82.tar.bz2
Ishtar-ba5ab7f9b8248aeb36a54df0f85d27d4ddd74f82.zip
Container sheet: display image when no main image is selected
-rw-r--r--CHANGES.md5
-rw-r--r--archaeological_warehouse/templates/ishtar/sheet_container.html7
-rw-r--r--ishtar_common/version.py4
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">
<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 %}
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():