59 lines
1.7 KiB
HTML

<!--
-- 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/>.
-->
{{define "rows"}}
{{range .OTD}}
<tr>
<td>{{.InstructorFirstName}}</td>
<td>{{.InstructorLastName}}</td>
<td>{{.BriefingDateTime}}</td>
<td>{{.BriefingLocation}}</td>
<td>{{.BriefingDocument}}</td>
<td>{{.BriefingAsOf}}</td>
<td>{{.ParticipantFirstName}}</td>
<td>{{.ParticipantLastName}}</td>
<td>{{.ParticipantCompany}}</td>
</tr>
{{end}}
{{end}}
{{define "content"}}
<form>
<label for="search-input">Suche</label>
<input id="search-input" name="search" type="text" hx-post="/search/{{.SessionID}}/" hx-target="#results"
hx-trigger="keyup changed delay:200ms" />
</form>
<form>
<button type="submit" hx-post="/new-briefing/{{.SessionID}}/" hx-target="#content">
Neue Unterweisung
</button>
</form>
<table>
<thead>
<tr>
<th colspan="2">Unterweiser</th>
<th>Datum & Uhrzeit</th>
<th>Ort</th>
<th>Dokument</th>
<th>Stand</th>
<th colspan="2">Teilnehmer</th>
<th>Firma</th>
</tr>
</thead>
<tbody id="results">
{{template "rows" .}}
</tbody>
</table>
{{end}}