2 <%= render :partial => 'result', :object => @results[@election.election_method] %>
4 <p>This election was run using:
5 <strong><%= ELECTION_TYPES[@election.election_method] %></strong></p>
7 <p>View results using other methods:<br />
8 <% type_hash = {}; ELECTION_TYPES.each {|k,v| type_hash[v] = k} %>
9 <%= select_tag 'election_type_select', options_for_select(type_hash, @election.election_method) %></p>
12 var election_methods = new Array(<%= ELECTION_TYPES.keys.collect {|k| "'#{k}'"}.join(', ') %>);
13 var method_select = $('election_type_select');
15 function show_results_for() {
19 var result_boxes = document.getElementsByClassName('resultbox');
20 for (i = 0; i < result_boxes.length; i++) {
21 result_box = result_boxes[i];
22 if (result_box.id == (method_select.value + "_result")) {
23 Element.show(result_box);
25 Element.hide(result_box);
29 //alert(method_select.value);
32 Event.observe(method_select, 'change', show_results_for);
36 <%= image_tag( graph_url( :action => 'votes_per_interval', :id => @election ))%>
42 <p><%= link_to "[Map/List of Voters]", :controller => "quickvote",
43 :action => "list_voters", :id => @election.id %></p>