Fix create trade offer flow and other related bugs
This commit is contained in:
parent
f3a1366269
commit
65ca344582
40 changed files with 867 additions and 278 deletions
35
theme/templates/cards/_trade_offer_list.html
Normal file
35
theme/templates/cards/_trade_offer_list.html
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{% load trade_offer_tags %}
|
||||
{% if trade_offers %}
|
||||
<div class="flex flex-col">
|
||||
{% for offer in trade_offers %}
|
||||
<div class="mb-4">
|
||||
{% render_trade_offer offer %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if is_paginated %}
|
||||
<div class="flex justify-between items-center mt-4">
|
||||
{% if page_obj.has_previous %}
|
||||
<button type="button" class="btn btn-sm"
|
||||
@click="$dispatch('change-page-{{ side }}', { page: {{ page_obj.previous_page_number }} })">
|
||||
Previous
|
||||
</button>
|
||||
{% else %}
|
||||
<span></span>
|
||||
{% endif %}
|
||||
{% if paginator.num_pages > 1 %}
|
||||
<span class="text-sm">Page {{ page_obj.number }} of {{ paginator.num_pages }}</span>
|
||||
{% endif %}
|
||||
{% if page_obj.has_next %}
|
||||
<button type="button" class="btn btn-sm"
|
||||
@click="$dispatch('change-page-{{ side }}', { page: {{ page_obj.next_page_number }} })">
|
||||
Next
|
||||
</button>
|
||||
{% else %}
|
||||
<span></span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p class="text-gray-500">No trade offers found.</p>
|
||||
{% endif %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue