views/admin/macro/object.html
{% macro paginate(obj, baseUrl, pageCount) %}
{% if pageCount > 1 %}
<div class="ButtonGroup">
{% for o in obj %}
{% if o.type == 'FIRST_PAGE_LINK' or o.type == 'PREVIOUS_PAGE_LINK' or o.type == 'NEXT_PAGE_LINK' or o.type == 'LAST_PAGE_LINK' %}
<a class="Button {% if o.isActive === true %}is-disabled{% endif %}" href="{{ baseUrl }}{{ o.value }}" aria-label="{{ o.type }}">
<span aria-hidden="true">
{% if o.type == 'FIRST_PAGE_LINK' %}«{% endif %}
{% if o.type == 'PREVIOUS_PAGE_LINK' %}‹{% endif %}
{% if o.type == 'NEXT_PAGE_LINK' %}›{% endif %}
{% if o.type == 'LAST_PAGE_LINK' %}»{% endif %}
</span>
</a>
{% elseif o.type == 'ELLIPSIS' %}
<a class="Button {% if o.isActive === true %}is-disabled{% endif %}" href="{{ baseUrl }}{{ o.value }}" aria-label="{{ o.type }}">
<span aria-hidden="true">…</span>
</a>
{% else %}
<a class="Button {% if o.isActive === true %}active{% endif %}" href="{{ baseUrl }}{{ o.value }}">
{{ o.value }}
</a>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endmacro %}