Add pagination controls to hero buttons
This commit is contained in:
parent
5d7d84249b
commit
fcbdb248fa
2 changed files with 14 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
{% extends "common/content_page.html" %}
|
||||
|
||||
{% load wagtailroutablepage_tags %}
|
||||
{% load wagtailroutablepage_tags wagtailadmin_tags %}
|
||||
|
||||
{% block extra_head %}
|
||||
{{ block.super }}
|
||||
|
@ -9,6 +9,15 @@
|
|||
|
||||
{% block hero_buttons %}
|
||||
<a class="button is-radiusless" href="{% routablepageurl page 'feed' %}" title="View feed"><i class="fas fa-rss" aria-hidden="true"></i></a>
|
||||
|
||||
{% if listing_pages.has_previous %}
|
||||
<a class="button is-radiusless" href="{% querystring page=listing_pages.previous_page_number %}" title="Previous page"><i class="fas fa-arrow-left" aria-hidden="true"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if listing_pages.has_next %}
|
||||
<a class="button is-radiusless" href="{% querystring page=listing_pages.next_page_number %}" title="Next page"><i class="fas fa-arrow-right" aria-hidden="true"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
|
||||
{% if page.has_previous %}
|
||||
<a class="pagination-previous" href="{% querystring page=page.previous_page_number %}">←</a>
|
||||
<a class="pagination-previous" href="{% querystring page=page.previous_page_number %}"><i class="fas fa-arrow-left" aria-hidden="true"></i></a>
|
||||
{% else %}
|
||||
<span class="pagination-previous is-disabled">←</span>
|
||||
<span class="pagination-previous is-disabled"><i class="fas fa-arrow-left" aria-hidden="true"></i></span>
|
||||
{% endif %}
|
||||
|
||||
{% if page.has_next %}
|
||||
<a class="pagination-next" href="{% querystring page=page.next_page_number %}">→</a>
|
||||
<a class="pagination-next" href="{% querystring page=page.next_page_number %}"><i class="fas fa-arrow-right" aria-hidden="true"></i></a>
|
||||
{% else %}
|
||||
<span class="pagination-next is-disabled">→</span>
|
||||
<span class="pagination-next is-disabled"><i class="fas fa-arrow-right" aria-hidden="true"></i></span>
|
||||
{% endif %}
|
||||
|
||||
<ul class="pagination-list">
|
||||
|
|
Loading…
Reference in a new issue