-<%
-# basic election information template
--%>
+<% if @election.voters.length == 0 %>
-<% unless @election.voters.empty? %>
- <p>The following voters are currently registered for this election:</p>
+<p>There are currently no voters registered for this election.</p>
- <ul>
- <% @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 } %>
- <% end %>
- </li>
- </div>
- <% end %>
- </ul>
-<% end %>
+<% else %>
+<p>The following voters are currently registered for this election:</p>
+<ul>
+<% @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 } %>
+ <% end %>
+ </li>
+ </div>
+ <% end %>
+</ul>
+<% end %>