merged in from code from the other master
[selectricity] / app / views / election / show.rhtml
index ff116f47570a1a8f1cb1bab7e12b393a1b2744e8..39621bfbf329b1457a2752b7aa0dd7348be41177 100644 (file)
@@ -8,13 +8,13 @@
        :election_id => @election.id %>.</div>
 
 <% elsif (@election.active? && @election.early_results? ) %>
-  <div id="status">The creator of this election has decided that the results
+  <div id="status">You have decided that the results
        should be viewable while the election is in progress.
-       <%if @election.voters.empty? %>
+       <%if @election.voters.select {|v| v.vote.confirmed?}.empty? %>
        However, no one has voted yet.
        <% else %>
-       <%= link_to "View results", :controller => 'voter', :action => 'results', 
-               :id => "open" %>.
+       <%= link_to "View results", :controller => 'election', :action => 'results', 
+               :id => @election.id %>.
     <% end %>
   </div>
 <% elsif @election.active? %>
      (<%= votepassword_url(:urlpassword => "open." + @election.id.to_s) %>)</li>
 
 <% if @election.kiosk %>
-<li><%= (link_to ("Kiosk mode",
-          :controller => 'voter', :action => 'index', :election_id => @election.id, :kiosk => true)).to_s %>
-     (<%= votepassword_url(:urlpassword => "open." + @election.id.to_s, :kiosk => true) %>)</li>
+<li><%= link_to("Kiosk mode",
+           kiosk_ready_url(:urlpassword => "open." + @election.id.to_s,
+                           :kiosk => true)) %>
+        (<%= kiosk_ready_url(:urlpassword => "open." + @election.id.to_s, :kiosk => true) %>)
   <% end %>
 </ul>
 <% end -%>

Benjamin Mako Hill || Want to submit a patch?