mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-15 17:22:41 +02:00
feat: another batch
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{% load markdown %}
|
||||
{% load i18n %}
|
||||
<div
|
||||
class="transaction {% if transaction.type == "EX" %}expense{% else %}income{% endif %} group/transaction relative hover:z-10">
|
||||
class="transaction {% if transaction.type == "EX" %}expense{% else %}income{% endif %} group/transaction relative group-hover/transaction:z-50 hover:z-50">
|
||||
<div class="flex my-1">
|
||||
{% if not disable_selection or not dummy %}
|
||||
<label class="px-3 flex! items-center justify-center">
|
||||
@@ -135,36 +135,33 @@
|
||||
</div>
|
||||
</div>
|
||||
{% if not dummy %}
|
||||
<div>
|
||||
<div class="z-1000">
|
||||
{# Item actions#}
|
||||
<div
|
||||
class="transaction-actions absolute! left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 invisible group-hover/transaction:visible! flex flex-row card bg-base-300">
|
||||
class="card transaction-actions absolute! left-1/2 -translate-x-1/2 -translate-y-1/2 top-0 invisible group-hover/transaction:visible! flex flex-row bg-base-300">
|
||||
<div class="card-body p-1 shadow-lg flex flex-row gap-1">
|
||||
{% if not transaction.deleted %}
|
||||
<div class="tooltip" data-tip="{% translate "Edit" %}">
|
||||
<a class="btn btn-neutral btn-sm transaction-action"
|
||||
role="button"
|
||||
hx-get="{% url 'transaction_edit' transaction_id=transaction.id %}"
|
||||
hx-target="#generic-offcanvas" hx-swap="innerHTML">
|
||||
<i class="fa-solid fa-pencil fa-fw"></i></a>
|
||||
</div>
|
||||
<div class="tooltip" data-tip="{% translate "Delete" %}">
|
||||
<a class="btn btn-neutral btn-sm transaction-action"
|
||||
role="button"
|
||||
hx-delete="{% url 'transaction_delete' transaction_id=transaction.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 text-red-500"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="dropdown dropdown-end">
|
||||
<button type="button" tabindex="0" role="button" class="btn btn-neutral btn-sm transaction-action">
|
||||
<a class="btn btn-neutral btn-sm transaction-action"
|
||||
role="button"
|
||||
hx-get="{% url 'transaction_edit' transaction_id=transaction.id %}"
|
||||
hx-target="#generic-offcanvas" hx-swap="innerHTML"
|
||||
data-tippy-content="{% translate "Edit" %}">
|
||||
<i class="fa-solid fa-pencil fa-fw"></i></a>
|
||||
<a class="btn btn-neutral btn-sm transaction-action"
|
||||
role="button"
|
||||
hx-delete="{% url 'transaction_delete' transaction_id=transaction.id %}"
|
||||
hx-trigger='confirmed'
|
||||
data-tippy-content="{% translate "Delete" %}"
|
||||
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 text-error"></i>
|
||||
</a>
|
||||
<button class="btn btn-neutral btn-sm transaction-action" data-bs-toggle="dropdown" data-bs-container="body" aria-expanded="false">
|
||||
<i class="fa-solid fa-ellipsis fa-fw"></i>
|
||||
</button>
|
||||
<ul tabindex="0" class="dropdown-content menu p-2 shadow bg-base-200 rounded-box w-72 z-[1]">
|
||||
<ul class="dropdown-menu dropdown-menu-end dropdown-menu-md-start menu w-max">
|
||||
{% if transaction.account.is_untracked_by %}
|
||||
<li>
|
||||
<a class="disabled flex items-center" aria-disabled="true">
|
||||
@@ -218,7 +215,6 @@
|
||||
hx-get="{% url 'transaction_clone' transaction_id=transaction.id %}"><i
|
||||
class="fa-solid fa-clone fa-fw mr-2"></i>{% translate 'Duplicate' %}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="tooltip" data-tip="{% translate "Restore" %}">
|
||||
<a class="btn btn-secondary btn-sm transaction-action"
|
||||
|
||||
Reference in New Issue
Block a user