]> projects.mako.cc - selectricity/blobdiff - app/views/account/summary.rhtml
User summary method is now more secure. Email change method prtects account SQL injec...
[selectricity] / app / views / account / summary.rhtml
index 2f24e2801f165c51de6d7b37d9f2c7dd28839e3a..61a4b24735d1d2d45cbbf299a955c3856b425230 100644 (file)
@@ -1,53 +1,50 @@
-<h2>This is your user summary profile, <%=h @user.login.capitalize %></h2>
+<div id="title-header">
+  <span class="header">Account Summary</span>
+  <span class="subheader"></span>
+</div>
+
+<h3>This is your account summary profile, <%=h @user.login.capitalize %></h3>
 
 <p>
 E-mail: <%=h @user.email %><br />
 Member since: <%=h @user.created_at.strftime("%x") %>
 </p>
 
 
 <p>
 E-mail: <%=h @user.email %><br />
 Member since: <%=h @user.created_at.strftime("%x") %>
 </p>
 
+<p>
+       <%= link_to "Update Email Address", :action => 'change_contact',
+                                                                         :id => @user.id %>
+</p>
+
+
 <p>Your Elections:
 <p>Your Elections:
-  <table class="voterbox">
+  <table class="voterbox" id="election">
     <tr>
     <tr>
-         <% Election.content_columns.each do |column| -%>
-         <% next if column.name.eql?("viewable") || column.name.eql?("quickuser")\
-         || column.name.eql?("active") %>
-           <th><%= column.human_name %></th>
+      <% ["Name", "Description", "Details"].each do |column| -%>
+           <th><%= column %></th>
          <% end -%>
     </tr>
     
     <% @user.elections.select {|e| e.instance_of?(Election)}.each do |election| %>
     <tr>
          <% end -%>
     </tr>
     
     <% @user.elections.select {|e| e.instance_of?(Election)}.each do |election| %>
     <tr>
-         <td>
-       <% if election.active == 1 -%>
+         <td style="text-align: left;">
            <%= link_to "#{election.name}", :controller => 'election', 
                            :action => 'show', :id => election %>
            <%= link_to "#{election.name}", :controller => 'election', 
                            :action => 'show', :id => election %>
-               <% else -%>
-                 <%=h election.name %>
-               <% end -%>
          </td>
          </td>
-         <td><%=h election.description %></td>
-         <td>
-         <% if election.anonymous == 0 -%>
-              No
-            <% else -%>
-              Yes
-            <% end -%>
+         <td style="text-align: left;"><%=h election.description %></td>
+         <td style="text-align: left;">
+        <strong>Start:</strong> <%=h election.startdate.strftime("%x") %><br />
+        <strong>End:</strong> <%=h election.enddate.strftime("%x") %><br />
+        <strong>Method:</strong> <%=h ELECTION_TYPES[election.election_method] %><br />
+           <strong>Open:</strong> <%= (not election.authenticated?).to_s.capitalize %>
          </td>
          </td>
-         <td><%=h election.startdate.strftime("%x") %></td>
-      <td><%=h election.enddate.strftime("%x") %></td>
-      <td>
-         <% if election.notices == 0 -%>
-              No
-            <% else -%>
-              Yes
-            <% end -%>
-         </td>   
-         <td><%=h election.election_method %></td>
+         
     </tr>
     <% end -%>
   </table>
 </p>
 
     </tr>
     <% end -%>
   </table>
 </p>
 
+<br />
+
 <p>
 Your Quickvotes:
 <table class="voterbox">
 <p>
 Your Quickvotes:
 <table class="voterbox">

Benjamin Mako Hill || Want to submit a patch?