merged in from code from the other master
[selectricity-live] / app / views / common / results.rhtml
1 <!-- create the default variables -->
2 <% @results = @election.results %>
3 <% @names = @election.names_by_id %>
4 <% @candidates = @election.candidate_hash %>
5
6 <% require 'whois/whois' %>
7
8 <div id="title-header">
9   <span class="header">Results</span>
10   <span class="subheader"><%= @election.name %></span>
11 </div>
12
13 <div id="winner_box">
14 <%= render :partial => 'common/result', :object => @results[@election.election_method] %>
15 </div>
16
17 <% if @election.shortdesc %>
18   <p><strong>Vote Description:</strong></p>
19   <blockquote><em><%=h @election.shortdesc %></em>
20     <% if @election.longdesc -%>
21       <br />
22       <%= h(@election.longdesc) -%>
23     <% end -%>
24   </blockquote>
25 <% end %>
26
27 <p><strong>Number of voters:</strong></p>
28    <blockquote>
29      <%= @election.voters.reject {|v| not v.voted? }.length %>
30    </blockquote>
31
32 <%= render :partial => 'common/result_box',
33            :locals => { :method => @election.election_method } %>
34
35 <% for result_type in @election.other_methods %>
36
37 <%= render :partial => 'common/result_box',
38            :locals => { :method => result_type } %>
39
40 <% end %>
41
42
43 <div class="clear-div"></div>
44
45 <!--
46 <%= image_tag( graph_url( :action => 'choices_positions', :id => @election ) ) %><br />
47 -->
48

Benjamin Mako Hill || Want to submit a patch?