]> projects.mako.cc - selectricity-live/commitdiff
the embeddable widgets now grow or shrink to accomodate more candidates, there are...
author<jlsharps@mit.edu> <>
Thu, 22 May 2008 17:38:38 +0000 (13:38 -0400)
committer<jlsharps@mit.edu> <>
Thu, 22 May 2008 17:38:38 +0000 (13:38 -0400)
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?