diff options
| author | Karan Jayachandra <mail@karanjayachandra.com> | 2025-07-14 12:25:55 +0200 |
|---|---|---|
| committer | Karan Jayachandra <mail@karanjayachandra.com> | 2025-07-14 12:25:55 +0200 |
| commit | 729203409fb73fdbac19b8af9d647883a5ac96b0 (patch) | |
| tree | 5cef1d2b3f7bb61551dd105974e66b11b81fff98 /app/templates | |
| parent | ec3af3f76ae1785bfb8c1dfbc69788e95fc7954d (diff) | |
Back to working
Diffstat (limited to 'app/templates')
| -rw-r--r-- | app/templates/games.j2 | 12 | ||||
| -rw-r--r-- | app/templates/players.j2 | 17 |
2 files changed, 23 insertions, 6 deletions
diff --git a/app/templates/games.j2 b/app/templates/games.j2 index ccfd395..dff1e0f 100644 --- a/app/templates/games.j2 +++ b/app/templates/games.j2 @@ -9,12 +9,12 @@ </thead> <tbody> {% for game in games %} - <tr {% if game.team_1.player_1.first_name == 'RESERVED' %} class="is-danger" {% endif %}> - <th align="center" style="width: 8%;">{{ game.court_id }}</th> - <td style="width: 23%;"><strong>{{ game.team_1.player_1.first_name }}</strong>{{ " " + game.team_1.player_1.last_name }}</th> - <td style="width: 23%;"><strong>{{ game.team_1.player_2.first_name }}</strong>{{ " " + game.team_1.player_2.last_name }}</th> - <td style="width: 23%;"><strong>{{ game.team_2.player_1.first_name }}</strong>{{ " " + game.team_2.player_1.last_name }}</th> - <td style="width: 23%;"><strong>{{ game.team_2.player_2.first_name }}</strong>{{ " " + game.team_2.player_2.last_name }}</th> + <tr {% if game.team_1[0].first_name == 'RESERVED' %} class="is-danger" {% endif %}> + <th align="center" style="width: 8%;">{{ game.court.id }}</th> + <td style="width: 23%;"><strong>{{ game.team_1[0].first_name }}</strong>{{ " " + game.team_1[0].last_name }}</th> + <td style="width: 23%;"><strong>{{ game.team_1[1].first_name }}</strong>{{ " " + game.team_1[1].last_name }}</th> + <td style="width: 23%;"><strong>{{ game.team_2[0].first_name }}</strong>{{ " " + game.team_2[0].last_name }}</th> + <td style="width: 23%;"><strong>{{ game.team_2[1].first_name }}</strong>{{ " " + game.team_2[1].last_name }}</th> </tr> {% endfor %} </tbody> diff --git a/app/templates/players.j2 b/app/templates/players.j2 index 0beeee9..16e3878 100644 --- a/app/templates/players.j2 +++ b/app/templates/players.j2 @@ -25,6 +25,23 @@ <button class="button is-dark is-responsive" hx-post="/reset_players">RESET!</button> </div> + <div class="column"> + <form method="POST" enctype="multipart/form-data" hx-post="/update_players"> + <div id="file-js" class="file has-name is-fullwidth"> + <label class="file-label"> + <input class="file-input" type="file" name="players" /> + <span class="file-cta"> + <span class="file-icon"> + <i class="fas fa-upload"></i> + </span> + <span class="file-label"> Choose a file⦠</span> + </span> + <span class="file-name"> No file uploaded </span> + </label> + <button class="button is-dark is-responsive">UPDATE!</button> + </div> + </form> + </div> {{ footer() }} </section> </body> |
