2 <h1>Listing elections</h1>
4 <table cellpadding="10px">
6 <% for election in @elections %>
8 <td valign="top"><h2><%= link_to election.name, :action => 'show', :id => election %></h2>
9 <p><strong>Description:</strong></p>
10 <blockquote><%= election.description %></blockquote>
12 <p><strong>Election Information:</strong></p>
14 <li><%= election.voters.length %> registered voters</li>
15 <li><%= "<strong>Not</strong> " unless election.anonymous == 1 %>Anonymous</li>
16 <li>Starts <%= election.startdate %></li>
17 <li>Ends <%= election.enddate %></li>
21 <p><strong>Candidates:</strong></p>
22 <% @election = election %><%= render :partial => 'candidate_list', :id => election.id %>
25 <%= link_to 'Destroy', { :action => 'destroy', :id => election }, :confirm => 'Are you sure?' %></td>
30 <%= link_to 'Previous page', { :page => @election_pages.current.previous } if @election_pages.current.previous %>
31 <%= link_to 'Next page', { :page => @election_pages.current.next } if @election_pages.current.next %>
35 <%= link_to 'New election', :action => 'new' %>