]> projects.mako.cc - selectricity-live/blobdiff - app/views/election/show.rhtml
fixed a typo in election controller in the edit_general_information method.
[selectricity-live] / app / views / election / show.rhtml
index 6060fb162d08a6f6b14c609ab93d6b291c2060f1..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? %>
 <p>To embed your election, copy and paste the following code into your
 homepage:</p>
 
-<pre><%= h("<iframe src='") + votepassword_url(:urlpassword => "open." + @election.id.to_s, :embed => "true") + h("' width='330px' height='370px'>") %>
+<pre><%= h("<iframe src='") + votepassword_url(:urlpassword => "open." + @election.id.to_s, :embed => "true") + h("' width='330px' height='#{(@election.candidates.length+2)*53}px'>" ) %>
 <%= h("</iframe>") %></pre>
 
 <% end %>

Benjamin Mako Hill || Want to submit a patch?