Allow user to see their profile page

This commit is contained in:
ricola 2026-04-20 13:09:14 -06:00
parent b4e56645f6
commit 267dc439f1
4 changed files with 18 additions and 11 deletions

View file

@ -14,7 +14,7 @@
</thead>
<% @users.sort_by { |user| user.email }.each do |user| %>
<tr>
<td><a href="/admin/users/<%= user.id %>"><%= user.email %></a></td>
<td><a href="/users/<%= user.id %>"><%= user.email %></a></td>
<td><%= format_date(user.created_at) %></td>
<td><%= user.admin %></td>
<td><%= user.votes.length %></td>

View file

@ -40,7 +40,7 @@
<div class="d-flex flex-wrap justify-content-end pe-3 py-3 mb-4">
<% if current_user %>
<%= current_user.email %>
<a href="/users/<%= current_user.id %>"><%= current_user.email %></a>
<% else %>
&nbsp;
<% end %>

View file

@ -1,6 +1,4 @@
<h1 class="mb-5"><%= _("Admin") %></h1>
<h2 class="mb-4"><%= @user.email %></h2>
<h1 class="mb-5"><%= @user.email %></h1>
<p><%= _("Created: %{date}") % { date: format_date(@user.created_at) } %></p>