a96fc41c609633882b514fb39db8d5067b31f936
[selectricity] / app / views / quickvote / index.rhtml
1 <div id="page-title">
2         <span class="header">Quickvote</span>
3         <span class="subheader"><%=h @voter.election.description.capitalize %></span>
4 </div>
5
6 <div class="main-content">
7
8 <% if @voter.voted? %>
9
10   <p>You have already voted. You can:</p>
11   
12   <ul>
13     <li><%= link_to "Change your vote.", quickaction_url( :ident => @voter.election.name, :action => 'change' ) %></li>
14
15     <li><%= link_to "View election results.", quickaction_url( :ident => @voter.election.name, :action => 'results' ) %></li>
16   </ul>
17 <% else %>
18
19 <p>Drag and drop the items on the following list until they are in order
20 from <em>most preferred at the top</em> to <em>least preferred at the
21 bottom</em>. When you are done, press confirm to record your vote.</p>
22
23 <div id="sortable_list">
24 <ol id="rankings-list">
25   <% for ranking in @voter.vote.rankings %>
26     <li class="moveable" id="ranking_<%= ranking.candidate.id %>">
27       <%=h ranking.candidate.name.capitalize %></li>
28   <% end %>
29 </ol>
30 </div>
31
32 <div class="clear-div"></div>
33
34 <%= button_to "Confirm Vote", quickaction_url( :action => 'confirm', :ident => @voter.election.name)  %>
35
36 <%= sortable_element 'rankings-list',
37     :url => { :action => "sort_candidates" , :id => @voter.vote.id },
38     :complete => visual_effect(:highlight, 'rankings-list') %> 
39
40 <% end %>
41 </div> <!-- end main-content -->

Benjamin Mako Hill || Want to submit a patch?