Added more granular control over the default template output, and also got a handle...
authorfloguy <floguy@7f1efe38-554e-0410-b69d-834cb44da2d5>
Fri, 30 May 2008 03:38:49 +0000 (03:38 +0000)
committerfloguy <floguy@7f1efe38-554e-0410-b69d-834cb44da2d5>
Fri, 30 May 2008 03:38:49 +0000 (03:38 +0000)
git-svn-id: https://django-pagination.googlecode.com/svn/trunk@9 7f1efe38-554e-0410-b69d-834cb44da2d5

pagination/templates/pagination/pagination.html

index fbb678d..631075a 100644 (file)
@@ -1,25 +1,7 @@
 {% if is_paginated %}
 <div class="pagination">
-    {% if page_obj.has_previous %}
-        <a href="?page={{ page_obj.previous_page_number }}">&lsaquo;&lsaquo; previous</a>
-    {% else %}
-        <span class="disabled">&lsaquo;&lsaquo; previous</span>
-    {% endif %}
-    {% for page in pages %}
-        {% if page %}
-            {% ifequal page page_obj.number %}
-                <span class="current">{{ page }}</span>
-            {% else %}
-                <a href="?page={{ page }}{% if q %}&amp;q={{ q }}{% endif %}">{{ page }}</a>
-            {% endifequal %}
-        {% else %}
-        ...
-        {% endif %}
-    {% endfor %}
-    {% if page_obj.has_next %}
-        <a href="?page={{ page_obj.next_page_number }}">next &rsaquo;&rsaquo;</a>
-    {% else %}
-        <span class="disabled">next &rsaquo;&rsaquo;</span>
-    {% endif %}
+    {% if page_obj.has_previous %}<a href="?page={{ page_obj.previous_page_number }}" class="prev">&lsaquo;&lsaquo; previous</a> {% else %}<span class="disabled prev">&lsaquo;&lsaquo; previous</span> {% endif %}
+    {% for page in pages %}{% if page %}{% ifequal page page_obj.number %}<span class="current page">{{ page }}</span> {% else %}<a href="?page={{ page }}" class="page">{{ page }}</a> {% endifequal %}{% else %} ... {% endif %}{% endfor %}
+    {% if page_obj.has_next %}<a href="?page={{ page_obj.next_page_number }}" class="next">next &rsaquo;&rsaquo;</a>{% else %}<span class="disabled next">next &rsaquo;&rsaquo;</span>{% endif %}
 </div>
 {% endif %}
\ No newline at end of file