Made a large number of mostly cosmetic fixes after a detailed
[selectricity] / app / views / quickvote / results.rhtml
1 <% %>
2 <h1>Results</h1>
3
4 <% if @election.shortdesc %>
5   <p><strong>Description:</strong></p>
6   <blockquote><em><%= @election.shortdesc %></em>
7     <% if @election.longdesc -%>
8       <br />
9       <%= h(@election.longdesc) -%>
10     <% end -%>
11   </blockquote>
12 <% end %>
13
14 <p><strong>Candidates/choices:</strong></p>
15
16 <ol>
17   <% for candidate in @election.candidates.sort %>
18     <li><%= candidate.name.capitalize %></li>
19   <% end %>
20 </ol>
21
22 <p><strong>Number of voters:</strong></p>
23    <blockquote>
24      <%= @election.voters.length %> (see below for details) 
25    </blockquote>
26
27 <h2>Winners</h2>
28
29 <div class="mainresultbox">
30 <center><h3>Condorcet (w/ Cloneproof SSD) Results</h3></center>
31 <%= render :partial => 'result', :object => @ssd_result %>
32 </div>
33
34 <div class="resultbox">
35 <h3>Plurality Results</h3>
36 <%= render :partial => 'result', :object => @plurality_result %>
37 </div>
38
39 <div class="resultbox">
40 <h3>Approval Result</h3>
41 <p><font size="-1">(Assuming top two choices are "approved.")</font></p>
42 <%= render :partial => 'result', :object => @approval_result %>
43 </div>
44
45 <div class="resultbox">
46 <h3>Simple Condorcet Results</h3>
47 <%= render :partial => 'result', :object => @condorcet_result %>
48 </div>
49
50 <div class="resultbox">
51 <h3>Borda Count Results</h3>
52 <%= render :partial => 'result', :object => @borda_result %>
53 </div>
54
55 <div class="resultbox">
56 <h3>Instant Runoff (IRV) Results</h3>
57 <%= render :partial => 'result', :object => @runoff_result %>
58 </div>
59
60 <div class="clearbox"></div>
61
62 <h2>Voters</h2>
63
64 <table border="1">
65 <tr>
66 <th>IP Address</th>
67 <th>DNS/Host</th>
68 <th>Vote</th>
69 </tr>
70 <% for voter in @election.voters %>
71   <tr>
72   <td><%= voter.ipaddress %></td>
73   <td><%= `host #{voter.ipaddress}`.sub(/^.*pointer (.*)\.$/, '\1') %></td>
74   <td><%= voter.vote.votestring %></td>
75   </tr>
76 <% end %>
77 </table>

Benjamin Mako Hill || Want to submit a patch?