diff options
Diffstat (limited to 'templates/courts.j2')
| -rw-r--r-- | templates/courts.j2 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/courts.j2 b/templates/courts.j2 index 64fd44a..4e3cb3a 100644 --- a/templates/courts.j2 +++ b/templates/courts.j2 @@ -1,8 +1,8 @@ <div class="fixed-grid has-12-cols"> <div class="grid"> -{% for court in courts %} +{% for key, value in courts.items() %} <div class="cell"> - <button class={% if court.status %} "button is-success" {% else %} "button is-danger" {% endif %} hx-post="{{ "/court-toggle/" ~ court.number}}" hx-trigger="click" hx-swap="outerHTML">{{ court.number }}</button> + <button class={% if value %} "button is-success" {% else %} "button is-danger" {% endif %} hx-post="{{ "/court-toggle/" ~ key}}" hx-trigger="click" hx-swap="outerHTML">{{ key }}</button> </div> {% endfor %} </div> |
