whoops, committed some errant javascript last time, here removed
[selectricity-live] / app / views / embed / full_vote.rhtml
1 <div id="header">
2 <%= link_to '<img id="header_icon" src="/images/embed_header_icon.png" />',
3             {:controller => 'front'}, {:target => "_parent"} %><h2>Vote Now</h2>
4 </div>
5
6 <div id="voting-box" height="<%=(@election.candidates.length + 2)*53 %>px">
7         
8         <%= render :partial => '/embed/backdrop' %>
9         <ul id="rankings-list">
10       <% @voter.vote.rankings.each do |ranking| %>
11                 <li class="ranking" id="ranking_<%= ranking.candidate.id %>">
12                         <img alt="<%= white_list ranking.candidate.name %>"
13                  src="<% if ranking.candidate.picture -%>
14                       <%= url_for ranking.candidate.picture.public_filename(:thumb) -%>
15                                           <% elsif @default_image %>
16                                           <%= url_for @default_image.public_filename %>
17                       <%- else -%>
18                      /images/default_icon.png
19                      <%- end %>" />
20                         <p class="ranking-info">
21             <strong><%= white_list ranking.candidate.name %></strong><br />
22             <%= white_list ranking.candidate.description %></p>
23                 </li>
24       <% end %>
25         </ul>
26         
27         <div style="clear:both;"></div>
28         
29         <div id="voting-bottom" style="
30         <% if @bottom_bar %>
31         background-image:url(<%= url_for @bottom_bar.public_filename %>)
32         <% elsif @election.candidates.length%2 == 0 %>
33         background-image:url(/images/bottom_dark.png)
34         <%else%>
35         background-image:url(/images/bottom_light.png)
36         <%end%>" >
37                 <div id="container">
38                         <a href="<%= url_for :action => :confirm, :id => @password, :embed => 'true' %>"><h2 id="submit_vote_button">Submit Vote</h2></a>
39                         <p><b>Drag and drop</b> to rank the choices.</p>
40                 </div>
41         </div>
42 </div>
43
44 <%= sortable_element 'rankings-list',
45     :url => { :action => "sort_candidates", :id => @voter.vote.id } %>
46

Benjamin Mako Hill || Want to submit a patch?