diff --git a/templates/book/index.html.twig b/templates/book/index.html.twig index a47830ac..f772ba44 100644 --- a/templates/book/index.html.twig +++ b/templates/book/index.html.twig @@ -100,26 +100,28 @@ {% endif %} {% if serie|length > 0 %}
-
Books in serie
-
- {% for index in 1..serieMax %} -
- {% if (serie[index] is not defined or serie[index]|length>1) %} - - {% if (serie[index] is not defined) %}Missing book{% endif %} - {% if (serie[index] is defined and serie[index]|length>1) %}Multiple books with same index{% endif %} - - {% endif %} - {% if serie[index] is defined %} - {% for indexBook in serie[index] %} - {% include 'book/_teaser.html.twig' with {book:indexBook} %} - {% endfor %} - {% else %} - {% include 'book/_empty.html.twig' with {serie:book.serie, index:index} %} - {% endif %} + {% if serieMax>1 %} +
Books in serie
+
+ {% for index in 1..serieMax %} +
+ {% if (serie[index] is not defined or serie[index]|length>1) %} + + {% if (serie[index] is not defined) %}Missing book{% endif %} + {% if (serie[index] is defined and serie[index]|length>1) %}Multiple books with same index{% endif %} + + {% endif %} + {% if serie[index] is defined %} + {% for indexBook in serie[index] %} + {% include 'book/_teaser.html.twig' with {book:indexBook} %} + {% endfor %} + {% else %} + {% include 'book/_empty.html.twig' with {serie:book.serie, index:index} %} + {% endif %} +
+ {% endfor %}
- {% endfor %} -
+ {% endif %} {% if serie['?'] is defined %}
Other Books