summaryrefslogtreecommitdiff
path: root/templates/motion_fragments.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/motion_fragments.html')
-rw-r--r--templates/motion_fragments.html43
1 files changed, 43 insertions, 0 deletions
diff --git a/templates/motion_fragments.html b/templates/motion_fragments.html
new file mode 100644
index 0000000..38c7a01
--- /dev/null
+++ b/templates/motion_fragments.html
@@ -0,0 +1,43 @@
+{{ 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 }}