]> projects.mako.cc - selectricity-live/blobdiff - app/views/quickvote/_results_sidebar.rhtml
File upload system for custom skins almost complete.
[selectricity-live] / app / views / quickvote / _results_sidebar.rhtml
index 37776b802f0cdbff66f125921248b3b3f4bb3a87..13e0dd057075605435bee8997f9c0db1062862e0 100644 (file)
@@ -1,44 +1,8 @@
-<h2>Winner</h2>
-<%= render :partial => 'result', :object => @results[@election.election_method] %>
-
-<p>This election was run using:
-<strong><%= ELECTION_TYPES[@election.election_method] %></strong></p>
-
-<p>View results with other methods:<br />
-<% type_hash = {}; ELECTION_TYPES.each {|k,v| type_hash[v] = k} %>
-<%= select_tag 'election_type_select', options_for_select(type_hash, @election.election_method) %></p>
-
-<script>
-var election_methods = new Array(<%= ELECTION_TYPES.keys.collect {|k| "'#{k}'"}.join(', ') %>);
-var method_select = $('election_type_select'); 
-
-function show_results_for() {
-  var test = $('test');
-
-  method_select.value;
-  var result_boxes = document.getElementsByClassName('resultbox');
-  for (i = 0; i < result_boxes.length; i++) {
-    result_box = result_boxes[i];
-    if (result_box.id == (method_select.value + "_result")) {
-      Element.show(result_box);
-    } else {
-      Element.hide(result_box);
-    }
-  }
-
-  //alert(method_select.value);
-}
-
-Event.observe(method_select, 'change', show_results_for);
-</script>
-
-<h2>Statistics</h2>
-<%= image_tag( graph_url( :action => 'votes_per_interval', :id => @election ))%>
-<br />
-<br />
+<!-- common data to all sidebars -->
+<%= render_partial 'common/results_sidebar' %>
 
 <h2>Voter Report</h2>
 
-<p><%= link_to "[View All Voters: Map and Other Info]", :controller => "quickvote",
+<p><%= link_to "[Map/List of Voters]", :controller => "quickvote",
        :action => "list_voters", :id => @election.id %></p>
 

Benjamin Mako Hill || Want to submit a patch?