summaryrefslogtreecommitdiff
path: root/templates/players.j2
diff options
context:
space:
mode:
authorKaran Jayachandra <karan.jayachandra@nxp.com>2024-10-15 12:07:42 +0200
committerKaran Jayachandra <karan.jayachandra@nxp.com>2024-10-15 12:07:42 +0200
commit600b6afff3066d5fc9c4eca659f969322e670a77 (patch)
tree1bccadf85e486520d747bd1144ae98c7d0ad969b /templates/players.j2
parentccdf8fcb51a47b79d5a1c0042699b0d60c3c304c (diff)
Cleaned up the code significantly
Diffstat (limited to 'templates/players.j2')
-rw-r--r--templates/players.j24
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/players.j2 b/templates/players.j2
index 6179dbb..7a13672 100644
--- a/templates/players.j2
+++ b/templates/players.j2
@@ -1,8 +1,8 @@
<div class="fixed-grid has-5-cols">
<div class="grid">
-{% for player in players %}
+{% for id, player in players.items() %}
<div class="cell">
- <button class={% if player.status %} "button is-success" {% else %} "button is-danger" {% endif %} hx-post="{{ "/player-toggle/" ~ player.name}}" hx-trigger="click" hx-swap="outerHTML">{{ player.name }}</button>
+ <button class={% if player.status %} "button is-success" {% else %} "button is-danger" {% endif %} hx-post="{{ "/player-toggle/" ~ id}}" hx-trigger="click" hx-swap="outerHTML">{{ player.name }}</button>
</div>
{% endfor %}
</div> \ No newline at end of file