{% load propeller %}
{% with bpurl=propeller_pagination_url|default:'' %}

    <ul class="{{ pagination_css_classes }}">

        {% if current_page == 1 %}
            <li class="prev disabled"><a>&laquo;</a></li>
        {% else %}
            <li class="prev">
                <a href="{% propeller_url_replace_param bpurl parameter_name 1 %}">&laquo;</a>
            </li>
        {% endif %}

        {% if pages_back %}
            <li>
                <a href="{% propeller_url_replace_param bpurl parameter_name pages_back %}">&hellip;</a>
            </li>
        {% endif %}

        {% for p in pages_shown %}
            {% if current_page == p %}
                <li class="active">
                    <a>{{ p }}</a>
                </li>
            {% else %}
                <li>
                    <a href="{% propeller_url_replace_param bpurl parameter_name p %}">{{ p }}</a>
                </li>
            {% endif %}
        {% endfor %}

        {% if pages_forward %}
            <li>
                <a href="{% propeller_url_replace_param bpurl parameter_name pages_forward %}">&hellip;</a>
            </li>
        {% endif %}

        {% if current_page == num_pages %}
            <li class="last disabled">
                <a>&raquo;</a>
            </li>
        {% else %}
            <li class="last">
                <a href="{% propeller_url_replace_param bpurl parameter_name num_pages %}">&raquo;</a>
            </li>
        {% endif %}

    </ul>

{% endwith %}
