blob: ae8329cbe068337851f8f7b63ac04d706ffee1f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
{% spaceless %}
{% load i18n %}
{% if is_paginated %}
<div class="paginator">
{% if has_previous %}<span class="prev"><a href="{{base_url}}page={{ previous }}{{ extend_url }}" title="{% trans 'Previous'%}">« <% trans "Previous" %></a></span>{% endif %}
{% if not in_leading_range %}
{% for num in pages_outside_trailing_range %}
<span class="page"><a href="{{base_url}}page={{ num }}{{ extend_url }}" >{{ num }}</a></span>
{% endfor %}
...
{% endif %}
{% for num in page_numbers %}
{% ifequal num page %}
{% ifequal pages 1 %}
{% else %}
<span class="curr" title='<% trans "Current page" %>'>{{ num }}</span>
{% endifequal %}
{% else %}
<span class="page"><a href="{{base_url}}page={{ num }}{{ extend_url }}" title="No.{{ num }}">{{ num }}</a></span>
{% endifequal %}
{% endfor %}
{% if not in_trailing_range %}
...
{% for num in pages_outside_leading_range reversed %}
<span class="page"><a href="{{base_url}}page={{ num }}{{ extend_url }}" title="No.{{ num }}">{{ num }}</a></span>
{% endfor %}
{% endif %}
{% if has_next %}<span class="next"><a href="{{base_url}}page={{ next }}{{ extend_url }}" title="下一页">下一页 »</a></span>{% endif %}
</div>
{% endif %}
{% endspaceless %}
|