{% load panya_template_tags %}

{% if page_obj.has_other_pages %}
    <div class="paged_results">
        {% if page_obj.has_previous %}
            <a href="{% smart_query_string 'page' page_obj.previous_page_number %}" class="paged_prev">Previous</a>
        {% else %}
            <a style="float: left; width: 60px; padding: 0 0 0 25px;">&nbsp;</a>
        {% endif %}
	    <p>
            {% for page_number in page_obj.paginator.page_range %}
                <a href="{% smart_query_string 'page' page_number %}"{% ifequal page_obj.number page_number %}class="on"{% endifequal %}>{{ page_number }}</a>{% if not forloop.last %} | {% endif %}
            {% endfor %}
        </p>
        {% if page_obj.has_next %}
	        <a href="{% smart_query_string 'page' page_obj.next_page_number %}" class="paged_next">Next</a>
        {% endif %}
    </div><!--/paged_results-->
{% endif %}
