summaryrefslogtreecommitdiff
path: root/boardvoting/templates/motions.html
blob: 3f820924e14620bd6cdc7860bd96419e185c57f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{{ template "header" . }}
{{ $voter := .Voter }}
<div class="column">
    <div class="ui basic segment">
        <div class="ui floated right secondary menu">

            <a href="/motions/" class="{{ if not .Params.Flags.Unvoted }}active {{ end }}item" title="Show all votes">All votes</a>
            {{ if $voter }}<a href="/motions/?unvoted=1" class="{{ if .Params.Flags.Unvoted }}active {{ end}}item" title="Show my outstanding votes">My outstanding votes</a>{{ end }}
        </div>
        {{ if $voter }}<a class="ui primary button" href="/newmotion/">New motion</a>{{ end }}
        {{ if .PrevPage -}}
        <a href="?page={{ .PrevPage }}{{ if .Params.Flags.Unvoted }}&unvoted=1{{ end }}"
           class="ui left labeled icon button" title="newer motions"><i class="left arrow icon"></i> newer</a>
        {{- end }}
        {{ if .NextPage -}}
        <a href="?page={{ .NextPage }}{{ if .Params.Flags.Unvoted }}&unvoted=1{{ end }}"
           class="ui right labeled icon button" title="older motions"><i class="right arrow icon"></i> older</a>
        {{- end }}
    </div>
</div>
{{ if .Decisions }}
    {{ range .Decisions }}
    <div class="column">
        <div class="ui raised segment">
        {{ template "motion_fragment" . }}
        {{ if $voter }}{{ template "motion_actions" . }}{{ end }}
        </div>
    </div>
    {{ end }}
<div class="column">
    <div class="ui basic segment">
{{ if $voter }}<a class="ui primary button" href="/newmotion/">New motion</a>{{ end }}
{{ if .PrevPage -}}
    <a href="?page={{ .PrevPage }}{{ if .Params.Flags.Unvoted }}&unvoted=1{{ end }}"
       class="ui left labeled icon button" title="newer motions">
        <i class="left arrow icon"></i> newer</a>
{{- end }}
{{ if .NextPage -}}
    <a href="?page={{ .NextPage }}{{ if .Params.Flags.Unvoted }}&unvoted=1{{ end }}"
       class="ui right labeled icon button" title="older motions">
       <i class="right arrow icon"></i> older</a>
{{- end }}
    </div>
</div>
{{ else }}
    {{ if .Params.Flags.Unvoted }}
    <p>There are no motions requiring a vote from you.</p>
    {{ else }}
    <p>There are no motions in the system yet.</p>
    {{ end }}
{{ end }}
{{ template "footer" . }}