48 lines
1.6 KiB
HTML
Raw Permalink Normal View History

2023-11-01 14:11:00 +01:00
<!--
-- Sicherheitsunterweisung
-- Copyright (C) 2023 Jason Streifling
--
-- This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
2023-10-30 11:38:56 +01:00
{{define "refresh"}}
<button hx-post="/refresh-summary/{{.BriefingID}}/{{.Login}}/" hx-target="#id-{{.Login}}"
2023-10-30 11:38:56 +01:00
type="button">Aktualisieren</button>
{{end}}
{{define "retry"}}
<button hx-post="/allow-retry/{{.BriefingID}}/{{.Login}}/" hx-swap="delete" type="button">Wiederholen erlauben</button>
2023-10-30 11:38:56 +01:00
{{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}}
<p>{{.NoIncorrect}} Fehler</p>
2023-10-30 11:38:56 +01:00
{{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>
2023-10-30 11:38:56 +01:00
{{range .ParticipantsData}}
{{template "participant" .}}
{{end}}
{{end}}