Added a new bar graph, that counts how many points the borda system of
[selectricity] / app / views / quickvote / results.rhtml
index fe2b09a0ad94921bf2cf7ff778afdb7e99a66c58..5fdfc3c49624aae03bebe9f91eeab9e09e6deed3 100644 (file)
@@ -21,7 +21,7 @@
 
 <p><strong>Number of voters:</strong></p>
    <blockquote>
-     <%= @election.voters.length %> (see below for details) 
+     <%= @election.voters.reject {|v| not v.voted? }.length %> (see below for details) 
    </blockquote>
 
 <h2>Winners</h2>
@@ -123,7 +123,6 @@ points is the winner.</p>
 
 <div class="resultbox">
 <h3>Instant Runoff (IRV) Results</h3>
-<%= render :partial => 'result', :object => @runoff_result %>
 
 <div class="rbmoreinfo"
 <h4>About Instant Runoff Voting</h4>
@@ -154,6 +153,7 @@ by several other names.</p>
 <th>Vote</th>
 </tr>
 <% for voter in @election.voters %>
+  <% next unless voter.voted? %>
   <tr>
   <td><%= voter.ipaddress %></td>
   <td><%= `host #{voter.ipaddress}`.sub(/^.*pointer (.*)\.$/, '\1') %></td>
@@ -161,3 +161,9 @@ by several other names.</p>
   </tr>
 <% end %>
 </table>
+
+<%= image_tag( graph_url( :action => 'votes_per_day', :id => @election ) ) %><br />
+<%= image_tag( graph_url( :action => 'votes_per_interval', :id => @election ))%><br />
+<%= image_tag( graph_url( :action => 'borda_bar', :id => @election ) ) %>
+
+

Benjamin Mako Hill || Want to submit a patch?