mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-20 15:51:36 +02:00
77 lines
3.4 KiB
HTML
77 lines
3.4 KiB
HTML
{% load i18n %}
|
|
<div class="container px-md-3 py-3 column-gap-5">
|
|
<div class="tw-text-3xl fw-bold font-monospace tw-w-full mb-3">
|
|
{% spaceless %}
|
|
<div>{% translate 'Dollar Cost Average Strategies' %}<span>
|
|
<a class="text-decoration-none tw-text-2xl p-1 category-action"
|
|
role="button"
|
|
data-bs-toggle="tooltip"
|
|
data-bs-title="{% translate "Add" %}"
|
|
hx-get="{% url 'dca_strategy_add' %}"
|
|
hx-target="#generic-offcanvas">
|
|
<i class="fa-solid fa-circle-plus fa-fw"></i></a>
|
|
</span></div>
|
|
{% endspaceless %}
|
|
</div>
|
|
|
|
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4 gy-3 gx-3">
|
|
{% for strategy in strategies %}
|
|
<div class="col">
|
|
<div class="card h-100">
|
|
<div class="card-header">
|
|
<span class="badge rounded-pill text-bg-secondary">{{ strategy.payment_currency.name }}</span> x <span
|
|
class="badge rounded-pill text-bg-secondary">{{ strategy.target_currency.name }}</span>
|
|
</div>
|
|
<a href="{% url 'dca_strategy_detail_index' strategy_id=strategy.id %}" hx-boost="true"
|
|
class="text-decoration-none card-body">
|
|
<div class="">
|
|
<div class="card-title tw-text-xl">{{ strategy.name }}</div>
|
|
<div class="card-text tw-text-gray-400">{{ strategy.notes }}</div>
|
|
</div>
|
|
</a>
|
|
<div class="card-footer text-end">
|
|
<a class="text-decoration-none tw-text-gray-400 p-1"
|
|
role="button"
|
|
data-bs-toggle="tooltip"
|
|
data-bs-title="{% translate "Edit" %}"
|
|
hx-get="{% url 'dca_strategy_edit' strategy_id=strategy.id %}"
|
|
hx-target="#generic-offcanvas">
|
|
<i class="fa-solid fa-pencil fa-fw"></i>
|
|
</a>
|
|
<a class="text-danger text-decoration-none p-1"
|
|
role="button"
|
|
data-bs-toggle="tooltip"
|
|
data-bs-title="{% translate "Delete" %}"
|
|
hx-delete="{% url 'dca_strategy_delete' strategy_id=strategy.id %}"
|
|
hx-trigger='confirmed'
|
|
data-bypass-on-ctrl="true"
|
|
data-title="{% translate "Are you sure?" %}"
|
|
data-text="{% translate "You won't be able to revert this!" %}"
|
|
data-confirm-text="{% translate "Yes, delete it!" %}"
|
|
_="install prompt_swal">
|
|
<i class="fa-solid fa-trash fa-fw"></i>
|
|
</a>
|
|
{% if not strategy.owner %}
|
|
<a class="text-primary text-decoration-none p-1"
|
|
role="button"
|
|
data-bs-toggle="tooltip"
|
|
data-bs-title="{% translate "Take ownership" %}"
|
|
hx-get="{% url 'dca_strategy_take_ownership' strategy_id=strategy.id %}">
|
|
<i class="fa-solid fa-crown fa-fw"></i></a>
|
|
{% endif %}
|
|
{% if user == strategy.owner %}
|
|
<a class="text-primary text-decoration-none p-1"
|
|
role="button"
|
|
hx-target="#generic-offcanvas"
|
|
data-bs-toggle="tooltip"
|
|
data-bs-title="{% translate "Share" %}"
|
|
hx-get="{% url 'dca_strategy_share_settings' pk=strategy.id %}">
|
|
<i class="fa-solid fa-share fa-fw"></i></a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|