added support for results for full elections
[selectricity-live] / app / views / voter / details.rhtml
diff --git a/app/views/voter/details.rhtml b/app/views/voter/details.rhtml
new file mode 100644 (file)
index 0000000..584c408
--- /dev/null
@@ -0,0 +1,50 @@
+<div id="title-header">
+  <span class="header">Details</span>
+  <span class="subheader"><%= @election.name %></span>
+</div>
+
+<p>This page contains information useful for auditing elections and
+verify that votes were tabulated correctly.</p>
+
+<p>The following invididuals (in random order) voted in this
+election:</p>
+
+<ol>
+<%- @voters.each do |voter| -%>
+<li><%= voter.email %></li>
+<%- end -%>
+</ol>
+
+<p>The following table lists the votes cast in random order.</p>
+
+<p>The column marked <em>Verification Token</em> lists tokens that were
+given to voters at the time of voting. Voters can check to see that the
+vote that corresponds to their token was recorded correctly. The column
+marks "vote" lists the candidates in order of the voter's preference. To
+read these votes, please refer to the key below.</p>
+
+<table class="preftable">
+<tr>
+<th>Verification Token</th>
+<th>Vote</th>
+<%- @votes.each do |vote| -%>
+<tr>
+<td><%= vote.token %></td><td><%= vote.votestring%></td>
+</tr>
+<%- end -%>
+</table>
+
+<p style="margin-top: 1em;">Key:</p>
+
+<table class="preftable">
+<tr>
+<th>Code</th>
+<th>Candidate</th>
+<%- @election.candidates.sort.each_with_index do |c, i| -%>
+<tr>
+<td><%= (i + 65).chr %></td>
+<td><%= c.name %></td>
+</tr>
+<%- end -%>
+</table>
+

Benjamin Mako Hill || Want to submit a patch?