diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-04 14:50:30 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-04 16:59:10 +0900 |
| commit | 264fa15fb2ba5f0b9636cda44b64deb3c56aa99d (patch) | |
| tree | 61de974c9ed1aa5b94b6d5900fdb8e3a2d4b3efd /backend/admin/templates/game_edit.html | |
| parent | 1b794787a5194405cd99d80981008e20aa0e953d (diff) | |
| download | phperkaigi-2025-albatross-264fa15fb2ba5f0b9636cda44b64deb3c56aa99d.tar.gz phperkaigi-2025-albatross-264fa15fb2ba5f0b9636cda44b64deb3c56aa99d.tar.zst phperkaigi-2025-albatross-264fa15fb2ba5f0b9636cda44b64deb3c56aa99d.zip | |
feat(backend): serve /admin/* pages from api-server
Diffstat (limited to 'backend/admin/templates/game_edit.html')
| -rw-r--r-- | backend/admin/templates/game_edit.html | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/backend/admin/templates/game_edit.html b/backend/admin/templates/game_edit.html new file mode 100644 index 0000000..8bc5410 --- /dev/null +++ b/backend/admin/templates/game_edit.html @@ -0,0 +1,45 @@ +{{ template "base.html" . }} + +{{ define "breadcrumb" }} +<a href="/admin/dashboard">Dashboard</a> | <a href="/admin/games">Games</a> +{{ end }} + +{{ define "content" }} +<form> + <div> + <label>Game ID</label> + <input type="text" name="game_id" value="{{ .Game.GameID }}" readonly required> + </div> + <div> + <label>Display Name</label> + <input type="text" name="display_name" value="{{ .Game.DisplayName }}" required> + </div> + <div> + <label>State</label> + <select> + <option value="closed"{{ if eq .Game.State "closed" }} selected{{ end }}>Closed</option> + <option value="waiting_entries"{{ if eq .Game.State "waiting_entries" }} selected{{ end }}>WaitingEntries</option> + <option value="waiting_start"{{ if eq .Game.State "waiting_start" }} selected{{ end }}>WaitingStart</option> + <option value="prepare"{{ if eq .Game.State "prepare" }} selected{{ end }}>Prepare</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> + </select> + </div> + <div> + <label>Duration Seconds</label> + <input type="number" name="duration_seconds" value="{{ .Game.DurationSeconds }}" required> + </div> + <div> + <label>Started At</label> + <input type="datetime-local" name="started_at" value="{{ .Game.StartedAt }}"> + </div> + <div> + <label>Problem ID</label> + <input type="text" name="problem_id" value="{{ .Game.ProblemID }}" disabled> + </div> + <div> + <button type="submit">Save</button> + </div> +</form> +{{ end }} |
