summaryrefslogtreecommitdiff
path: root/archaeological_finds/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-12-20 19:49:52 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-01-11 17:30:46 +0100
commit330215cf864ad3a917d51d6be15d68f360c166dc (patch)
tree3ae604ef9a36c7edaac48530db753810324e5494 /archaeological_finds/templates
parent35ba8c95c9e359be0346dd163a47dd4874dd0ecb (diff)
downloadIshtar-330215cf864ad3a917d51d6be15d68f360c166dc.tar.bz2
Ishtar-330215cf864ad3a917d51d6be15d68f360c166dc.zip
Manage main image: model, auto associate default image
Diffstat (limited to 'archaeological_finds/templates')
-rw-r--r--archaeological_finds/templates/ishtar/sheet_find.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html
index 7171c3deb..cfbefa306 100644
--- a/archaeological_finds/templates/ishtar/sheet_find.html
+++ b/archaeological_finds/templates/ishtar/sheet_find.html
@@ -81,8 +81,8 @@
<div class="tab-pane fade show active" id="{{window_id}}-basefind"
role="tabpanel" aria-labelledby="{{window_id}}-basefind-tab">
- {% with nb_image=item.images.count %}
- {% if nb_image %}
+ {% with has_image=item.main_image %}
+ {% if has_image %}
<div class="clearfix">
<div class="card float-left col-12 col-md-6 col-lg-4">
{% include "ishtar/blocks/window_image.html" %}
@@ -105,12 +105,12 @@
<div class="tab-content">
{% for base_find in item.base_finds.all %}
- {% with first=forloop.first|add:nb_image %}
+ {% with first=forloop.first|add:has_image %}
{% include "ishtar/sheet_basefind.html" %}
{% endwith %}
{% endfor %}
</div>
- {% if nb_image %}
+ {% if has_image %}
</div>
{% endif %}
{% endwith %}