Browse Source

Add pagination buttons to top of topic listings

Only displays on pages after the first.
merge-requests/60/head
Bauke 6 years ago
committed by Deimos
parent
commit
102da4591e
  1. 20
      tildes/tildes/templates/topic_listing.jinja2

20
tildes/tildes/templates/topic_listing.jinja2

@ -113,6 +113,22 @@
</div> </div>
{% endif %} {% endif %}
{% if topics.has_prev_page %}
<div class="pagination">
{% if topics.has_prev_page %}
<a class="page-item btn" id="prev-page-top"
href="{{ request.current_listing_base_url({'before': topics.prev_page_before_id36}) }}"
>Prev</a>
{% endif %}
{% if topics.has_next_page %}
<a class="page-item btn" id="next-page-top"
href="{{ request.current_listing_base_url({'after': topics.next_page_after_id36}) }}"
>Next</a>
{% endif %}
</div>
{% endif %}
{% if not topics %} {% if not topics %}
<div class="empty"> <div class="empty">
{% if period %} {% if period %}
@ -161,13 +177,13 @@
{% if topics.has_prev_page or topics.has_next_page %} {% if topics.has_prev_page or topics.has_next_page %}
<div class="pagination"> <div class="pagination">
{% if topics.has_prev_page %} {% if topics.has_prev_page %}
<a class="page-item btn" id="prev-page"
<a class="page-item btn" id="prev-page-bottom"
href="{{ request.current_listing_base_url({'before': topics.prev_page_before_id36}) }}" href="{{ request.current_listing_base_url({'before': topics.prev_page_before_id36}) }}"
>Prev</a> >Prev</a>
{% endif %} {% endif %}
{% if topics.has_next_page %} {% if topics.has_next_page %}
<a class="page-item btn" id="next-page"
<a class="page-item btn" id="next-page-bottom"
href="{{ request.current_listing_base_url({'after': topics.next_page_after_id36}) }}" href="{{ request.current_listing_base_url({'after': topics.next_page_after_id36}) }}"
>Next</a> >Next</a>
{% endif %} {% endif %}

Loading…
Cancel
Save