|
1
|
{% if pagination.num_pages > 1 or per_page_options %} |
|
2
|
<nav class="flex items-center justify-between border-t border-gray-700 px-2 py-3 mt-4"> |
|
3
|
<div class="flex items-center gap-4"> |
|
4
|
<span class="text-xs text-gray-500"> |
|
5
|
Page {{ pagination.number }} of {{ pagination.num_pages }} |
|
6
|
({{ pagination.count }} total) |
|
7
|
</span> |
|
8
|
{% if per_page_options %} |
|
9
|
<div class="flex items-center gap-1 text-xs text-gray-500"> |
|
10
|
<span>Show</span> |
|
11
|
{% for opt in per_page_options %} |
|
12
|
<a href="?per_page={{ opt }}{% if search %}&search={{ search|urlencode }}{% endif %}{% if extra_params %}{{ extra_params }}{% endif %}" |
|
13
|
class="px-2 py-0.5 rounded {% if per_page == opt %}bg-gray-700 text-gray-200{% else %}text-gray-500 hover:text-gray-300{% endif %}">{{ opt }}</a> |
|
14
|
{% endfor %} |
|
15
|
</div> |
|
16
|
{% endif %} |
|
17
|
</div> |
|
18
|
<div class="flex gap-1"> |
|
19
|
{% if pagination.has_previous %} |
|
20
|
<a href="?page={{ pagination.previous_page_number }}{% if per_page %}&per_page={{ per_page }}{% endif %}{% if search %}&search={{ search|urlencode }}{% endif %}{% if extra_params %}{{ extra_params }}{% endif %}" |
|
21
|
class="px-3 py-1 text-xs rounded-md bg-gray-800 text-gray-300 hover:bg-gray-700 border border-gray-700 transition-colors">Previous</a> |
|
22
|
{% endif %} |
|
23
|
{% if pagination.has_next %} |
|
24
|
<a href="?page={{ pagination.next_page_number }}{% if per_page %}&per_page={{ per_page }}{% endif %}{% if search %}&search={{ search|urlencode }}{% endif %}{% if extra_params %}{{ extra_params }}{% endif %}" |
|
25
|
class="px-3 py-1 text-xs rounded-md bg-gray-800 text-gray-300 hover:bg-gray-700 border border-gray-700 transition-colors">Next</a> |
|
26
|
{% endif %} |
|
27
|
</div> |
|
28
|
</nav> |
|
29
|
{% endif %} |
|
30
|
|