diff options
Diffstat (limited to 'backend/admin/templates')
| -rw-r--r-- | backend/admin/templates/game_edit.html | 11 | ||||
| -rw-r--r-- | backend/admin/templates/games.html | 11 |
2 files changed, 10 insertions, 12 deletions
diff --git a/backend/admin/templates/game_edit.html b/backend/admin/templates/game_edit.html index 48a0625..2c80558 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> 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> |
