]> projects.mako.cc - selectricity/blob - app/views/embed/full_vote.rhtml
56715eb064203e78f174e8627b9521e0b3f77f2e
[selectricity] / 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         
10         <ul id="rankings-list">
11       <% @voter.vote.rankings.each do |ranking| %>
12                 <li class="ranking" id="ranking_<%= ranking.candidate.id %>">
13                         <img alt="<%= white_list ranking.candidate.name %>"
14                  src="<% if ranking.candidate.picture -%>
15                       <%= url_for ranking.candidate.picture.public_filename(:thumb) -%>
16                      <%- else -%>
17                      /images/default_icon.png
18                      <%- end %>" />
19                         <p class="ranking-info">
20             <strong><%= white_list ranking.candidate.name %></strong><br />
21             <%= white_list ranking.candidate.description %></p>
22                 </li>
23       <% end %>
24         </ul>
25         
26         <div style="clear:both;"></div>
27         
28         <div id="voting-bottom" style="
29         <% if @election.candidates.length%2 == 0 %>
30         background-image:url(/images/bottom_dark.png)
31         <%else%>
32         background-image:url(/images/bottom_light.png)
33         <%end%>" >
34                 <div id="container">
35                         <a href="<%= url_for :action => :confirm, :id => @password, :embed => 'true' %>"><h2 id="submit_vote_button">Submit Vote</h2></a>
36                         <p><b>Drag and drop</b> to rank the choices.</p>
37                 </div>
38         </div>
39 </div>
40
41 <%= sortable_element 'rankings-list',
42     :url => { :action => "sort_candidates", :id => @voter.vote.id } %>
43

Benjamin Mako Hill || Want to submit a patch?