]> projects.mako.cc - selectricity/blobdiff - app/views/election/show.rhtml
The results page should now work for scaling embeddableelections as well.
[selectricity] / app / views / election / show.rhtml
index 6060fb162d08a6f6b14c609ab93d6b291c2060f1..04c71a62269e9c451b15f8fc24f99a25e0d3bb4e 100644 (file)
 <p>To embed your election, copy and paste the following code into your
 homepage:</p>
 
 <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 %>
 <%= h("</iframe>") %></pre>
 
 <% end %>

Benjamin Mako Hill || Want to submit a patch?