event-time-tracking/webpage.tmpl
kekskurse a6c531b282
All checks were successful
continuous-integration/drone/push Build is passing
Template
2022-01-16 00:56:54 +01:00

39 lines
No EOL
793 B
Cheetah

<style type="text/css">
table, th, td {
border: 1px solid black;
}
</style>
<h1>Time Tracking</h1>
<p>Currently doing {{ .lastEvent.Name }} since {{ .lastEvent.EventTimestamp }}</p>
<h3>Per Day</h3>
<table>
<tr>
<td>Tag</td>
{{ range .daylist }}
<td>{{ . }}</td>
{{ end }}
<th>Summe</th>
</tr>
{{ range $val := .taglist }}
<tr>
<td>{{ $val }}</td>
{{ range $v := $.daylist }}
{{ $secounds := index $.currentState $val $v }}
<td>{{tominute $secounds }}</td>
{{ end }}
<td>{{ index $.weeklist $val }}</td>
</tr>
{{ end }}
</table>
<h3>Start</h3>
<form method="get" action="/event">
<select name="name">
{{ range $val := .taglist }}
<option>{{$val}}</option>
{{ end }}
</select>
<br/>
<input type="submit"></input>
</form>