]> projects.mako.cc - selectricity/blob - app/views/election/_voter_list.rhtml
Changed justin's email in README because mit.edu address is out of date.
[selectricity] / app / views / election / _voter_list.rhtml
1 <% if @election.voters.length == 0 %>
2
3 <p>There are currently no voters registered for this election.</p>
4
5 <% else %>
6
7 <p>The following voters are currently registered for this election:</p>
8
9 <ul>
10 <% @election.voters.each do |voter| %>
11   <div id="voter<%= voter.id %>">
12     <li><%= voter.email %>
13         <% if @edit %>
14         <%= link_to_remote "Delete",
15                     :complete => "Element.remove('voter#{voter.id}')",
16                     :url => { :action => :delete_voter, :id => @election.id,
17                               :voter => voter.id } %>
18         <% end %>
19     </li>
20   </div>  
21   <% end %>
22 </ul>
23 <% end %>

Benjamin Mako Hill || Want to submit a patch?