diff options
Diffstat (limited to 'backend/admin/templates')
| -rw-r--r-- | backend/admin/templates/audio.html | 14 | ||||
| -rw-r--r-- | backend/admin/templates/base.html | 2 | ||||
| -rw-r--r-- | backend/admin/templates/dashboard.html | 3 | ||||
| -rw-r--r-- | backend/admin/templates/game_edit.html | 16 | ||||
| -rw-r--r-- | backend/admin/templates/games.html | 11 |
5 files changed, 15 insertions, 31 deletions
diff --git a/backend/admin/templates/audio.html b/backend/admin/templates/audio.html deleted file mode 100644 index 21ec463..0000000 --- a/backend/admin/templates/audio.html +++ /dev/null @@ -1,14 +0,0 @@ -{{ template "base.html" . }} - -{{ define "breadcrumb" }} -<a href="{{ .BasePath }}/admin/dashboard">Dashboard</a> -{{ end }} - -{{ define "content" }} - {{ range .Audio }} - <figure> - <figcaption>{{ .Label }}</figcaption> - <audio controls src="{{ $.BasePath }}/files/audio/{{ .FileName }}"></audio> - </figure> - {{ end }} -{{ end }} diff --git a/backend/admin/templates/base.html b/backend/admin/templates/base.html index 8e71194..08c7dc5 100644 --- a/backend/admin/templates/base.html +++ b/backend/admin/templates/base.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <head> - <title>ADMIN {{ .Title }} | iOSDC Japan 2024 Albatross.swift</title> + <title>ADMIN {{ .Title }} | PHPerKaigi 2025 Albatross</title> <link rel="icon" href="{{ .BasePath }}/favicon.svg"> <link rel="stylesheet" href="{{ .BasePath }}/admin/css/normalize.css"> <link rel="stylesheet" href="{{ .BasePath }}/admin/css/sakura.css"> diff --git a/backend/admin/templates/dashboard.html b/backend/admin/templates/dashboard.html index 0f1fbaf..15b10ff 100644 --- a/backend/admin/templates/dashboard.html +++ b/backend/admin/templates/dashboard.html @@ -7,9 +7,6 @@ <p> <a href="{{ .BasePath }}/admin/games">Games</a> </p> -<p> - <a href="{{ .BasePath }}/admin/audio">Audio Test</a> -</p> <form method="post" action="{{ .BasePath }}/logout"> <button type="submit">Logout</button> </form> diff --git a/backend/admin/templates/game_edit.html b/backend/admin/templates/game_edit.html index 48a0625..3b9d9de 100644 --- a/backend/admin/templates/game_edit.html +++ b/backend/admin/templates/game_edit.html @@ -22,13 +22,10 @@ </select> </div> <div> - <label>State</label> - <select name="state" required> - <option value="closed"{{ if eq .Game.State "closed" }} selected{{ end }}>Closed</option> - <option value="waiting"{{ if eq .Game.State "waiting" }} selected{{ end }}>Waiting</option> - <option value="starting"{{ if eq .Game.State "starting" }} selected{{ end }}>Starting</option> - <option value="gaming"{{ if eq .Game.State "gaming" }} selected{{ end }}>Gaming</option> - <option value="finished"{{ if eq .Game.State "finished" }} selected{{ end }}>Finished</option> + <label>Is Public</label> + <select name="is_public" required> + <option value="public"{{ if .Game.IsPublic }} selected{{ end }}>Public</option> + <option value="private"{{ if not .Game.IsPublic }} selected{{ end }}>Private</option> </select> </div> <div> @@ -37,7 +34,7 @@ </div> <div> <label>Started At</label> - <input type="datetime-local" name="started_at" value="{{ if .Game.StartedAt }}{{ .Game.StartedAt }}{{ end }}"> + <input type="datetime-local" name="started_at" value="{{ if .Game.StartedAt }}{{ .Game.StartedAt }}{{ end }}" readonly> </div> <div> <label>Problem ID</label> @@ -46,5 +43,8 @@ <div> <button type="submit">Save</button> </div> + <div> + <button type="submit" formaction="{{ .BasePath }}/admin/games/{{ .Game.GameID }}/start">Start</button> + </div> </form> {{ end }} diff --git a/backend/admin/templates/games.html b/backend/admin/templates/games.html index 9dd9cae..3be6726 100644 --- a/backend/admin/templates/games.html +++ b/backend/admin/templates/games.html @@ -9,13 +9,14 @@ {{ range .Games }} <li> <a href="{{ $.BasePath }}/admin/games/{{ .GameID }}"> - {{ .DisplayName }} (id={{ .GameID }} type={{ .GameType }} state={{ .State }}) + {{ .DisplayName }} (id={{ .GameID }} type={{ .GameType }} {{ if not .IsPublic }}private{{ end }}) </a> <ul> - {{ if and (ne .State "closed") (ne .State "finished") }} - <li> - <a href="{{ $.BasePath }}/golf/{{ .GameID }}/watch">Watch</a> - </li> + {{ if .IsPublic }} + <li><a href="{{ $.BasePath }}/golf/{{ .GameID }}/play">Play</a></li> + {{ end }} + {{ if .IsPublic }} + <li><a href="{{ $.BasePath }}/golf/{{ .GameID }}/watch">Watch</a></li> {{ end }} </ul> </li> |
