Account Summary

This is your account summary profile, <%=h @user.login.capitalize %>

E-mail: <%=h @user.email %>
Member since: <%=h @user.created_at.strftime("%x") %>

Your Elections: <% ["Name", "Description", "Details"].each do |column| -%> <% end -%> <% @user.elections.select {|e| e.instance_of?(Election)}.each do |election| %> <% end -%>
<%= column %>
<%= link_to "#{election.name}", :controller => 'election', :action => 'show', :id => election %> <%=h election.description %> Start: <%=h election.startdate.strftime("%x") %>
End: <%=h election.enddate.strftime("%x") %>
Method: <%=h ELECTION_TYPES[election.election_method] %>
Open: <%= (not election.authenticated?).to_s.capitalize %>

<%= link_to "Create a new election", :controller => 'election', :action => 'new' %>.


Your Quickvotes: <% ["Name", "Description", "Start Date", "End Date", "Notices"].each do |column| %> <% end -%> <% @user.elections.select {|e| e.instance_of?(QuickVote)}.each do |quickvote| %> <% end %>
<%= column %>
<% if quickvote.active == 1 %> <%= link_to "#{quickvote.name}", quickaction_url( :ident => quickvote.name, :action => 'results' ) %> <% else %> <%=h quickvote.name %> <% end %> <%=h quickvote.description %> <%=h quickvote.startdate.strftime("%x") %> <%=h quickvote.enddate.strftime("%x") %> <% if quickvote.notices == 0 -%> No <% else -%> Yes <% end -%>

<%= link_to( "Create a new QuickVote", :controller => 'quickvote', :action => 'create') %>.