Major changes in this commit over include work over several days but that was never...
[selectricity] / app / views / elections / detailed_results.rhtml
diff --git a/app/views/elections/detailed_results.rhtml b/app/views/elections/detailed_results.rhtml
new file mode 100644 (file)
index 0000000..48296d6
--- /dev/null
@@ -0,0 +1,31 @@
+<p>The voting rolls for the last election are are follows.</p>
+
+<h2>Voters</h2>
+<table>
+<% for voter in @voting_rolls.randomize %>
+<tr>
+<td><%= voter.email %></td>
+</tr>
+<% end %>
+</table>
+
+<h2>Votes (by Token)</h2>
+<table border="1">
+<tr>
+  <th rowspan="2">Token</th>
+  <th colspan="<%= @election.candidates.length %>">Rank of Candidates</th>
+</tr>
+<tr>
+<% for candidate in @election.candidates.sort %>
+  <th><%= candidate %></th>
+<% end %>
+</tr>
+<% for voter in @voting_rolls.randomize %>
+<tr>
+<td><%= voter.vote.token %></td>
+<% for ranking in voter.vote %>
+<td><%= ranking %></td>
+<% end %>
+</tr>
+<% end %>
+</table>

Benjamin Mako Hill || Want to submit a patch?