Add migrations

This commit is contained in:
2020-10-09 15:10:13 +02:00
parent 135cd976d0
commit 011619d3c3
8 changed files with 81 additions and 9 deletions

View File

@@ -9,21 +9,39 @@
{{template "navbar"}}
<div class="ui center">
<h1 class="">Trikotwaschliste <small>Version: {{ .version }}</small></h1>
<h1 class="">Trikotwaschliste</h1>
<table class="ui celled table">
<thead>
<tr>
<th>Person</th>
<th>Datum</th>
<th>Gewaschen?</th>
<th>Waschperson</th>
</tr>
</thead>
<tbody>
{{range .items}}
{{ $items := .items}}
{{ $persons := .persons}}
{{range $item := $items}}
<tr>
<td>{{.Person}}</td>
<td>{{.Date}}</td>
<td>{{.IsWashed}}</td>
<td>{{$item.Person}}</td>
<td>{{$item.Date}}</td>
<td>{{$item.Washed}}</td>
<td>
<div class="center">
<form class="ui form" action="/uploadname" method="POST">
<input type="hidden" id="washid" name="washid" value="{{ $item.Id}}">
<select name="names" id="names">
<option value="-1" selected></option>
{{range $person := $persons}}
<option value="{{$person.Id}}">{{$person.Name}}</option>
{{end}}
</select>
<input type="submit" value="Speichern">
</form>
</div>
</td>
</tr>
{{end}}
</tbody>