templates/habits.tmpl (view raw)
1{{ extends "base.tmpl" }}
2
3{{define "title" -}}Habits{{end}}
4
5{{define "content" -}}
6 <h1>Welcome, <i>{{.User.Username}}</i>!</h1>
7 <a href="/logout">Logout</a><br />
8 <h4>Positive habits</h4>
9 <table>
10 <thead>
11 <tr>
12 <td>Name</td>
13 <td>Last time</td>
14 <td>Enabled</td>
15 </tr>
16 </thead>
17 <tbody>
18 {{range .Positive}}
19 <tr class="{{.Class}}">
20 <td>{{.Name}}</td>
21 <td>{{.LastAck}}</td>
22 <td><input type="checkbox" disabled{{ if not .Disabled }} checked{{end}} /></td>
23 </tr>
24 {{end}}
25 </tbody>
26 <tfoot></tfoot>
27 </table>
28
29 <h4>Negative habits</h4>
30 <table>
31 <thead>
32 <tr>
33 <td>Name</td>
34 <td>Last time</td>
35 </tr>
36 </thead>
37 <tbody>
38 {{range .Negative}}
39 <tr class="{{.Class}}">
40 <td>{{.Name}}</td>
41 <td>{{.LastAck}}</td>
42 </tr>
43 {{end}}
44 </tbody>
45 <tfoot></tfoot>
46 </table>
47{{end}}