audiobooks: no prev/next buttons when only one part
authorJan Szejko <j-sz@o2.pl>
Tue, 12 Jan 2016 14:09:10 +0000 (15:09 +0100)
committerJan Szejko <j-sz@o2.pl>
Tue, 12 Jan 2016 14:09:10 +0000 (15:09 +0100)
src/catalogue/templates/catalogue/book_short.html

index a2b0a5c..7126095 100644 (file)
     </div>
   </div>
 <div>
     </div>
   </div>
 <div>
-<a class="play-prev">« {% trans "previous" %}</a>
+{% if audiobooks|length > 1 %}
+    <a class="play-prev">« {% trans "previous" %}</a>
+{% endif %}
 {% trans "Part" %} <span class="number">1</span> / {{ audiobooks|length }}
 {% trans "Part" %} <span class="number">1</span> / {{ audiobooks|length }}
-<a class="play-next">{% trans "next" %} »</a>
+{% if audiobooks|length > 1 %}
+    <a class="play-next">{% trans "next" %} »</a>
+{% endif %}
 </div>
 </div>
 
 </div>
 </div>