Implement proper model, actions and template structure
[cacert-boardvoting.git] / templates / motions.html
1 {{ template "header" . }}
2 {{ if .Params.Flags.Unvoted }}
3 <a href="/motions/">Show all votes</a>
4 {{ else }}
5 <a href="/motions/?unvoted=1">Show my outstanding votes</a><br/>
6 {{ end }}
7 {{ $voter := .Voter }}
8 {{ if .Decisions }}
9 <table class="list">
10 <thead>
11 <tr>
12 <th>Status</th>
13 <th>Motion</th>
14 {{ if $voter }}<th>Actions</th>{{ end }}
15 </tr>
16 </thead>
17 <tbody>
18 {{range .Decisions }}
19 <tr>
20 {{ template "motion_fragment" . }}
21 {{ if $voter }}{{ template "motion_actions" . }}{{ end }}
22 </tr>
23 {{end}}
24 <tr>
25 <td colspan="2" class="navigation">
26 {{ if .PrevPage }}<a href="?page={{ .PrevPage }}" title="previous page">&lt;</a>{{ end }}
27 {{ if .NextPage }}<a href="?page={{ .NextPage }}" title="next page">&gt;</a>{{ end }}
28 </td>
29 {{ if $voter }}
30 <td class="actions">
31 <ul>
32 <li><a href="/newmotion/">New Motion</a></li>
33 </ul>
34 </td>
35 {{ end }}
36 </tr>
37 </tbody>
38 </table>
39 {{else}}
40 {{ if .Params.Flags.Unvoted }}
41 <p>There are no motions requiring a vote from you.</p>
42 {{ else }}
43 <p>There are no motions in the system yet.</p>
44 {{ end }}
45 {{end}}
46 {{ template "footer" . }}