{# InfinitePaginator's own template already renders Previous/Next #}
{# ?all only shows every row when Django allows it (can_show_all); otherwise it still paginates #}
{% if not cl.paginator.template_name %}
{% if cl.page_num > 1 and not cl.show_all or cl.page_num > 1 and not cl.can_show_all %}
{% include "unfold/helpers/wn_page_button.html" with label=_("Previous") page=cl.page_num|add:-1 %}
{% else %}
{% include "unfold/helpers/wn_page_button.html" with label=_("Previous") page=None %}
{% endif %}
{% endif %}
{% pagination cl %}
{% if not cl.paginator.template_name %}
{% if cl.page_num < cl.paginator.num_pages and not cl.show_all or cl.page_num < cl.paginator.num_pages and not cl.can_show_all %}
{% include "unfold/helpers/wn_page_button.html" with label=_("Next") page=cl.page_num|add:1 %}
{% else %}
{% include "unfold/helpers/wn_page_button.html" with label=_("Next") page=None %}
{% endif %}
{% endif %}