Remove some useless buttons

This commit is contained in:
Mark Veidemanis 2022-12-02 07:20:37 +00:00
parent 077768975d
commit 5aac60a7ee
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
3 changed files with 21 additions and 12 deletions

View File

@ -1,5 +1,7 @@
<div id="notification">
{% if message is not None %}
<div class="notification is-{{ class }}" hx-ext="remove-me" remove-me="3s">
{{ message }}
</div>
{% endif %}
</div>

View File

@ -1,5 +1,11 @@
{% include 'partials/notify.html' %}
<table class="table is-fullwidth is-hoverable" id="positions-table">
<table
class="table is-fullwidth is-hoverable"
hx-target="#{{ context_object_name }}-table"
id="{{ context_object_name }}-table"
hx-swap="outerHTML"
hx-trigger="{{ context_object_name_singular }}Event from:body"
hx-get="{{ list_url }}">
<thead>
<th>account</th>
<th>asset</th>
@ -36,7 +42,7 @@
<td>{{ item.trade_ids|length }}</td>
<td>
<div class="buttons">
<button
<!-- <button
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-get="#"
hx-trigger="click"
@ -47,12 +53,13 @@
<i class="fa-solid fa-pencil"></i>
</span>
</span>
</button>
</button> -->
<button
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-delete="#trade-close-confirm"
hx-delete="{% url 'position_action' side=item.side account_id=item.account_id symbol=item.symbol %}"
hx-trigger="click"
hx-target="#positions-table"
hx-target="#notification"
hx-swap="outerHTML"
hx-confirm="Are you sure you wish to close {{ item.symbol }}?"
class="button is-danger">
<span class="icon-text">

View File

@ -65,7 +65,7 @@
</span>
</span>
</button>
{% if type == 'page' %}
<!-- {% if type == 'page' %}
<a href="#"><button
class="button is-success">
<span class="icon-text">
@ -89,7 +89,7 @@
</span>
</span>
</button>
{% endif %}
{% endif %} -->
</div>
</td>
</tr>