From 5fd5cba6038d0ed97adb735cd24cc70c26335a3e Mon Sep 17 00:00:00 2001 From: Date: Sun, 7 Jun 2009 08:48:11 -0400 Subject: [PATCH] fixed the layout on the account summary page --- app/views/account/summary.rhtml | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/app/views/account/summary.rhtml b/app/views/account/summary.rhtml index 5af431b..b53122e 100644 --- a/app/views/account/summary.rhtml +++ b/app/views/account/summary.rhtml @@ -13,35 +13,27 @@ Member since: <%=h @user.created_at.strftime("%x") %>

Your Elections: - <% Election.content_columns.each do |column| -%> - <% dontPrint = ["viewable", "quickuser", "active", "anonymous", \ - "early_results", "embed_custom_string", "embeddable", \ - "notices"]%> - <% next if dontPrint.include?(column.name)%> - + <% ["Name", "Description", "Details"].each do |column| -%> + <% end -%> <% @user.elections.select {|e| e.instance_of?(Election)}.each do |election| %> - - - - - - + -- 2.30.2
<%= column.human_name %><%= column %>
- <% if election.active == 1 -%> + + <% if election.active == 1 -%> <%= link_to "#{election.name}", :controller => 'election', :action => 'show', :id => election %> <% else -%> <%=h election.name %> <% end -%> <%=h election.description %><%=h election.startdate.strftime("%x") %><%=h election.enddate.strftime("%x") %><%=h election.election_method %> - <% if election.authenticated? %> - Yes - <% else -%> - No - <% end -%> + <%=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 %>