-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from soehlert/topic/soehlert/sort_lists
feat(sorting): Implement sorting on our tables
- Loading branch information
Showing
11 changed files
with
278 additions
and
91 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 was deleted.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,29 +1,27 @@ | ||
{% load custom_filters %} | ||
|
||
<div class="pagination justify-content-center mb-5"> | ||
<span class="step-links"> | ||
{% if paginator_data.has_previous %} | ||
<a href="?page=1" class="btn btn-outline-primary text-white">« first</a> | ||
<a href="?page={{ paginator_data.previous_page_number }}" | ||
class="btn btn-outline-primary text-white">previous</a> | ||
{% endif %} | ||
{% for page_number in paginator_data.paginator.page_range %} | ||
{% if page_number >= paginator_data.number|subtract:"2" and page_number <= paginator_data.number|add:"2" %} | ||
{% if paginator_data.number == page_number %} | ||
<button class="btn btn-outline-primary active text-white"> | ||
<span class="current-page">{{ paginator_data.number }}</span> | ||
</button> | ||
{% else %} | ||
<a href="?page={{ page_number }}" | ||
class="btn btn-outline-primary text-white">{{ page_number }}</a> | ||
<span class="step-links"> | ||
{% if paginator_data.has_previous %} | ||
<a href="?page=1{% if request.GET.sort_by %}&sort_by={{ request.GET.sort_by }}{% endif %}" class="btn btn-outline-primary text-white">« first</a> | ||
<a href="?page={{ paginator_data.previous_page_number }}{% if request.GET.sort_by %}&sort_by={{ request.GET.sort_by }}{% endif %}" class="btn btn-outline-primary text-white">previous</a> | ||
{% endif %} | ||
{% endif %} | ||
{% endfor %} | ||
{% if paginator_data.has_next %} | ||
<a href="?page={{ paginator_data.next_page_number }}" | ||
class="btn btn-outline-primary text-white">next</a> | ||
<a href="?page={{ paginator_data.paginator.num_pages }}" | ||
class="btn btn-outline-primary text-white">last »</a> | ||
{% endif %} | ||
</span> | ||
|
||
{% for page_number in paginator_data.paginator.page_range %} | ||
{% if page_number >= paginator_data.number|subtract:"2" and page_number <= paginator_data.number|add:"2" %} | ||
{% if paginator_data.number == page_number %} | ||
<button class="btn btn-outline-primary active text-white"> | ||
<span class="current-page">{{ paginator_data.number }}</span> | ||
</button> | ||
{% else %} | ||
<a href="?page={{ page_number }}{% if request.GET.sort_by %}&sort_by={{ request.GET.sort_by }}{% endif %}" class="btn btn-outline-primary text-white">{{ page_number }}</a> | ||
{% endif %} | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{% if paginator_data.has_next %} | ||
<a href="?page={{ paginator_data.next_page_number }}{% if request.GET.sort_by %}&sort_by={{ request.GET.sort_by }}{% endif %}" class="btn btn-outline-primary text-white">next</a> | ||
<a href="?page={{ paginator_data.paginator.num_pages }}{% if request.GET.sort_by %}&sort_by={{ request.GET.sort_by }}{% endif %}" class="btn btn-outline-primary text-white">last »</a> | ||
{% endif %} | ||
</span> | ||
</div> |
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
Oops, something went wrong.