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/announce_list.html
38 38
{% endfor %}
39 39
</ul>
40 40

  
41
{% if is_paginated %}
42
<p class="paginator">
43
  {% if page_obj.number > 1 %}
44
    {% if page_obj.previous_page_number != 1 %}
45
      <a href="?page=1">1</a>
46
      ...
47
    {% endif %}
48
  {% endif %}
49

  
50
  {% if page_obj.has_previous %}
51
    <a href="?page={{ page_obj.previous_page_number }}">{{ page_obj.previous_page_number }}</a>
52
  {% endif %}
53
  <span class="this-page">
54
    {{ page_obj.number }}
55
  </span>
56
  {% if page_obj.has_next %}
57
    <a href="?page={{ page_obj.next_page_number }}">{{ page_obj.next_page_number }}</a>
58
  {% endif %}
59

  
60
  {% if page_obj.number != page_obj.paginator.num_pages %}
61
    {% if page_obj.paginator.num_pages > 1 %}
62
       {% if page_obj.next_page_number != page_obj.paginator.num_pages %}
63
         ...
64
         <a href="?page={{ page_obj.paginator.num_pages }}">{{ page_obj.paginator.num_pages }}</a>
65
       {% endif %}
66
     {% endif %}
67
   {% endif %}
68
</p>
69
{% endif %}
41
{% include "gadjo/pagination.html" %}
70 42

  
71 43
{% else %}
72 44
<div class="big-msg-info">

Also available in: Unified diff