Sessions vollständig implementiert
This commit is contained in:
35
templates/summary.html
Normal file
35
templates/summary.html
Normal file
@ -0,0 +1,35 @@
|
||||
{{define "refresh"}}
|
||||
<button hx-post="/refresh-summary/{{.SessionID}}/{{.Login}}/" hx-target="#id-{{.Login}}"
|
||||
type="button">Aktualisieren</button>
|
||||
{{end}}
|
||||
|
||||
{{define "retry"}}
|
||||
<button hx-post="/allow-retry/{{.SessionID}}/{{.Login}}/" type="button">Wiederholen erlauben</button>
|
||||
{{end}}
|
||||
|
||||
{{define "participant"}}
|
||||
<div id="id-{{.Login}}">
|
||||
<h2>{{.Login}}</h2>
|
||||
{{if not .LastName}}
|
||||
{{template "refresh" .}}
|
||||
{{else}}
|
||||
<p>{{.FirstName}} {{.LastName}}</p>
|
||||
<p>{{.Company}}</p>
|
||||
{{if lt .NoIncorrect 0}}
|
||||
{{template "refresh" .}}
|
||||
{{else if gt .NoIncorrect 0}}
|
||||
{{template "retry" .}}
|
||||
{{template "refresh" .}}
|
||||
{{else}}
|
||||
<p>{{.NoIncorrect}} Fehler</p>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<button hx-post="/briefing-done/{{.SessionID}}/" hx-target="#content" type="button">Beenden</button>
|
||||
{{range .ParticipantsData}}
|
||||
{{template "participant" .}}
|
||||
{{end}}
|
||||
{{end}}
|
Reference in New Issue
Block a user