]> git.0d.be Git - django-panik-combo.git/blobdiff - gallery/templates/combo/gallery.html
don't misbalance <div> when gallery is empty
[django-panik-combo.git] / gallery / templates / combo / gallery.html
index 627ab10e8675d9f5f5b9407ccd51814dacec2c75..6be3c9f22a8b134cd531da44c814602951689594 100644 (file)
@@ -7,7 +7,7 @@
 <img src="{{ im.url }}"/>
 <span>{% if image.title %}{{ image.title }}{% endif %}</span>
 </div>
-<div>
+<div> {# extra opened <div> #}
 {% endthumbnail %}
   {% endif %}
 {% thumbnail image.image "60x60" crop="50% 25%" as im %}
         {% if image.title %} title="{{image.title}}" {% endif %}/></span>
 {% endthumbnail %}
 {% endthumbnail %}
+
+  {% if forloop.last %}
+  </div> {# close extra <div> #}
+  {% endif %}
 {% endfor %}
 </div>
-</div>
 <script type="text/javascript">
 $(function() {
   var $gallery = $('#gallery-{{cell.id}}');