2 <%javascript_include_tag :defaults %>
4 <script type="text/javascript">
6 document.getElementById("header").style.backgroundImage="<%=url_for @top_bar.public_filename%>"
12 <%= link_to '<img id="header_icon" src="/images/embed_header_icon.png" />',
13 {:controller => 'front'}, {:target => "_parent"} %><h2>Vote Now</h2>
16 <div id="voting-box" height="<%=(@election.candidates.length + 2)*53 %>px">
18 <%= render :partial => '/embed/backdrop' %>
19 <ul id="rankings-list">
20 <% @voter.vote.rankings.each do |ranking| %>
21 <li class="ranking" id="ranking_<%= ranking.candidate.id %>">
22 <img alt="<%= white_list ranking.candidate.name %>"
23 src="<% if ranking.candidate.picture -%>
24 <%= url_for ranking.candidate.picture.public_filename(:thumb) -%>
25 <% elsif @default_image %>
26 <%= url_for @default_image.public_filename %>
28 /images/default_icon.png
30 <p class="ranking-info">
31 <strong><%= white_list ranking.candidate.name %></strong><br />
32 <%= white_list ranking.candidate.description %></p>
37 <div style="clear:both;"></div>
39 <div id="voting-bottom" style="
41 background-image:url(<%= url_for @bottom_bar.public_filename %>)
42 <% elsif @election.candidates.length%2 == 0 %>
43 background-image:url(/images/bottom_dark.png)
45 background-image:url(/images/bottom_light.png)
48 <a href="<%= url_for :action => :confirm, :id => @password, :embed => 'true' %>"><h2 id="submit_vote_button">Submit Vote</h2></a>
49 <p><b>Drag and drop</b> to rank the choices.</p>
54 <%= sortable_element 'rankings-list',
55 :url => { :action => "sort_candidates", :id => @voter.vote.id } %>