minor changes to the election show page, still having trouble figuring out how to...
author<jlsharps@mit.edu> <>
Thu, 22 May 2008 19:50:14 +0000 (15:50 -0400)
committer<jlsharps@mit.edu> <>
Thu, 22 May 2008 19:50:14 +0000 (15:50 -0400)
app/views/election/show.rhtml

index 04c71a62269e9c451b15f8fc24f99a25e0d3bb4e..701c6072b35e56d2e03f7c579ce35a499c0b03f4 100644 (file)
@@ -2,19 +2,19 @@
   <span class="header">Election Overview</span>
   <span class="subheader"></span>
 </div>
-
-<% if @election.done? %>
+<% if @election.enddate < Time.now %>
 <div id="status">Election is finished. <%= link_to "View results",
-  :action => 'detailed_results', :id => @election.id %>.</div>
+       :controller => 'voter', :action => 'index', 
+       :election_id => @election.id %>.</div>
 
-<% elsif (@election.active? && @election.viewable?) %>
+<% elsif (@election.active? && @election.early_results? ) %>
   <div id="status">The creator of this election has decided that the results
        should be viewable while the election is in progress.
        <%if @election.voters.empty? %>
        However, no one has voted yet.
        <% else %>
-       <%= link_to "View results", :action => 'detailed_results', 
-               :id => @election.id %>.
+       <%= link_to "View results", :controller => 'voter', :action => 'results', 
+               :id => "open" %>.
     <% end %>
   </div>
 <% elsif @election.active? %>

Benjamin Mako Hill || Want to submit a patch?