Add admin index page

This commit is contained in:
2020-10-11 23:02:57 +02:00
parent e5c0df6f6f
commit 2a1ef7f2cb
5 changed files with 39 additions and 11 deletions

View File

@@ -16,7 +16,6 @@
<tr>
<th>Person</th>
<th>Datum</th>
<th>Waschperson</th>
</tr>
</thead>
<tbody>
@@ -24,16 +23,14 @@
{{ $persons := .persons}}
{{range $item := $items}}
<tr>
<td>{{$item.Person}}</td>
<td>{{$item.DateString}}</td>
<td>
<div class="center">
<form class="ui form" action="/uploadname" method="POST">
<input type="hidden" id="washid" name="washid" value="{{ $item.Id}}">
<form class="ui form" action="/admin/changename" method="POST">
<input type="hidden" id="personid" name="personid" value="{{ $item.Id}}">
<select name="names" id="names">
<!--<option value="-1" selected disabled hidden>Choose here</option>-->
<!--<option value="-1" selected disabled hidden>Choose here</option>-->
{{range $person := $persons}}
{{if eq $item.Washed $person.Id}}
{{if eq $item.PersonId $person.Id}}
<option value="{{$person.Id}}" selected>{{$person.Name}}</option>
{{else}}
<option value="{{$person.Id}}">{{$person.Name}}</option>
@@ -45,6 +42,7 @@
</div>
</td>
<td>{{$item.DateString}}</td>
</tr>
{{end}}
</tbody>