2022-11-29 07:20:39 +00:00
|
|
|
{% include 'partials/notify.html' %}
|
|
|
|
|
|
|
|
<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, every 3s"
|
|
|
|
hx-get="{{ list_url }}">
|
|
|
|
<thead>
|
|
|
|
<th>id</th>
|
|
|
|
<th>name</th>
|
|
|
|
<th>P/L</th>
|
|
|
|
<th>balance</th>
|
|
|
|
<th>currency</th>
|
|
|
|
</thead>
|
|
|
|
{% for item in object_list %}
|
2022-11-29 07:20:39 +00:00
|
|
|
<tr class="
|
|
|
|
{% if item.pl > 0 %}has-background-success-light
|
|
|
|
{% elif item.pl < 0 %}has-background-danger-light
|
|
|
|
{% endif %}">
|
2022-11-29 07:20:39 +00:00
|
|
|
<td>{{ item.account.id }}</td>
|
|
|
|
<td>{{ item.account.name }}</td>
|
|
|
|
<td>{{ item.pl }}</td>
|
|
|
|
<td>{{ item.balance }}</td>
|
|
|
|
<td>{{ item.currency }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
</table>
|