-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#843] Added pagination for projects list
Pagination has been added for the projects list, including a general script in utils.py that takes care of the format of the pagination so that the number of items is never bigger than 9.
- Loading branch information
1 parent
a19f78c
commit 338b6b0
Showing
4 changed files
with
65 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<ul class="pagination"> | ||
{% if page.has_previous %} | ||
<li><a href="?page={{ page.previous_page_number }}">«</a></li> | ||
{% else %} | ||
<li class="disabled"><span>«</span></li> | ||
{% endif %} | ||
{% for page_number in page_range %} | ||
{% if not page_number == '...' %} | ||
<li {% if page_number == page.number %}class="active"{% endif %}><a href="?page={{ page_number }}">{{ page_number }}</a></li> | ||
{% else %} | ||
<li class="disabled"><span>{{ page_number }}</span></li> | ||
{% endif %} | ||
{% endfor %} | ||
{% if page.has_next %} | ||
<li><a href="?page={{ page.next_page_number }}">»</a></li> | ||
{% else %} | ||
<li class="disabled"><span>»</span></li> | ||
{% endif %} | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters