Project

General

Profile

« Previous | Next » 

Revision d0bd7a5a

Added by Frédéric Péters about 6 years ago

general: use gadjo template for pagination (#14939)

View differences:

corbo/templates/corbo/manage.html
36 36
    {% endfor %}
37 37
  </ul>
38 38

  
39
{% if is_paginated %}
40
<p class="paginator">
41
  {% if page_obj.number > 1 %}
42
    {% if page_obj.previous_page_number != 1 %}
43
      <a href="?page=1">1</a>
44
      ...
45
    {% endif %}
46
  {% endif %}
47
  {% if page_obj.has_previous %}
48
    <a href="?page={{ page_obj.previous_page_number }}">{{ page_obj.previous_page_number }}</a>
49
  {% endif %}
50
  <span class="this-page">
51
    {{ page_obj.number }}
52
  </span>
53
  {% if page_obj.has_next %}
54
    <a href="?page={{ page_obj.next_page_number }}">{{ page_obj.next_page_number }}</a>
55
  {% endif %}
56
  {% if page_obj.number != page_obj.paginator.num_pages %}
57
    {% if page_obj.paginator.num_pages > 1 %}
58
       {% if page_obj.next_page_number != page_obj.paginator.num_pages %}
59
         ...
60
         <a href="?page={{ page_obj.paginator.num_pages }}">{{ page_obj.paginator.num_pages }}</a>
61
       {% endif %}
62
     {% endif %}
63
   {% endif %}
64
</p>
65
{% endif %}
39
  {% include "gadjo/pagination.html" %}
66 40

  
67 41
{% else %}
68 42
<div class="big-msg-info">

Also available in: Unified diff