You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Hydro/packages/ui-default/templates/components/paginator.html

26 lines
1.2 KiB
HTML

{% macro render(page, num_pages, add_qs='', position='bottom') %}
{% if num_pages > 0 %}
<ul class="pager pager-{{ position }}">
{%- for type, page0 in paginate(page, num_pages) -%}
<li>
{% if type == 'first' %}
<a class="pager__item first link" href="?page={{ page0 }}{% if add_qs %}&{{ add_qs }}{% endif %}">{{ _('pager_first') }}</a>
{% elif type == 'previous' %}
<a class="pager__item previous link" href="?page={{ page0 }}{% if add_qs %}&{{ add_qs }}{% endif %}">{{ _('pager_previous') }}</a>
{% elif type == 'ellipsis' %}
<span class="pager__item ellipsis">...</span>
{% elif type == 'page' %}
<a class="pager__item page link" href="?page={{ page0 }}{% if add_qs %}&{{ add_qs }}{% endif %}">{{ page0 }}</a>
{% elif type == 'current' %}
<span class="pager__item current">{{ page0 }}</span>
{% elif type == 'next' %}
<a class="pager__item next link" href="?page={{ page0 }}{% if add_qs %}&{{ add_qs }}{% endif %}">{{ _('pager_next') }}</a>
{% elif type == 'last' %}
<a class="pager__item last link" href="?page={{ page0 }}{% if add_qs %}&{{ add_qs }}{% endif %}">{{ _('pager_last') }}</a>
{% endif %}
</li>
{%- endfor -%}
</ul>
{% endif %}
{% endmacro %}