]> git.parisson.com Git - telemeta.git/commitdiff
fix search criteria for paginator
authoryomguy <yomguy@parisson.com>
Fri, 6 May 2011 12:23:43 +0000 (14:23 +0200)
committeryomguy <yomguy@parisson.com>
Fri, 6 May 2011 12:23:43 +0000 (14:23 +0200)
telemeta/htdocs/images/user_red.png
telemeta/templates/telemeta_default/inc/collection_list.html
telemeta/templates/telemeta_default/paginator.html
telemeta/templatetags/paginator.py

index 91ecf5bf2ad6edecbb6beebd6be6ef1e6d103f9b..7fafb7a75bf4690dc7aa5c0382de7a51d4eb19d3 100644 (file)
Binary files a/telemeta/htdocs/images/user_red.png and b/telemeta/htdocs/images/user_red.png differ
index 6f8a6eb986c536f589a00896d2aac8fa5e798395..a21474c70c1d78db1b81df370e93c05c166f9178 100644 (file)
@@ -2,6 +2,7 @@
 {% load i18n %}
 {% if collections %}
 {% if hits %}
+
 <p class="pagination">
 {% blocktrans %}Collections {{ first_on_page }} to {{ last_on_page }} on {{ hits }}{% endblocktrans %}
 | Pages : {% if pages == 1 %}1{% else %}{% if is_paginated %}{% load paginator %}{% paginator 5 %}{% endif %}{% endif %}
index 415d5fa2539ab99ab51daed3c6656350a46987b9..e47187d6d8cadc7415a562a803abad4e02ad498b 100644 (file)
@@ -1,7 +1,8 @@
+{% load telemeta_utils %}
 {% load i18n %}
 
 {% if has_previous %}
-    <a href="?page={{ previous }}">&lt; {% trans "Previous" %}</a>
+    <a href="?page={{ previous }}&amp;{{ criteria|build_query_string }}">&lt; {% trans "Previous" %}</a>
 {% endif %}
 
 {% if show_first %}
@@ -11,7 +12,7 @@
     {% ifequal linkpage page %}
         {{ page }}
     {% else %}
-        <a href="?page={{ linkpage }}">{{ linkpage }}</a>
+        <a href="?page={{ linkpage }}&amp;{{ criteria|build_query_string }}">{{ linkpage }}</a>
     {% endifequal %}
 {% endfor %}
 {% if show_last %}
@@ -19,5 +20,5 @@
     <a href="?page=last">{{ pages }}</a>
 {% endif %}
 {% if has_next %}
-    <a href="?page={{ next }}">{% trans "Next" %} &gt;</a>
+    <a href="?page={{ next }}&amp;{{ criteria|build_query_string }}">{% trans "Next" %} &gt;</a>
 {% endif %}
index 65d1b96e0f20669d4ace40646685b369cbb47f4b..1db6e8c6a41255afcf47a6786c98737a9e8b1542 100644 (file)
@@ -37,6 +37,7 @@ def paginator(context, adjacent_pages=2):
         'has_previous': context['has_previous'],
         'show_first': 1 not in page_numbers,
         'show_last': context['pages'] not in page_numbers,
+        'criteria' : context['criteria'], 
     }
 
 register.inclusion_tag('telemeta/paginator.html', takes_context=True)(paginator)