cacert-boardvoting/templates/motion_fragments.html

43 lines
1.5 KiB
HTML

{{ define "motion_fragment" }}
<td class="{{.Status}}">
{{ if eq .Status 0 }}Pending {{ .Due}}
{{ else if eq .Status 1}}Approved {{ .Modified}}
{{ else if eq .Status -1}}Declined {{ .Modified}}
{{ else if eq .Status -2}}Withdrawn {{ .Modified}}
{{ else }}Unknown
{{ end }}
</td>
<td>
<i><a href="/motions/{{ .Tag}}">{{ .Tag}}</a></i><br/>
<b>{{ .Title}}</b><br/>
<pre>{{ wrap 76 .Content }}</pre>
<br/>
<i>Due: {{.Due}}</i><br/>
<i>Proposed: {{.Proposer}} ({{.Proposed}})</i><br/>
<i>Vote type: {{.VoteType}}</i><br/>
<i>Aye|Naye|Abstain: {{.Ayes}}|{{.Nayes}}|{{.Abstains}}</i><br/>
{{ if .Votes }}
<i>Votes:</i><br/>
{{ range .Votes}}
<i>{{ .Name }}: {{ .Vote.Vote }}</i><br/>
{{ end }}
<i><a href="/motions/{{.Tag}}">Hide Votes</a></i>
{{ else}}
<i><a href="/motions/{{.Tag}}?showvotes=1">Show Votes</a></i>
{{ end }}
</td>
{{ end }}
{{ define "motion_actions" }}
<td>
{{ if eq .Status 0 }}
<ul>
<li><a href="/vote/{{ .Tag }}/aye">Aye</a></li>
<li><a href="/vote/{{ .Tag }}/abstain">Abstain</a></li>
<li><a href="/vote/{{ .Tag }}/naye">Naye</a></li>
<li><a href="/proxy/{{ .Tag }}">Proxy Vote</a></li>
<li><a href="/motions/{{ .Tag }}/edit">Modify</a></li>
<li><a href="/motions/{{ .Tag }}/withdraw">Withdraw</a></li>
</ul>
{{ end }}
</td>
{{ end }}