Add admin page
This commit is contained in:
56
html/admin/adminindex.html
Normal file
56
html/admin/adminindex.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Trikotwaschliste - Admin</title>
|
||||
<link rel="stylesheet" type="text/css" href="/static/semantic.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
{{template "navbaradmin"}}
|
||||
<div class="ui center">
|
||||
<h1 class="">Trikotwaschliste Admin</h1>
|
||||
<table class="ui celled table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Person</th>
|
||||
<th>Datum</th>
|
||||
<th>Waschperson</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ $items := .items}}
|
||||
{{ $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}}">
|
||||
<select name="names" id="names">
|
||||
<!--<option value="-1" selected disabled hidden>Choose here</option>-->
|
||||
{{range $person := $persons}}
|
||||
{{if eq $item.Washed $person.Id}}
|
||||
<option value="{{$person.Id}}" selected>{{$person.Name}}</option>
|
||||
{{else}}
|
||||
<option value="{{$person.Id}}">{{$person.Name}}</option>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</select>
|
||||
<input class="button" type="submit" value="Speichern">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -5,6 +5,7 @@
|
||||
|
||||
<div class="right menu">
|
||||
<a href="/credits"><div class="item">Credits</div></a>
|
||||
<a href="/admin"><div class="item">Admin</div></a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
10
html/static/navbaradmin.html
Normal file
10
html/static/navbaradmin.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{{define "navbaradmin"}}
|
||||
<div class="ui menu">
|
||||
<a href="/admin"><div class="header item">Trikotwaschliste Admin</div></a>
|
||||
|
||||
<div class="right menu">
|
||||
<a href="/credits"><div class="item">Credits</div></a>
|
||||
<a href="/"><div class="item">Startseite</div></a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
Reference in New Issue
Block a user