X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/eed818c2f36f08638c65244ea79485b87cb7ddc8..f2ac11cbeb49cbccd62da51c31e14a8de1a6d26c:/app/views/account/summary.rhtml?ds=sidebyside diff --git a/app/views/account/summary.rhtml b/app/views/account/summary.rhtml index 5af431b..4d79f5b 100644 --- a/app/views/account/summary.rhtml +++ b/app/views/account/summary.rhtml @@ -13,41 +13,30 @@ 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| %> - - - - - - + <% end -%>
<%= column.human_name %><%= column %>
- <% 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 %>

+

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


@@ -85,3 +74,4 @@ Your Quickvotes: <% end %> +

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