added support for results for full elections
[selectricity-live] / app / views / voter / results.rhtml
diff --git a/app/views/voter/results.rhtml b/app/views/voter/results.rhtml
new file mode 100644 (file)
index 0000000..bb95c88
--- /dev/null
@@ -0,0 +1,43 @@
+<% require 'whois/whois' %>
+
+<div id="title-header">
+  <span class="header">Results</span>
+  <span class="subheader"><%= @election.name %></span>
+</div>
+
+<div id="winner_box">
+<%= render :partial => 'common/result', :object => @results[@election.election_method] %>
+</div>
+
+<% if @election.shortdesc %>
+  <p><strong>Vote Description:</strong></p>
+  <blockquote><em><%=h @election.shortdesc %></em>
+    <% if @election.longdesc -%>
+      <br />
+      <%= h(@election.longdesc) -%>
+    <% end -%>
+  </blockquote>
+<% end %>
+
+<p><strong>Number of voters:</strong></p>
+   <blockquote>
+     <%= @election.voters.reject {|v| not v.voted? }.length %>
+   </blockquote>
+
+<%= render :partial => 'common/result_box',
+           :locals => { :method => @election.election_method } %>
+
+<% for result_type in @election.other_methods %>
+
+<%= render :partial => 'common/result_box',
+           :locals => { :method => result_type } %>
+
+<% end %>
+
+
+<div class="clear-div"></div>
+
+<!--
+<%= image_tag( graph_url( :action => 'choices_positions', :id => @election ) ) %><br />
+-->
+

Benjamin Mako Hill || Want to submit a patch?