summaryrefslogtreecommitdiff
path: root/templates/macros/pagination.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/macros/pagination.html')
-rw-r--r--templates/macros/pagination.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/templates/macros/pagination.html b/templates/macros/pagination.html
new file mode 100644
index 0000000..077cc5a
--- /dev/null
+++ b/templates/macros/pagination.html
@@ -0,0 +1,15 @@
+{% macro render_pagination(pagination) %}
+ <div class="pagination">
+ {% if pagination.has_prev %}
+ <a href="{{ pagination.prev|url }}">&laquo; Previous</a>
+ {% else %}
+ <span class="disabled">&laquo; Previous</span>
+ {% endif %}
+ | {{ pagination.page }} |
+ {% if pagination.has_next %}
+ <a href="{{ pagination.next|url }}">Next &raquo;</a>
+ {% else %}
+ <span class="disabled">Next &raquo;</span>
+ {% endif %}
+ </div>
+{% endmacro %}