summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/create_motion_form.html140
-rw-r--r--templates/denied.html22
-rw-r--r--templates/direct_vote_form.html41
-rw-r--r--templates/edit_motion_form.html139
-rw-r--r--templates/header.html16
-rw-r--r--templates/motion.html32
-rw-r--r--templates/motion_fragments.html144
-rw-r--r--templates/motions.html80
-rw-r--r--templates/proxy_vote_form.html105
-rw-r--r--templates/withdraw_motion_form.html35
10 files changed, 358 insertions, 396 deletions
diff --git a/templates/create_motion_form.html b/templates/create_motion_form.html
index b7573d4..d87bac8 100644
--- a/templates/create_motion_form.html
+++ b/templates/create_motion_form.html
@@ -1,73 +1,73 @@
{{ template "header" . }}
-<form action="/newmotion/" method="post">
- <table>
- <tr>
- <td>ID:</td>
- <td>(generated on submit)</td>
- </tr>
- <tr>
- <td>Proponent:</td>
- <td>{{ .Voter.Name }}</td>
- </tr>
- <tr>
- <td>Proposed date/time:</td>
- <td>(auto filled to current date/time)</td>
- </tr>
- <tr>
- <td>Title:</td>
- <td><input name="Title" value="{{ .Form.Title }}"/>
- {{ with .Form.Errors.Title }}
- <span class="error">{{ . }}</span>
+<div class="column">
+ <div class="ui basic segment">
+ <div class="ui floated right secondary menu">
+ <a href="/motions/" class="item" title="Show all votes">Back to motions</a>
+ </div>
+ </div>
+</div>
+<div class="column">
+ <div class="ui raised segment">
+ <form action="/newmotion/" method="post">
+ <div class="ui form{{ if .Form.Errors }} error{{ end }}">
+ <div class="three fields">
+ <div class="field">
+ <label>ID:</label>
+ (generated on submit)
+ </div>
+ <div class="field">
+ <label>Proponent:</label>
+ {{ .Voter.Name }}
+ </div>
+ <div class="field">
+ <label>Proposed date/time:</label>
+ (auto filled to current date/time)
+ </div>
+ </div>
+ <div class="required field{{ if .Form.Errors.Title }} error{{ end }}">
+ <label for="Title">Title:</label>
+ <input name="Title" type="text" value="{{ .Form.Title }}">
+ </div>
+ <div class="required field{{ if .Form.Errors.Content }} error{{ end }}">
+ <label for="Content">Text:</label>
+ <textarea name="Content">{{ .Form.Content }}</textarea>
+ </div>
+ <div class="two fields">
+ <div class="required field{{ if .Form.Errors.VoteType }} error{{ end }}">
+ <label for="VoteType">Vote type:</label>
+ <select name="VoteType">
+ <option value="0"
+ {{ if eq "0" .Form.VoteType }}selected{{ end }}>
+ Motion
+ </option>
+ <option value="1"
+ {{ if eq "1" .Form.VoteType }}selected{{ end }}>
+ Veto
+ </option>
+ </select>
+ </div>
+ <div class="required field{{ if .Form.Errors.Due }} error{{ end }}">
+ <label for="Due">Due: (autofilled from chosen
+ option)</label>
+ <select name="Due">
+ <option value="+3 days">In 3 Days</option>
+ <option value="+7 days">In 1 Week</option>
+ <option value="+14 days">In 2 Weeks</option>
+ <option value="+28 days">In 4 Weeks</option>
+ </select>
+ </div>
+ </div>
+ {{ with .Form.Errors }}
+ <div class="ui error message">
+ {{ with .Title }}<p>{{ . }}</p>{{ end }}
+ {{ with .Content }}<p>{{ . }}</p>{{ end }}
+ {{ with .VoteType }}<p>{{ . }}</p>{{ end }}
+ {{ with .Due }}<p>{{ . }}</p>{{ end }}
+ </div>
{{ end }}
- </td>
- </tr>
- <tr>
- <td>Text:</td>
- <td><textarea name="Content">{{ .Form.Content }}</textarea>
- {{ with .Form.Errors.Content }}
- <span class="error">{{ . }}</span>
- {{ end }}
- </td>
- </tr>
- <tr>
- <td>Vote type:</td>
- <td>
- <select name="VoteType">
- <option value="0"
- {{ if eq "0" .Form.VoteType }}selected{{ end }}>
- Motion
- </option>
- <option value="1"
- {{ if eq "1" .Form.VoteType }}selected{{ end }}>Veto
- </option>
- </select>
- {{ with .Form.Errors.VoteType }}
- <span class="error">{{ . }}</span>
- {{ end }}
- </td>
- </tr>
- <tr>
- <td rowspan="2">Due:</td>
- <td>(autofilled from option below)</td>
- </tr>
- <tr>
- <td>
- <select name="Due">
- <option value="+3 days">In 3 Days</option>
- <option value="+7 days">In 1 Week</option>
- <option value="+14 days">In 2 Weeks</option>
- <option value="+28 days">In 4 Weeks</option>
- </select>
- {{ with .Form.Errors.Due }}
- <span class="error">{{ . }}</span>
- {{ end }}
- </td>
- </tr>
- <tr>
- <td>&nbsp;</td>
- <td><input type="submit" value="Propose"/></td>
- </tr>
- </table>
-</form>
-<a href="/motions/">Back to motions</a>
+ <button class="ui button" type="submit">Propose</button>
+ </div>
+ </form>
+ </div>
+</div>
{{ template "footer" . }} \ No newline at end of file
diff --git a/templates/denied.html b/templates/denied.html
index f5a359c..b8d8a3e 100644
--- a/templates/denied.html
+++ b/templates/denied.html
@@ -1,13 +1,9 @@
-<html>
-<head>
- <title>CAcert Board Decisions</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf8"/>
- <link rel="stylesheet" type="text/css" href="/static/styles.css"/>
-</head>
-<body>
-<h1>CAcert Board Decisions</h1>
-<b>You are not authorized to act here!</b><br/>
-<i>If you think this is in error, please contact the administrator</i>
-<i>If you don't know who that is, it is definitely not an error ;)</i>
-</body>
-</html> \ No newline at end of file
+{{ template "header" . }}
+<div class="column">
+ <div class="ui negative message">
+ <div class="header">You are not authorized to act here!</div>
+ <p>If you think this is in error, please contact the administrator.</p>
+ <p>If you don't know who that is, it is definitely not an error ;)</p>
+ </div>
+</div>
+{{ template "footer" . }} \ No newline at end of file
diff --git a/templates/direct_vote_form.html b/templates/direct_vote_form.html
index 3b656f2..861c68a 100644
--- a/templates/direct_vote_form.html
+++ b/templates/direct_vote_form.html
@@ -1,22 +1,27 @@
{{ template "header" . }}
-<a href="/motions/">Show all votes</a>
-<table class="list">
- <thead>
- <tr>
- <th>Status</th>
- <th>Motion</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- {{ with .Decision }}
- {{ template "motion_fragment" .}}
- {{ end}}
- </tr>
- </tbody>
-</table>
-
+<div class="column">
+ <div class="ui basic segment">
+ <div class="ui floated right secondary menu">
+ <a href="/motions/" class="item" title="Show all votes">Back to motions</a>
+ </div>
+ </div>
+</div>
+{{ with .Decision }}
+<div class="column">
+ <div class="ui raised segment">
+ {{ template "motion_fragment" . }}
+ </div>
+</div>
+{{ end }}
<form action="/vote/{{ .Decision.Tag }}/{{ .VoteChoice }}" method="post">
- <input type="submit" value="Vote {{ .VoteChoice }}"/>
+ <div class="ui form">
+ {{ if eq 1 .VoteChoice }}
+ <button class="ui right labeled green icon button" type="submit"><i class="check circle icon"></i> Vote {{ .VoteChoice }}</button>
+ {{ else if eq -1 .VoteChoice }}
+ <button class="ui right labeled red icon button" type="submit"><i class="minus circle icon"></i> Vote {{ .VoteChoice }}</button>
+ {{ else }}
+ <button class="ui right labeled grey icon button" type="submit"><i class="circle icon"></i> Vote {{ .VoteChoice }}</button>
+ {{ end }}
+ </div>
</form>
{{ template "footer" . }} \ No newline at end of file
diff --git a/templates/edit_motion_form.html b/templates/edit_motion_form.html
index d17389c..f686183 100644
--- a/templates/edit_motion_form.html
+++ b/templates/edit_motion_form.html
@@ -1,73 +1,72 @@
{{ template "header" . }}
-<form action="/motions/{{ .Form.Decision.Tag }}/edit" method="post">
- <table>
- <tr>
- <td>ID:</td>
- <td>{{ .Form.Decision.Tag }}</td>
- </tr>
- <tr>
- <td>Proponent:</td>
- <td>{{ .Voter.Name }}</td>
- </tr>
- <tr>
- <td>Proposed date/time:</td>
- <td>{{ .Form.Decision.Proposed }}</td>
- </tr>
- <tr>
- <td>Title:</td>
- <td><input name="Title" value="{{ .Form.Title }}"/>
- {{ with .Form.Errors.Title }}
- <span class="error">{{ . }}</span>
+<div class="column">
+ <div class="ui floated right secondary menu">
+ <a href="/motions/" class="item" title="Show all votes">Back to
+ motions</a>
+ </div>
+</div>
+<div class="column">
+ <div class="ui raised segment">
+ <form action="/motions/{{ .Form.Decision.Tag }}/edit" method="post">
+ <div class="ui form{{ if .Form.Errors }} error{{ end }}">
+ <div class="three fields">
+ <div class="field">
+ <label>ID:</label>
+ <a href="/motions/{{ .Form.Decision.Tag }}">{{ .Form.Decision.Tag }}</a>
+ </div>
+ <div class="field">
+ <label>Proponent:</label>
+ {{ .Voter.Name }}
+ </div>
+ <div class="field">
+ <label>Proposed date/time:</label>
+ {{ .Form.Decision.Proposed|date "2006-01-02 15:04:05 UTC" }}
+ </div>
+ </div>
+ <div class="required field{{ if .Form.Errors.Title }} error{{ end }}">
+ <label for="Title">Title:</label>
+ <input name="Title" type="text" value="{{ .Form.Title }}">
+ </div>
+ <div class="required field{{ if .Form.Errors.Content }} error{{ end }}">
+ <label for="Content">Text:</label>
+ <textarea name="Content">{{ .Form.Content }}</textarea>
+ </div>
+ <div class="two fields">
+ <div class="required field{{ if .Form.Errors.VoteType }} error{{ end }}">
+ <label for="VoteType">Vote type:</label>
+ <select name="VoteType">
+ <option value="0"
+ {{ if eq "0" .Form.VoteType }}selected{{ end }}>
+ Motion
+ </option>
+ <option value="1"
+ {{ if eq "1" .Form.VoteType }}selected{{ end }}>
+ Veto
+ </option>
+ </select>
+ </div>
+ <div class="required field{{ if .Form.Errors.Due }} error{{ end }}">
+ <label for="Due">Due: (autofilled from chosen
+ option)</label>
+ <select name="Due">
+ <option value="+3 days">In 3 Days</option>
+ <option value="+7 days">In 1 Week</option>
+ <option value="+14 days">In 2 Weeks</option>
+ <option value="+28 days">In 4 Weeks</option>
+ </select>
+ </div>
+ </div>
+ {{ with .Form.Errors }}
+ <div class="ui error message">
+ {{ with .Title }}<p>{{ . }}</p>{{ end }}
+ {{ with .Content }}<p>{{ . }}</p>{{ end }}
+ {{ with .VoteType }}<p>{{ . }}</p>{{ end }}
+ {{ with .Due }}<p>{{ . }}</p>{{ end }}
+ </div>
{{ end }}
- </td>
- </tr>
- <tr>
- <td>Text:</td>
- <td><textarea name="Content">{{ .Form.Content }}</textarea>
- {{ with .Form.Errors.Content }}
- <span class="error">{{ . }}</span>
- {{ end }}
- </td>
- </tr>
- <tr>
- <td>Vote type:</td>
- <td>
- <select name="VoteType">
- <option value="0"
- {{ if eq "0" .Form.VoteType }}selected{{ end }}>
- Motion
- </option>
- <option value="1"
- {{ if eq "1" .Form.VoteType }}selected{{ end }}>Veto
- </option>
- </select>
- {{ with .Form.Errors.VoteType }}
- <span class="error">{{ . }}</span>
- {{ end }}
- </td>
- </tr>
- <tr>
- <td rowspan="2">Due:</td>
- <td>(autofilled from option below)</td>
- </tr>
- <tr>
- <td>
- <select name="Due">
- <option value="+3 days">In 3 Days</option>
- <option value="+7 days">In 1 Week</option>
- <option value="+14 days">In 2 Weeks</option>
- <option value="+28 days">In 4 Weeks</option>
- </select>
- {{ with .Form.Errors.Due }}
- <span class="error">{{ . }}</span>
- {{ end }}
- </td>
- </tr>
- <tr>
- <td>&nbsp;</td>
- <td><input type="submit" value="Propose"/></td>
- </tr>
- </table>
-</form>
-<a href="/motions/">Back to motions</a>
+ <button class="ui button" type="submit">Propose</button>
+ </div>
+ </form>
+ </div>
+</div>
{{ template "footer" . }} \ No newline at end of file
diff --git a/templates/header.html b/templates/header.html
index 814e845..69ba7d2 100644
--- a/templates/header.html
+++ b/templates/header.html
@@ -2,7 +2,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
- <title>{{ block "pagetitle" . }}CAcert Board Decisions{{ if .PageTitle }} - {{ .PageTitle }}{{ end }}{{ end }}</title>
+ <title>{{ block "pagetitle" . }}CAcert Board Decisions{{ end }}{{ if .PageTitle }} - {{ .PageTitle }}{{ end }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="/static/semantic.css"/>
<script type="text/javascript" src="/static/js/jquery.js"></script>
@@ -12,14 +12,14 @@
<div class="ui container">
<h1 class="ui header">{{ template "pagetitle" . }}</h1>
{{ with .Flashes }}
- <div class="ui info message">
- <i class="close icon"></i>
- <div class="ui list">
- {{ range . }}
- <div class="ui item">{{ . }}</div>
- {{ end }}
+ <div class="ui info message">
+ <i class="close icon"></i>
+ <div class="ui list">
+ {{ range . }}
+ <div class="ui item">{{ . }}</div>
+ {{ end }}
+ </div>
</div>
- </div>
{{ end }}
</div>
<div class="ui one column grid container">
diff --git a/templates/motion.html b/templates/motion.html
index 66e4ce0..8fc7530 100644
--- a/templates/motion.html
+++ b/templates/motion.html
@@ -1,21 +1,19 @@
{{ template "header" . }}
-<a href="/motions/">Show all votes</a>
{{ $voter := .Voter }}
-<table class="list">
- <thead>
- <th>Status</th>
- <th>Motion</th>
- {{ if $voter}}
- <th>Actions</th>
- {{ end }}
- </thead>
- <tbody>
- <tr>
- {{ with .Decision }}
- {{ template "motion_fragment" .}}
+<div class="column">
+ <div class="ui basic segment">
+ <div class="ui floated right secondary menu">
+ <a href="/motions/" class="item" title="Show all votes">All votes</a>
+ {{ if $voter }}<a href="/motions/?unvoted=1" class="item" title="Show my outstanding votes">My outstanding votes</a>{{ end }}
+ </div>
+ </div>
+</div>
+{{ with .Decision }}
+<div class="column">
+ <div class="ui raised segment">
+ {{ template "motion_fragment" . }}
{{ if $voter }}{{ template "motion_actions" . }}{{ end }}
- {{ end}}
- </tr>
- </tbody>
-</table>
+ </div>
+</div>
+{{ end}}
{{ template "footer" . }} \ No newline at end of file
diff --git a/templates/motion_fragments.html b/templates/motion_fragments.html
index d5f0233..ed036d7 100644
--- a/templates/motion_fragments.html
+++ b/templates/motion_fragments.html
@@ -1,92 +1,64 @@
{{ define "motion_fragment" }}
-<div class="column">
- <div class="ui raised segment">
- <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>
- <h2 class="header"><a href="/motions/{{ .Tag }}">{{ .Tag }}: {{ .Title }}</a></h2>
- <pre>{{ wrap 76 .Content }}</pre>
- <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 }}
- <a href="/motions/{{ .Tag }}?showvotes=1">Show Votes</a>
- {{ end }}
- </td>
- </tr>
- </tbody>
- </table>
- </div>
-</div>
-<!--
- <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>
- -->
+<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>
+<pre>{{ wrap 76 .Content }}</pre>
+<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>
{{ end }}
-{{ define "status_class" }}{{ if eq . 0 }}blue{{ else if eq . 1 }}green{{ else if eq . -1 }}red{{ else if eq . -2 }}grey{{ end }}{{ end }}
+{{ define "status_class" }}{{ if eq . 0 }}blue{{ else if eq . 1 }}green{{ else if eq . -1 }}red{{ else if eq . -2 }}grey
+{{ end }}{{ 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>
+{{ 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 }}
{{ end }}
diff --git a/templates/motions.html b/templates/motions.html
index bb4bb94..3f82092 100644
--- a/templates/motions.html
+++ b/templates/motions.html
@@ -1,52 +1,52 @@
{{ template "header" . }}
{{ $voter := .Voter }}
<div class="column">
- <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>
- <a href="/motions/?unvoted=1" class="{{ if .Params.Flags.Unvoted }}active {{ end}}item" title="Show my outstanding votes">My outstanding votes</a>
+ <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 }}
- {{ template "motion_fragment" . }}
- {{ end }}
-<table class="list">
- <thead>
- <tr>
- <th>Status</th>
- <th>Motion</th>
- {{ if $voter }}
- <th>Actions</th>
- {{ end }}
- </tr>
- </thead>
- <tbody>
- {{range .Decisions }}
- <tr>
+ <div class="column">
+ <div class="ui raised segment">
{{ template "motion_fragment" . }}
{{ if $voter }}{{ template "motion_actions" . }}{{ end }}
- </tr>
- {{end}}
- <tr>
- <td colspan="2" class="navigation">
- {{ if .PrevPage }}<a href="?page={{ .PrevPage }}{{ if .Params.Flags.Unvoted }}&unvoted=1{{ end }}" title="previous page">&lt;</a>{{ end }}
- {{ if .NextPage }}<a href="?page={{ .NextPage }}{{ if .Params.Flags.Unvoted }}&unvoted=1{{ end }}" title="next page">&gt;</a>{{ end }}
- </td>
- {{ if $voter }}
- <td class="actions">
- <ul>
- <li><a href="/newmotion/">New Motion</a></li>
- </ul>
- </td>
- {{ end }}
- </tr>
- </tbody>
-</table>
-{{else}}
-{{ if .Params.Flags.Unvoted }}
-<p>There are no motions requiring a vote from you.</p>
+ </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 }}
-<p>There are no motions in the system yet.</p>
+ {{ 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 }}
-{{end}}
{{ template "footer" . }} \ No newline at end of file
diff --git a/templates/proxy_vote_form.html b/templates/proxy_vote_form.html
index eb5c421..3bfa9df 100644
--- a/templates/proxy_vote_form.html
+++ b/templates/proxy_vote_form.html
@@ -1,61 +1,54 @@
{{ template "header" . }}
{{ $form := .Form }}
-<table class="list">
- <thead>
- <tr>
- <th>Status</th>
- <th>Motion</th>
- </tr>
- </thead>
- <tbody>
- <tr>
+<div class="column">
+ <div class="ui basic segment">
+ <div class="ui floated right secondary menu">
+ <a href="/motions/" class="item" title="Show all votes">Back to
+ motions</a>
+ </div>
+ </div>
+</div>
+<div class="column">
+ <div class="ui raised segment">
{{ with .Decision }}
- {{ template "motion_fragment" .}}
+ {{ template "motion_fragment" . }}
{{ end }}
- </tr>
- </tbody>
-</table>
-<form action="/proxy/{{ .Decision.Tag }}" method="post">
- <table>
- <tr>
- <th>Voter</th>
- <th>Vote</th>
- </tr>
- <tr>
- <td>
- <select name="Voter">
- {{ range .Voters }}
- <option value="{{ .Id }}"
- {{ if eq (.Id | print) $form.Voter }}
- selected{{ end }}>{{ .Name }}</option>
- {{ end }}
- </select>
- </td>
- <td>
- <select name="Vote">
- <option value="1"{{ if eq $form.Vote "1" }}
- selected{{ end }}>Aye
- </option>
- <option value="0"{{ if eq $form.Vote "0" }}
- selected{{ end }}>Abstain
- </option>
- <option value="-1"{{ if eq $form.Vote "-1" }}
- selected{{ end }}>Naye
- </option>
- </select>
- </td>
- </tr>
- <tr>
- <th colspan="2">Justification:</th>
- </tr>
- <tr>
- <td colspan="2"><textarea
- name="Justification">{{ $form.Justification }}</textarea>
- </td>
- </tr>
- <tr>
- <td colspan="2"><input type="submit" value="Proxy Vote"></td>
- </tr>
- </table>
-</form>
+ <form action="/proxy/{{ .Decision.Tag }}" method="post">
+ <div class="ui form{{ if .Form.Errors }} error{{ end }}">
+ <div class="two fields">
+ <div class="required field{{ if .Form.Errors.Voter }} error{{ end }}">
+ <label for="Voter">Voter</label>
+ <select name="Voter">
+ {{ range .Voters }}
+ <option value="{{ .Id }}"
+ {{ if eq (.Id | print) $form.Voter }}
+ selected{{ end }}>{{ .Name }}</option>
+ {{ end }}
+ </select>
+ </div>
+ <div class="required field{{ if .Form.Errors.Vote }} error{{ end }}">
+ <label for="Vote">Vote</label>
+ <select name="Vote">
+ <option value="1"{{ if eq .Form.Vote "1" }} selected{{ end }}>Aye</option>
+ <option value="0"{{ if eq .Form.Vote "0" }} selected{{ end }}>Abstain</option>
+ <option value="-1"{{ if eq .Form.Vote "-1" }} selected{{ end }}>Naye</option>
+ </select>
+ </div>
+ </div>
+ <div class="required field{{ if .Form.Errors.Justification }} error{{ end }}">
+ <label for="Justification">Justification</label>
+ <textarea name="Justification" rows="2">{{ .Form.Justification }}</textarea>
+ </div>
+ {{ with .Form.Errors }}
+ <div class="ui error message">
+ {{ with .Voter }}<p>{{ . }}</p>{{ end }}
+ {{ with .Vote }}<p>{{ . }}</p>{{ end }}
+ {{ with .Justification }}<p>{{ . }}</p>{{ end }}
+ </div>
+ {{ end }}
+ <button class="ui primary left labeled icon button" type="submit"><i class="users icon"></i> Proxy Vote</button>
+ </div>
+ </form>
+ </div>
+</div>
{{ template "footer" . }} \ No newline at end of file
diff --git a/templates/withdraw_motion_form.html b/templates/withdraw_motion_form.html
index 809ce28..c5f0846 100644
--- a/templates/withdraw_motion_form.html
+++ b/templates/withdraw_motion_form.html
@@ -1,22 +1,21 @@
{{ template "header" . }}
-<a href="/motions/">Show all votes</a>
-<table class="list">
- <thead>
- <tr>
- <th>Status</th>
- <th>Motion</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- {{ with .Decision }}
- {{ template "motion_fragment" .}}
- {{ end}}
- </tr>
- </tbody>
-</table>
-
+<div class="column">
+ <div class="ui basic segment">
+ <div class="ui floated right secondary menu">
+ <a href="/motions/" class="item" title="Show all votes">Back to motions</a>
+ </div>
+ </div>
+</div>
+{{ with .Decision }}
+<div class="column">
+ <div class="ui raised segment">
+ {{ template "motion_fragment" . }}
+ </div>
+</div>
+{{ end }}
<form action="/motions/{{ .Decision.Tag }}/withdraw" method="post">
- <input type="submit" value="Withdraw" />
+ <div class="ui form">
+ <button class="ui primary left labeled icon button" type="submit"><i class="trash icon"></i> Withdraw</button>
+ </div>
</form>
{{ template "footer" . }}