Grundlegenden Funktionsumfang geschaffen, dafür einiges umstrukturiert
This commit is contained in:
@ -49,6 +49,8 @@
|
||||
{{ template "participant" . }}
|
||||
</div>
|
||||
|
||||
<button type="submit" hx-post="/submit/">Senden</button>
|
||||
<button type="submit" hx-post="/submit/" hx-target="#content" hx-swap="innerHTML">
|
||||
Senden
|
||||
</button>
|
||||
</form>
|
||||
{{ end }}
|
||||
|
@ -11,7 +11,9 @@
|
||||
<body>
|
||||
<h1>Sicherheitsunterweisung</h1>
|
||||
|
||||
{{ template "content" . }}
|
||||
<div id="content">
|
||||
{{ template "content" . }}
|
||||
</div>
|
||||
|
||||
<script src="/static/js/htmx.min.js" type="text/javascript"></script>
|
||||
</body>
|
||||
|
@ -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 }}
|
||||
|
Reference in New Issue
Block a user