diff options
| author | 2019-04-08 14:06:11 +0100 | |
|---|---|---|
| committer | 2019-04-08 14:06:11 +0100 | |
| commit | 027475779bfa7db50a1c1ff9935bcb546b33f961 (patch) | |
| tree | 1782c502797f4e1cea5a876dcb4b51f99e4a8ba1 /pydis_site/templates/wiki/includes/pagination.html | |
| parent | Remove wiki host, use /wiki - Also some wiki config (diff) | |
Add base templates for django-wiki, as provided
Diffstat (limited to 'pydis_site/templates/wiki/includes/pagination.html')
| -rw-r--r-- | pydis_site/templates/wiki/includes/pagination.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pydis_site/templates/wiki/includes/pagination.html b/pydis_site/templates/wiki/includes/pagination.html new file mode 100644 index 00000000..6e7ec608 --- /dev/null +++ b/pydis_site/templates/wiki/includes/pagination.html @@ -0,0 +1,24 @@ +{% load i18n %} +{% if is_paginated %} +<ul class="pagination"> + {% if page_obj.has_previous %} + <li><a class="prev btn btn-info" href="?{% if search_query %}q={{ search_query }}&{% endif %}page={{ page_obj.previous_page_number }}{% if appended_key %}&{{ appended_key }}={{ appended_value }}{% endif %}">«</a></li> + {% else %} + <li class="disabled"><span>«</span></li> + {% endif %} + + {% for pc in paginator.page_range %} + {% if pc == 0 %} + <li class="disabled"><span>...</span></li> + {% else %} + <li class="{% if pc == page_obj.number %} active{% endif %}"><a href="?{% if search_query %}q={{ search_query }}&{% endif %}page={{ pc }}{% if appended_key %}&{{ appended_key }}={{ appended_value }}{% endif %}">{{ pc }}</a></li> + {% endif %} + {% endfor %} + + {% if page_obj.has_next %} + <li><a class="next btn btn-info" href="?{% if search_query %}q={{ search_query }}&{% endif %}page={{ page_obj.next_page_number }}{% if appended_key %}&{{ appended_key }}={{ appended_value }}{% endif %}">»</a></li> + {% else %} + <li class="disabled"><span>»</span></li> + {% endif %} +</ul> +{% endif %} |