Fix pagination controls, move mixin to common app, fix pagination invocation on all views, and other random bug fixes
This commit is contained in:
parent
7edefe23c3
commit
6a61b79bbe
425 changed files with 51656 additions and 243 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{% load trade_offer_tags %}
|
||||
{% if trade_offers %}
|
||||
<div class="flex flex-col">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
{% for offer in trade_offers %}
|
||||
<div class="mb-4">
|
||||
{% render_trade_offer offer %}
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
{% load trade_offer_tags %}
|
||||
{% if trade_offers %}
|
||||
<div class="grid grid-cols-1 gap-4">
|
||||
{% for offer in trade_offers %}
|
||||
<div class="mb-4">
|
||||
{% render_trade_offer offer %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="flex justify-between items-center mt-4">
|
||||
{% if trade_offers.has_previous %}
|
||||
<button type="button" class="btn btn-sm" @click="$dispatch('change-page', { page: {{ trade_offers.previous_page_number }} })">Previous</button>
|
||||
{% else %}
|
||||
<span></span>
|
||||
{% endif %}
|
||||
{% if trade_offers.paginator.num_pages > 1 %}
|
||||
<span class="text-sm">Page {{ trade_offers.number }} of {{ trade_offers.paginator.num_pages }}</span>
|
||||
{% endif %}
|
||||
{% if trade_offers.has_next %}
|
||||
<button type="button" class="btn btn-sm" @click="$dispatch('change-page', { page: {{ trade_offers.next_page_number }} })">Next</button>
|
||||
{% else %}
|
||||
<span></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="text-gray-500">No trade offers found.</p>
|
||||
{% endif %}
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
</div>
|
||||
|
||||
<!-- Trade Offers sections -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
||||
<div class="flex flex-col gap-8">
|
||||
|
||||
<!-- Trade Offers: Have -->
|
||||
<div x-data="{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue