From df1e1ca70a2c618eb376ea6b61207c726beac31d Mon Sep 17 00:00:00 2001 From: Date: Fri, 31 Aug 2007 12:29:09 -0400 Subject: [PATCH] The other election methods will now display the winner they elected in their own partials when selected. The link to the voter map and host names has been moved into the side-div and the link name was appended to include more info. --- app/views/quickvote/_result_box.rhtml | 5 ++++- app/views/quickvote/_results_sidebar.rhtml | 7 +++++++ app/views/quickvote/results.rhtml | 8 -------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/views/quickvote/_result_box.rhtml b/app/views/quickvote/_result_box.rhtml index 41d9d17..917dbd4 100644 --- a/app/views/quickvote/_result_box.rhtml +++ b/app/views/quickvote/_result_box.rhtml @@ -9,8 +9,11 @@ <% end %> +<% unless @election.election_method == method -%> +<%= render :partial => 'result', :object => @results[method]%> +<% end -%> <%= render :partial => 'methodinfo_' + method, - :object => @results[@election.election_method] %> + :object => @results[method] %> diff --git a/app/views/quickvote/_results_sidebar.rhtml b/app/views/quickvote/_results_sidebar.rhtml index c60ed3d..37776b8 100644 --- a/app/views/quickvote/_results_sidebar.rhtml +++ b/app/views/quickvote/_results_sidebar.rhtml @@ -34,4 +34,11 @@ Event.observe(method_select, 'change', show_results_for);

Statistics

<%= image_tag( graph_url( :action => 'votes_per_interval', :id => @election ))%> +
+
+ +

Voter Report

+ +

<%= link_to "[View All Voters: Map and Other Info]", :controller => "quickvote", + :action => "list_voters", :id => @election.id %>

diff --git a/app/views/quickvote/results.rhtml b/app/views/quickvote/results.rhtml index 52810fe..3ba74f5 100644 --- a/app/views/quickvote/results.rhtml +++ b/app/views/quickvote/results.rhtml @@ -41,14 +41,6 @@
-
- Voter Report - -
- -

<%= link_to "[View All Voters]", :controller => "quickvote", :action => "list_voters", :id => @election.id %>

-
- -- 2.39.5