Просмотр исходного кода

Fixed pagination bug if there are no items.
It shows now "Page: 1" instead of nothing.

sh4nks 11 лет назад
Родитель
Сommit
9939e87354
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      flaskbb/templates/macros.html

+ 2 - 0
flaskbb/templates/macros.html

@@ -183,6 +183,8 @@
                 <li class="active"><a href="#">{{ page }}</a></li>
             {% endif %}
         {% endif %}
+    {%- else -%}
+        <li class="active"><a href="#">1</a></li>
     {%- endfor %}
     {% if page_obj.has_next %}
         <li><a href="{{ url }}?page={{ page_obj.next_num }}">&raquo;</a></li>