Grundlegenden Funktionsumfang geschaffen, dafür einiges umstrukturiert

This commit is contained in:
2023-10-08 10:36:16 +02:00
parent 15675d5e6c
commit 324a1c54d6
5 changed files with 61 additions and 39 deletions

View File

@ -1,4 +1,5 @@
{{ define "row" }}
{{ define "rows" }}
{{ range . }}
<tr>
<td>{{ .FirstName }}</td>
<td>{{ .LastName }}</td>
@ -13,27 +14,38 @@
{{ end }}
</tr>
{{ end }}
{{ end }}
{{ define "content" }}
<form>
<label for="search-input">Suche</label>
<input type="text" name="search" id="search-input" />
<button type="submit" hx-post="" hx-target="" hx-swap="">Suchen</button>
<button type="submit" hx-post="/search/" hx-target="#results" hx-swap="innerHTML">
Suchen
</button>
</form>
<form>
<button type="submit" hx-post="/new-briefing/" hx-target="#content" hx-swap="innerHTML">
Neue Unterweisung
</button>
</form>
<table>
<tr>
<th colspan="2">Name Unterweiser</th>
<th>Datum</th>
<th>Uhrzeit</th>
<th>Stand</th>
<th>Ort</th>
<th colspan="2">Name Teilnehmer</th>
<th>Firma</th>
</tr>
<thead>
<tr>
<th colspan="2">Name Unterweiser</th>
<th>Datum</th>
<th>Uhrzeit</th>
<th>Stand</th>
<th>Ort</th>
<th colspan="2">Name Teilnehmer</th>
<th>Firma</th>
</tr>
</thead>
{{ range . }}
{{ template "row" . }}
{{ end }}
<tbody id="results">
{{ template "rows" . }}
</tbody>
</table>
{{ end }}