summaryrefslogtreecommitdiffstats
path: root/templates/paginator.html
diff options
context:
space:
mode:
authorMike Chen <chagel@gmail.com>2009-07-05 10:23:30 +0800
committerMike Chen <chagel@gmail.com>2009-07-05 10:23:30 +0800
commit4347c2947834fe7f2edf2b457b2d513454fc6a03 (patch)
tree93e9d22d6fb8a6c882e3915a8511a3ac542a1e67 /templates/paginator.html
downloadaskbot-4347c2947834fe7f2edf2b457b2d513454fc6a03.tar.gz
askbot-4347c2947834fe7f2edf2b457b2d513454fc6a03.tar.bz2
askbot-4347c2947834fe7f2edf2b457b2d513454fc6a03.zip
initiliaze git rep
Diffstat (limited to 'templates/paginator.html')
-rw-r--r--templates/paginator.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/templates/paginator.html b/templates/paginator.html
new file mode 100644
index 00000000..3e8bd856
--- /dev/null
+++ b/templates/paginator.html
@@ -0,0 +1,35 @@
+{% spaceless %}
+{% if is_paginated %}
+<div class="paginator">
+{% if has_previous %}<span class="prev"><a href="{{base_url}}page={{ previous }}{{ extend_url }}" title="上一页">&laquo; 上一页</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="当前页">{{ num }}</span>
+ {% endifequal %}
+ {% else %}
+ <span class="page"><a href="{{base_url}}page={{ num }}{{ extend_url }}" title="第{{ 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="第{{ num }}页">{{ num }}</a></span>
+ {% endfor %}
+{% endif %}
+
+{% if has_next %}<span class="next"><a href="{{base_url}}page={{ next }}{{ extend_url }}" title="下一页">下一页 &raquo;</a></span>{% endif %}
+</div>
+{% endif %}
+
+{% endspaceless %} \ No newline at end of file