]> git.0d.be Git - panikweb.git/commitdiff
add missing slice to soundfiles displayed in main
authorFrédéric Péters <fpeters@0d.be>
Sat, 21 Nov 2020 19:32:58 +0000 (20:32 +0100)
committerFrédéric Péters <fpeters@0d.be>
Sat, 21 Nov 2020 19:32:58 +0000 (20:32 +0100)
panikweb/templates/combo/soundscell.html

index 353616bc9bf360afeb309f4d9c5ace1fef1bd39d..0044b1d3da3df1c1256e8e7a5ae72b13305d85a2 100644 (file)
@@ -28,7 +28,9 @@
   <h3 class="sectionLabel">{% firstof title cell.title %}</h3>
 
   <ul class="custom padded main-flex">
-  {% for soundfile in soundfiles %}
+  {% with count_s=count|stringformat:"s" %}
+  {% with slice_count=":"|add:count_s %}
+  {% for soundfile in soundfiles|slice:slice_count %}
     <li class="soundfile frontpage">
       <div class="content content-inline cf special">
         <a class="block cf" href="{% url 'episode-view' emission_slug=soundfile.episode.emission.slug slug=soundfile.episode.slug %}">
@@ -66,6 +68,8 @@
       </div>
     </li>
   {% endfor %}
+  {% endwith %}
+  {% endwith %}
   </ul>
 
 {% endif %}