diff options
| author | Karan Jayachandra <karan.jayachandra@nxp.com> | 2024-10-14 12:00:14 +0200 |
|---|---|---|
| committer | Karan Jayachandra <karan.jayachandra@nxp.com> | 2024-10-14 12:00:14 +0200 |
| commit | ccdf8fcb51a47b79d5a1c0042699b0d60c3c304c (patch) | |
| tree | 299da0ec9f49cad9c58ca47cac86f8922b363785 /templates/courts.j2 | |
| parent | d18e5880b47fcdf6542bcb9502e8cf35a4276f05 (diff) | |
Changed the courts to dictionaries
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> |
