Update tables when objects are changed
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
{% include 'partials/notify.html' %}
|
||||
|
||||
<table class="table is-fullwidth is-hoverable" id="trades-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>id</th>
|
||||
<th>status</th>
|
||||
@@ -31,6 +37,7 @@
|
||||
hx-get="{% url 'trade_update' type=type pk=item.id %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#{{ type }}s-here"
|
||||
hx-swap="innerHTML"
|
||||
class="button is-info">
|
||||
<span class="icon-text">
|
||||
<span class="icon">
|
||||
@@ -43,6 +50,7 @@
|
||||
hx-delete="{% url 'trade_delete' type=type pk=item.id %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#modals-here"
|
||||
hx-swap="innerHTML"
|
||||
class="button is-danger">
|
||||
<span class="icon-text">
|
||||
<span class="icon">
|
||||
|
||||
Reference in New Issue
Block a user