X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=patchwork%2Ftemplates%2Fpatchwork%2Fpagination.html;fp=patchwork%2Ftemplates%2Fpatchwork%2Fpagination.html;h=3e951265ca1e93d334b6e2291bb3b58ef9f66cff;hb=ad2762cf775a8dde508de47164d6429f3fd724f1;hp=0000000000000000000000000000000000000000;hpb=f09e982f58384946111d4157fd2b7c2b31b78612;p=patchwork diff --git a/patchwork/templates/patchwork/pagination.html b/patchwork/templates/patchwork/pagination.html new file mode 100644 index 0000000..3e95126 --- /dev/null +++ b/patchwork/templates/patchwork/pagination.html @@ -0,0 +1,45 @@ +{% load listurl %} + +{% ifnotequal page.paginator.num_pages 1 %} +
+{% if page.has_previous %} + + « Previous +{% else %} + « Previous +{% endif %} + +{% if page.paginator.trailing_set %} + {% for p in page.paginator.trailing_set %} + {{ p }} + {% endfor %} + ... +{% endif %} + +{% for p in page.paginator.adjacent_set %} + {% ifequal p page.number %} + {{ p }} + {% else %} + {{ p }} + {% endifequal %} +{% endfor %} + +{% if page.paginator.leading_set %} + ... + {% for p in page.paginator.leading_set %} + {{ p }} + {% endfor %} +{% endif %} + +{% if page.has_next %} + + Next » + +{% else %} + Next » +{% endif %} +
+{% endifnotequal %}