1f22377045021aff7704c43a61c3980792f062ef
[selectricity-live] / app / views / election / detailed_results.rhtml
1 <h2>Result</h2>
2
3 <%= render :partial => 'winner' %>
4
5 <h2>Result Details</h2>
6
7 <%= render :partial => 'winner_details' %>
8
9 <h2>Election Rolls for Voter Verification</h2>
10
11 <p>The voting rolls -- displayed here in alphabetical order -- for the
12 last election are are follows.</p>
13
14 <p>Information is displayed here to help voters verifying that their own
15 vote was recorded correctly and that the election was not tampered
16 with.</p>
17
18 <h3>Voters</h3>
19 <table border="1">
20 <th>Voters (A-Z)</th>
21 <% for email in @voter_list %>
22 <tr>
23 <td><%= email %></td>
24 </tr>
25 <% end %>
26 </table>
27
28 <h3>Votes by Token</h3>
29
30 <p>The votes, listed in alphabetical order by token.</p>
31
32 <table border="1">
33 <tr>
34   <th rowspan="2">Token (0-9, A-Z)</th>
35   <th colspan="<%= @election.candidates.length %>">Rank of Candidates</th>
36 </tr>
37 <tr>
38
39 <% for candidate in @election.candidates.sort.reverse %>
40   <th><%= candidate %></th>
41 <% end %>
42
43 </tr>
44 <% for vote in @vote_list %>
45   <tr>
46   <td><%= vote.token %></td>
47   <% for ranking in vote.rankings %>
48     <td><%= ranking %></td>
49   <% end %>
50   </tr>
51 <% end %>
52 </table>

Benjamin Mako Hill || Want to submit a patch?