X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/46f924b34b305d2474b09ce204a7a9187e8d8622..3d349b24ddccc0ce66b72de9d9fd4b4326d8fe75:/app/views/quickvote/results.rhtml diff --git a/app/views/quickvote/results.rhtml b/app/views/quickvote/results.rhtml index 1fad7ea..cba32d0 100644 --- a/app/views/quickvote/results.rhtml +++ b/app/views/quickvote/results.rhtml @@ -1,4 +1,5 @@ -<% %> +<% %> +<%require 'IPAddr' %>

Results

<% if @election.shortdesc %> @@ -145,7 +146,6 @@ by several other names.

Voters

- @@ -156,14 +156,22 @@ by several other names.

<% next unless voter.voted? %> - + <% end %>
IP Address
<%= voter.ipaddress %><%= `host #{voter.ipaddress}`.sub(/^.*pointer (.*)\.$/, '\1') %><% begin %> + <%= `host #{IPAddr.new(voter.ipaddress).to_s}`.sub(/^.*pointer (.*)\.$/, '\1') %> + + <% rescue ArgumentError => err %> + <%= voter.ipaddress %> + <% end %> + <%= voter.vote.votestring %>
+<%= render :partial => 'defeats_list' %> +<%= render :partial => 'pref_table' %> + <%= image_tag( graph_url( :action => 'votes_per_day', :id => @election ) ) %>
<%= image_tag( graph_url( :action => 'votes_per_interval', :id => @election ))%>
<%= image_tag( graph_url( :action => 'borda_bar', :id => @election ) ) %>
<%= image_tag( graph_url( :action => 'choices_positions', :id => @election ) ) %> -