Commit 2f546dba authored by Kristoff Sison's avatar Kristoff Sison

added a Profile Edit page and pages for About and User

parent efd7db55
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
<%= f.error_notification %> <%= f.error_notification %>
<div class="form-inputs"> <div class="form-inputs">
<%= f.input :first_name, required:true %>
<%= f.input :last_name, required:true %>
<%= f.input :birthday, as: :date, start_year: Time.now.year - 100, end_year: Time.now.year - 18, include_blank: :false %>
<%= f.input :gender, as: :select, collection: ["Male", "Female"], required: true %>
<%= f.input :email, required: true, autofocus: true %> <%= f.input :email, required: true, autofocus: true %>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
......
...@@ -7,9 +7,8 @@ ...@@ -7,9 +7,8 @@
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
</head> </head>
<body> <body>
<% if user_signed_in? %> <% if user_signed_in? %>
<%= "You are logged in as: #{current_user.email}" %> &nbsp; <%= link_to "Log Out", destroy_user_session_path, method: :delete %> || <%= "You are logged in as: #{current_user.email}" %> &nbsp; <%= link_to 'Edit Profile', edit_user_registration_path %> || <%= link_to "Log Out", destroy_user_session_path, method: :delete %> ||
<% else %> <% else %>
<%= "" %> <%= "" %>
<% end %> <% end %>
......
<!DOCTYPE html>
<html>
<h1> About Page</h1>
<body>
MIS21 - B
Alfonso Arvisu
Bianca Tarun
Dean Bardeloza
Kristoff Sison
</body>
</html>
\ No newline at end of file
<h1>Profile Page</h1>
<table class="table table-striped">
<thead>
<th>Vote ID</th>
<th>Candidate Voted</th>
<th>Voted on</th>
</thead>
<tbody>
<% @votes.each do |v| %>
<tr>
<td><%= v.id %></td>
<td><%= v.candidate.first_name %> "<%= v.candidate.nickname %>" <%= v.candidate.last_name %></td>
<td><%= v.created_at %></td>
</tr>
<% end %>
</tbody>
</table>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment