HTML-Seiten modularer aufgebaut und table.html hinzugefügt
This commit is contained in:
39
templates/table.html
Normal file
39
templates/table.html
Normal file
@ -0,0 +1,39 @@
|
||||
{{ define "row" }}
|
||||
<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 }}
|
||||
|
||||
{{ 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>
|
||||
</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>
|
||||
|
||||
{{ range . }}
|
||||
{{ template "row" . }}
|
||||
{{ end }}
|
||||
</table>
|
||||
{{ end }}
|
Reference in New Issue
Block a user