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 <div class="habits-title">
9 <h4>Positive habits</h4>
10 <a href="/new/positive" class="button">+ Add</a>
11 </div>
12 <table>
13 <thead>
14 <tr>
15 <td>Name</td>
16 <td>Last time</td>
17 <td>Enabled</td>
18 </tr>
19 </thead>
20 <tbody>
21 {{range .Positive}}
22 <tr class="{{.Class}}">
23 <td>{{.Name}}</td>
24 <td>{{.LastAck}}</td>
25 <td><input type="checkbox" disabled{{ if not .Disabled }} checked{{end}} /></td>
26 </tr>
27 {{end}}
28 </tbody>
29 <tfoot></tfoot>
30 </table>
31
32 <div class="habits-title">
33 <h4>Negative habits</h4>
34 <a href="/new/negative" class="button">+ Add</a>
35 </div>
36 <table>
37 <thead>
38 <tr>
39 <td>Name</td>
40 <td>Last time</td>
41 </tr>
42 </thead>
43 <tbody>
44 {{range .Negative}}
45 <tr class="{{.Class}}">
46 <td>{{.Name}}</td>
47 <td>{{.LastAck}}</td>
48 </tr>
49 {{end}}
50 </tbody>
51 <tfoot></tfoot>
52 </table>
53{{end}}