50 lines
1.0 KiB
HTML
Raw Normal View History

{{ define "rows" }}
{{ range . }}
<tr>
<td>{{ .FirstName }}</td>
<td>{{ .LastName }}</td>
<td>{{ .Date }}</td>
<td>{{ .Time }}</td>
<td>{{ .State }}</td>
<td>{{ .Location }}</td>
{{ range .Participants }}
<td>{{ .FirstName }}</td>
<td>{{ .LastName }}</td>
<td>{{ .Company }}</td>
{{ end }}
</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>
2023-10-08 15:12:52 +02:00
<th colspan="2">Unterweiser</th>
<th>Datum</th>
<th>Uhrzeit</th>
<th>Stand</th>
<th>Ort</th>
2023-10-08 15:12:52 +02:00
<th colspan="2">Teilnehmer</th>
<th>Firma</th>
</tr>
</thead>
<tbody id="results">
{{ template "rows" . }}
</tbody>
</table>
{{ end }}