Enhance project functionality: add email template, implement email sending, and improve table management routes

The table management in the database does currently not work
This commit is contained in:
Jonas Hahn
2025-08-25 16:43:24 +02:00
parent f5e5d5632d
commit a1cba9c4eb
10 changed files with 230 additions and 10 deletions

View File

@@ -0,0 +1,31 @@
{{define "content"}}
<div class="card">
<h2>Table "{{.CurrentSlug}}"</h2>
{{if .Full}}<b>This table is full <br></b>{{end}}
Currently there are {{.Table.PlayerCount}} Players playing on this table.
<ol>
{{range .Table.Players}} <li>{{.Username}}</li> {{end}}
</ol>
<form method="get" action="/table/{{.CurrentSlug}}">
<button type="submit">Refresh</button>
</form>
<p>The game can be finished when there are 2 or 4 players.</p>
<div class="row">
<form method="post" action="/table/{{.CurrentSlug}}">
<button style="background-color: greenyellow; border-color: gray;" type="submit">FinishGame</button>
</form>
<form method="post" action="/table/{{.CurrentSlug}}/reset">
<button style="background-color: coral; border-color: gray;" type="submit">ResetGame</button>
</form>
</div>
</div>
{{end}}