added support for results for full elections
[selectricity] / app / views / common / _sortable_vote.rhtml
diff --git a/app/views/common/_sortable_vote.rhtml b/app/views/common/_sortable_vote.rhtml
new file mode 100644 (file)
index 0000000..6876966
--- /dev/null
@@ -0,0 +1,15 @@
+<div id="sortable_list">
+<ol id="rankings-list">
+  <% for ranking in @voter.vote.rankings %>
+    <li class="moveable" id="ranking_<%= ranking.candidate.id %>">
+      <%=h ranking.candidate.name.capitalize %></li>
+  <% end %>
+</ol>
+</div>
+
+<div class="clear-div"></div>
+
+<%= sortable_element 'rankings-list',
+    :url => { :action => "sort_candidates", :id => @voter.vote.id },
+    :complete => visual_effect(:highlight, 'rankings-list') %>
+

Benjamin Mako Hill || Want to submit a patch?