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
commit686386b1994aac7df90b12a3ab40000e02e1eda7 (patch)
tree3ae604ef9a36c7edaac48530db753810324e5494 /archaeological_finds/templates
parentfc9b4ecbba8e121e0d811a6d2e6fb64d8b27b475 (diff)
downloadIshtar-686386b1994aac7df90b12a3ab40000e02e1eda7.tar.bz2
Ishtar-686386b1994aac7df90b12a3ab40000e02e1eda7.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 %}