Changed pagination template to show disabled nav elements.

This commit is contained in:
Marcus Scholz 2020-08-16 11:56:13 +02:00
parent 42d1137dfb
commit 99fbe827c9
2 changed files with 16 additions and 0 deletions

View File

@ -264,6 +264,8 @@ body {
flex-direction: row; } flex-direction: row; }
.LP-Pagination .LP-Pagination__Item { .LP-Pagination .LP-Pagination__Item {
margin: 0 4px; } margin: 0 4px; }
.LP-Pagination .LP-Pagination__Item--disabled {
color: #b6b6b6; }
.LP-Pagination .LP-Pagination__Item--current .LP-Link { .LP-Pagination .LP-Pagination__Item--current .LP-Link {
background-color: #D7CEC7; background-color: #D7CEC7;
border-radius: 2px; } border-radius: 2px; }

View File

@ -8,6 +8,13 @@
<li class="LP-Pagination__Item LP-Pagination__Item--previous"> <li class="LP-Pagination__Item LP-Pagination__Item--previous">
<a href="?page={{ page_obj.previous_page_number }}" class="LP-Link"><span class="LP-Pagination__Previous">previous</span></a> <a href="?page={{ page_obj.previous_page_number }}" class="LP-Link"><span class="LP-Pagination__Previous">previous</span></a>
</li> </li>
{% else %}
<li class="LP-Pagination__Item LP-Pagination__Item--first LP-Pagination__Item--disabled">
<span class="LP-Pagination__First">first</span>
</li>
<li class="LP-Pagination__Item LP-Pagination__Item--previous LP-Pagination__Item--disabled">
<span class="LP-Pagination__Previous">previous</span>
</li>
{% endif %} {% endif %}
{% for i in page_obj.paginator %} {% for i in page_obj.paginator %}
{% if i.number == page_obj.number %} {% if i.number == page_obj.number %}
@ -25,6 +32,13 @@
<li class="LP-Pagination__Item LP-Pagination__Item--last"> <li class="LP-Pagination__Item LP-Pagination__Item--last">
<a href="?page={{ page_obj.paginator.num_pages }}" class="LP-Link"><span class="LP-Pagination__Last">last</span></a> <a href="?page={{ page_obj.paginator.num_pages }}" class="LP-Link"><span class="LP-Pagination__Last">last</span></a>
</li> </li>
{% else %}
<li class="LP-Pagination__Item LP-Pagination__Item--next LP-Pagination__Item--disabled">
<span class="LP-Pagination__Next">next</span>
</li>
<li class="LP-Pagination__Item LP-Pagination__Item--last LP-Pagination__Item--disabled">
<span class="LP-Pagination__Last">last</span>
</li>
{% endif %} {% endif %}
</ul> </ul>
</div> </div>