X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/3e545735b4784af19edec9bfcc8e25ff17cb7f12..796d33df26fa2f591a405810ae4958a26cf060a4:/app/views/account/summary.rhtml diff --git a/app/views/account/summary.rhtml b/app/views/account/summary.rhtml new file mode 100644 index 0000000..2f24e28 --- /dev/null +++ b/app/views/account/summary.rhtml @@ -0,0 +1,84 @@ +

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

+ +

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

+ +

Your Elections: + + + <% Election.content_columns.each do |column| -%> + <% next if column.name.eql?("viewable") || column.name.eql?("quickuser")\ + || column.name.eql?("active") %> + + <% end -%> + + + <% @user.elections.select {|e| e.instance_of?(Election)}.each do |election| %> + + + + + + + + + + <% end -%> +
<%= column.human_name %>
+ <% if election.active == 1 -%> + <%= link_to "#{election.name}", :controller => 'election', + :action => 'show', :id => election %> + <% else -%> + <%=h election.name %> + <% end -%> + <%=h election.description %> + <% if election.anonymous == 0 -%> + No + <% else -%> + Yes + <% end -%> + <%=h election.startdate.strftime("%x") %><%=h election.enddate.strftime("%x") %> + <% if election.notices == 0 -%> + No + <% else -%> + Yes + <% end -%> + <%=h election.election_method %>
+

+ +

+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 -%> +