From d5d64f2b1047f864811d23f19f109a6513c22a2a Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Sun, 13 Jul 2025 18:20:04 +0200 Subject: Working version with several bugs --- app/templates/controls.j2 | 4 ++-- app/templates/games.j2 | 12 ++++++------ app/templates/macros.j2 | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'app/templates') diff --git a/app/templates/controls.j2 b/app/templates/controls.j2 index 0183c97..eba086d 100644 --- a/app/templates/controls.j2 +++ b/app/templates/controls.j2 @@ -1,8 +1,8 @@ {% from "macros.j2" import court_button %}
- {% for key, value in courts.items() %} - {{ court_button(key, value) }} + {% for court in courts %} + {{ court_button(court.id, court.status) }} {% endfor %}
diff --git a/app/templates/games.j2 b/app/templates/games.j2 index 46150f7..ccfd395 100644 --- a/app/templates/games.j2 +++ b/app/templates/games.j2 @@ -9,12 +9,12 @@ {% for game in games %} - - {{ game.court }} - {{ game.team1.player1.first }}{{ " " + game.team1.player1.last }} - {{ game.team1.player2.first }}{{ " " + game.team1.player2.last }} - {{ game.team2.player1.first }}{{ " " + game.team2.player1.last }} - {{ game.team2.player2.first }}{{ " " + game.team2.player2.last }} + + {{ game.court_id }} + {{ game.team_1.player_1.first_name }}{{ " " + game.team_1.player_1.last_name }} + {{ game.team_1.player_2.first_name }}{{ " " + game.team_1.player_2.last_name }} + {{ game.team_2.player_1.first_name }}{{ " " + game.team_2.player_1.last_name }} + {{ game.team_2.player_2.first_name }}{{ " " + game.team_2.player_2.last_name }} {% endfor %} diff --git a/app/templates/macros.j2 b/app/templates/macros.j2 index 2974744..a4b2fc1 100644 --- a/app/templates/macros.j2 +++ b/app/templates/macros.j2 @@ -7,7 +7,7 @@ {% macro player_button(player) -%} + hx-swap="outerHTML"> {{ player.first_name + " " + player.last_name}} {%- endmacro %} {% macro guest_control(level, value) -%} -- cgit v1.3.1