{# This file was part of Flask-Bootstrap and was modified under the terms of
its BSD License. Copyright (c) 2013, Marc Brinkmann. All rights reserved. #}
{% from 'base/utils.html' import arg_url_for %}
{% macro render_pager(pagination,
fragment='',
prev=('← Previous')|safe,
next=('Next →')|safe,
align='') -%}
{%- endmacro %}
{% macro render_pagination(pagination,
endpoint=None,
prev=('«')|safe,
next=('»')|safe,
size=None,
ellipses='…',
args={},
fragment='',
align=''
)-%}
{% if fragment != '' and not fragment.startswith('#') %}{% set fragment = '#' + fragment %}{% endif %}
{% with url_args = {} %}
{%- do url_args.update(request.view_args if not endpoint else {}),
url_args.update(request.args if not endpoint else {}),
url_args.update(args) -%}
{% with endpoint = endpoint or request.endpoint %}
{% endwith %}
{% endwith %}
{% endmacro %}