50 lines
1.1 KiB
HTML

{{ define "rows" }}
{{ range . }}
<tr>
<td>{{ .InstructorFirstName }}</td>
<td>{{ .InstructorLastName }}</td>
<td>{{ .BriefingDate }}</td>
<td>{{ .BriefingTime }}</td>
<td>{{ .BriefingLocation }}</td>
<td>{{ .BriefingDocumentName }}</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 type="text" name="search" id="search-input" hx-post="/search/" hx-target="#results" hx-swap="innerHTML"
hx-trigger="keyup changed delay:200ms" />
</form>
<form>
<button type="submit" hx-post="/new-briefing/" hx-target="#content" hx-swap="innerHTML">
Neue Unterweisung
</button>
</form>
<table>
<thead>
<tr>
<th colspan="2">Unterweiser</th>
<th>Datum</th>
<th>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 }}