]> projects.mako.cc - selectricity-live/blobdiff - app/views/election/show.rhtml
the embeddable widgets now grow or shrink to accomodate more candidates, there are...
[selectricity-live] / 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>
 
-<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?