X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/5a8b533b5abec8dc24674e4ef084b0b9779da8af..9abed97635edbac7fb1a687298fff5c5434cdff4:/app/views/elections/list.rhtml diff --git a/app/views/elections/list.rhtml b/app/views/elections/list.rhtml index 40e24b5..83be6c6 100644 --- a/app/views/elections/list.rhtml +++ b/app/views/elections/list.rhtml @@ -1,20 +1,28 @@ +<% %>

Listing elections

- - - <% for column in Election.content_columns %> - - <% end %> - - +
<%= column.human_name %>
+ <% for election in @elections %> - <% for column in Election.content_columns %> - - <% end %> - - - + + + <% end %>
<%=h election.send(column.name) %><%= link_to 'Show', :action => 'show', :id => election %><%= link_to 'Edit', :action => 'edit', :id => election %><%= link_to 'Destroy', { :action => 'destroy', :id => election }, :confirm => 'Are you sure?' %>

<%= link_to election.name, :action => 'show', :id => election %>

+

Description:

+
<%= election.description %>
+ +

Election Information:

+
    +
  • <%= election.voters.length %> registered voters
  • +
  • <%= "Not " unless election.anonymous == 1 %>Anonymous
  • +
  • Starts <%= election.startdate %>
  • +
  • Ends <%= election.enddate %>
  • +
+
+

Candidates:

+ <% @election = election %><%= render :partial => 'candidate_list', :id => election.id %> +
+ <%= link_to 'Destroy', { :action => 'destroy', :id => election }, :confirm => 'Are you sure?' %>