Nekrocuck
This commit is contained in:
25
templates/macros/pagination.html
Normal file
25
templates/macros/pagination.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{% macro pagination(base, pages, current) %}
|
||||
<div class="pagination box inline-block">
|
||||
{% if current == 1 %}
|
||||
[Předchozí]
|
||||
{% else %}
|
||||
[<a href="{{ base }}?page={{ current - 1 }}">Předchozí</a>]
|
||||
{% endif %}
|
||||
 
|
||||
|
||||
{% for page in 1..(pages + 1) %}
|
||||
{% if page == current %}
|
||||
[<b><a href="{{ base }}?page={{ page }}">{{ page }}</a></b>]
|
||||
{% else %}
|
||||
[<a href="{{ base }}?page={{ page }}">{{ page }}</a>]
|
||||
{% endif %}
|
||||
 
|
||||
{% endfor %}
|
||||
|
||||
{% if current == pages %}
|
||||
[Další]
|
||||
{% else %}
|
||||
[<a href="{{ base }}?page={{ current + 1 }}">Další</a>]
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user