Implement more RESTful URLs for motions
[cacert-boardvoting.git] / templates / motions.html
1 <!DOCTYPE html>
2 <html xmlns="http://www.w3.org/1999/html">
3 <head>
4 <title>CAcert Board Decisions</title>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6 <link rel="stylesheet" type="text/css" href="/static/styles.css"/>
7 </head>
8 <body>
9 <a href="/motions/?unvoted=1">Show my outstanding votes</a><br/>
10 {{ $voter := .Voter }}
11 {{ if .Decisions }}
12 <table class="list">
13 <thead>
14 <tr>
15 <th>Status</th>
16 <th>Motion</th>
17 {{ if $voter }}<th>Actions</th>{{ end }}
18 </tr>
19 </thead>
20 <tbody>
21 {{range .Decisions }}
22 <tr>
23 <td class="{{.Status}}">
24 {{ if eq .Status 0 }}Pending {{ .Due}}
25 {{ else if eq .Status 1}}Approved {{ .Modified}}
26 {{ else if eq .Status -1}}Declined {{ .Modified}}
27 {{ else if eq .Status -2}}Withdrawn {{ .Modified}}
28 {{ else }}Unknown
29 {{ end }}
30 </td>
31 <td>
32 <i><a href="/motions/{{ .Tag}}">{{ .Tag}}</a></i><br />
33 <b>{{ .Title}}</b><br />
34 <pre>{{ wrap 76 .Content }}</pre>
35 <br />
36 <i>Due: {{.Due}}</i><br/>
37 <i>Proposed: {{.Proposer}} ({{.Proposed}})</i><br/>
38 <i>Vote type: {{.VoteType}}</i><br/>
39 <i>Aye|Naye|Abstain: {{.Ayes}}|{{.Nayes}}|{{.Abstains}}</i><br />
40 {{ if .Votes }}
41 <i>Votes:</i><br/>
42 {{ range .Votes}}
43 <i>{{ .Name }}: {{ .Vote}}</i><br />
44 {{ end }}
45 {{ else}}
46 <i><a href="/motions/{{.Tag}}?showvotes=1">Show Votes</a></i>
47 {{ end }}
48 </td>
49 {{ if $voter }}
50 <td>
51 {{ if eq .Status 0 }}
52 <ul>
53 <li><a href="/vote/{{ .Tag }}/aye">Aye</a></li>
54 <li><a href="/vote/{{ .Tag }}/abstain">Abstain</a></li>
55 <li><a href="/vote/{{ .Tag }}/naye">Naye</a></li>
56 <li><a href="/proxy/{{ .Tag }}">Proxy Vote</a></li>
57 <li><a href="/motions/{{ .Tag }}/edit">Modify</a></li>
58 <li><a href="/motions/{{ .Tag }}/withdraw">Withdraw</a></li>
59 </ul>
60 {{ end }}
61 </td>{{ end }}
62 </tr>
63 {{end}}
64 <tr>
65 <td colspan="{{ if $voter }}3{{ else }}2{{ end }}" class="navigation">
66 {{ if .PrevPage }}<a href="?page={{ .PrevPage }}" title="previous page">&lt;</a>{{ end }}
67 {{ if .NextPage }}<a href="?page={{ .NextPage }}" title="next page">&gt;</a>{{ end }}
68 </td>
69 </tr>
70 </tbody>
71 </table>
72 {{else}}
73 <p>There are no motions in the system yet.</p>
74 {{end}}
75 </body>
76 </html>