From c919e337bf6afff22172a4a1f03581bc389431cd Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 7 Mar 2012 23:44:52 -0600 Subject: Break out search paginator into template Signed-off-by: Dan McGee --- templates/packages/search.html | 50 ++------------------------------ templates/packages/search_paginator.html | 27 +++++++++++++++++ 2 files changed, 29 insertions(+), 48 deletions(-) create mode 100644 templates/packages/search_paginator.html (limited to 'templates') diff --git a/templates/packages/search.html b/templates/packages/search.html index 0c67b86..ae67b18 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -52,31 +52,7 @@ {% if package_list %}
- - {% if paginator %} -
- -

{{paginator.count}} packages found. - Page {{page_obj.number}} of {{paginator.num_pages}}.

- -

- {% if page_obj.has_previous %} - - {% else %} - < Prev - {% endif %} - {% if page_obj.has_next %} - - {% else %} - Next > - {% endif %} -

- -
- {% endif %} - + {% include "packages/search_paginator.html" %}
{% csrf_token %} @@ -120,29 +96,7 @@ {% endfor %}
- - {% if paginator %} -
- -

{{paginator.count}} packages found. Page {{page_obj.number}} of {{paginator.num_pages}}.

- -

- {% if page_obj.has_previous %} - - {% else %} - < Prev - {% endif %} - {% if page_obj.has_next %} - - {% else %} - Next > - {% endif %} -

- -
- {% endif %} + {% include "packages/search_paginator.html" %} {% if perms.main.change_package %}

+ {% if is_paginated %} +

{{paginator.count}} packages found. + Page {{page_obj.number}} of {{paginator.num_pages}}.

+ +
+ + {% if page_obj.has_previous %} + < Prev + {% else %} + < Prev + {% endif %} + + + {% if page_obj.has_next %} + Next > + {% else %} + Next > + {% endif %} + +
+ {% else %} +

{{ package_list.count }} packages found.

+ {% endif %} +
-- cgit v1.2.3-24-g4f1b