fix card_multiselect filtering and quantity controls
This commit is contained in:
parent
6e4c6040bd
commit
b97ddde71c
52 changed files with 1689 additions and 2268 deletions
|
|
@ -4,31 +4,20 @@
|
|||
|
||||
{% block content %}
|
||||
<div class="container mx-auto max-w-xl mt-6">
|
||||
{# Display messages if there are any. #}
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-{{ message.tags }} mb-4">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<h1 class="text-3xl font-bold mb-4">My Friend Codes</h1>
|
||||
<h1 class="text-3xl font-bold mb-4">My Friend Codes</h1>
|
||||
|
||||
{% if friend_codes %}
|
||||
<ul class="space-y-2">
|
||||
{% for code in friend_codes %}
|
||||
<li class="flex items-center justify-between {% if user.default_friend_code and code.id == user.default_friend_code.id %}bg-green-100{% else %}bg-base-100{% endif %} p-4 rounded shadow">
|
||||
<li class="flex items-center justify-between {% if user.default_friend_code and code.id == user.default_friend_code.id %}bg-green-200 dark:bg-green-300 dark:text-base-100{% else %}bg-base-100 dark:bg-base-900 dark:text-white{% endif %} p-4 rounded shadow">
|
||||
<div>
|
||||
<span class="font-mono dark:text-base-100">{{ code.friend_code }}</span>
|
||||
<span class="font-mono">{{ code.friend_code }}</span>
|
||||
{% if user.default_friend_code and code.id == user.default_friend_code.id %}
|
||||
<span class="badge badge-success ml-2">Default</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="flex items-center space-x-2">
|
||||
{% if user.default_friend_code and code.id == user.default_friend_code.id %}
|
||||
<button type="button" class="btn btn-secondary btn-sm" disabled>Set as Default</button>
|
||||
{% else %}
|
||||
{% if user.default_friend_code and not code.id == user.default_friend_code.id %}
|
||||
<form method="post" action="{% url 'change_default_friend_code' code.id %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-secondary btn-sm">Set as Default</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue