]> projects.mako.cc - selectricity/blobdiff - app/views/election/_voter_list.rhtml
Added some minor TODO's for increased user funcitonality. Change email, beautify...
[selectricity] / app / views / election / _voter_list.rhtml
index c55afdb63e62ebc10768bfc1fb3c65c67d76c09f..34aa2074d385a6f5f0d6730e5c6420473cfc84af 100644 (file)
@@ -1,18 +1,20 @@
-<% %>
-
 <% if @election.voters.length == 0 %>
+
 <p>There are currently no voters registered for this election.</p>
+
 <% else %>
+
 <p>The following voters are currently registered for this election:</p>
 
 <ul>
-  <% @election.voters.each do |voter| %>
+<% @election.voters.each do |voter| %>
   <div id="voter<%= voter.id %>">
     <li><%= voter.email %>
         <% if @edit %>
         <%= link_to_remote "Delete",
                     :complete => "Element.remove('voter#{voter.id}')",
-                    :url => { :action => :delete_voter, :id => voter.id } %>
+                    :url => { :action => :delete_voter, :id => @election.id,
+                              :voter => voter.id } %>
         <% end %>
     </li>
   </div>  

Benjamin Mako Hill || Want to submit a patch?