2017-04-17 14:24:37 +00:00
|
|
|
{{ define "motion_fragment" }}
|
2017-04-30 00:37:29 +00:00
|
|
|
<span class="ui {{ template "status_class" .Status }} ribbon label">{{ .Status|toString|title }}</span>
|
|
|
|
<span class="header">{{ .Modified|date "2006-01-02 15:04:05 UTC" }}</span>
|
|
|
|
<h3 class="header"><a href="/motions/{{ .Tag }}">{{ .Tag }}: {{ .Title }}</a></h3>
|
2017-05-14 13:01:12 +00:00
|
|
|
<p>{{ wrap 76 .Content | nl2br }}</p>
|
2017-04-30 00:37:29 +00:00
|
|
|
<table class="ui small definition table">
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>Due</td>
|
|
|
|
<td>{{.Due|date "2006-01-02 15:04:05 UTC"}}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Proposed</td>
|
|
|
|
<td>{{.Proposer}} ({{.Proposed|date "2006-01-02 15:04:05 UTC"}})</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Vote type:</td>
|
|
|
|
<td>{{ .VoteType|toString|title }}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Votes:</td>
|
|
|
|
<td>
|
|
|
|
<div class="ui labels">
|
|
|
|
<div class="ui basic label green"><i
|
|
|
|
class="check circle icon"></i>Aye
|
|
|
|
<div class="detail">{{.Ayes}}</div>
|
|
|
|
</div>
|
|
|
|
<div class="ui basic label red"><i
|
|
|
|
class="minus circle icon"></i>Naye
|
|
|
|
<div class="detail">{{.Nayes}}</div>
|
|
|
|
</div>
|
|
|
|
<div class="ui basic label grey"><i class="circle icon"></i>Abstain
|
|
|
|
<div class="detail">{{.Abstains}}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ if .Votes }}
|
|
|
|
<div class="list">
|
|
|
|
{{ range .Votes }}
|
|
|
|
<div class="item">{{ .Name }}: {{ .Vote.Vote }}</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<a href="/motions/{{ .Tag }}">Hide Votes</a>
|
|
|
|
{{ else if or ((ne 0 .Ayes) (ne 0 .Nayes) (ne 0 .Abstains)) }}
|
|
|
|
<a href="/motions/{{ .Tag }}?showvotes=1">Show Votes</a>
|
|
|
|
{{ end }}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2017-04-17 14:24:37 +00:00
|
|
|
{{ end }}
|
2017-04-29 20:17:58 +00:00
|
|
|
|
2017-04-30 00:37:29 +00:00
|
|
|
{{ define "status_class" }}{{ if eq . 0 }}blue{{ else if eq . 1 }}green{{ else if eq . -1 }}red{{ else if eq . -2 }}grey
|
|
|
|
{{ end }}{{ end }}
|
2017-04-29 20:17:58 +00:00
|
|
|
|
2017-04-17 14:24:37 +00:00
|
|
|
{{ define "motion_actions" }}
|
2017-04-30 00:37:29 +00:00
|
|
|
{{ if eq .Status 0 }}
|
|
|
|
<a class="ui compact right labeled green icon button" href="/vote/{{ .Tag }}/aye"><i class="check circle icon"></i> Aye</a>
|
|
|
|
<a class="ui compact right labeled red icon button" href="/vote/{{ .Tag }}/naye"><i class="minus circle icon"></i> Naye</a>
|
|
|
|
<a class="ui compact right labeled grey icon button" href="/vote/{{ .Tag }}/abstain"><i class="circle icon"></i> Abstain</a>
|
|
|
|
<a class="ui compact left labeled icon button" href="/proxy/{{ .Tag }}"><i class="users icon"></i> Proxy Vote</a>
|
|
|
|
<a class="ui compact left labeled icon button" href="/motions/{{ .Tag }}/edit"><i class="edit icon"></i> Modify</a>
|
|
|
|
<a class="ui compact left labeled icon button" href="/motions/{{ .Tag }}/withdraw"><i class="trash icon"></i> Withdraw</a>
|
|
|
|
{{ end }}
|
2017-04-17 14:24:37 +00:00
|
|
|
{{ end }}
|