Add Users#show

This commit is contained in:
2023-05-05 18:29:11 +02:00
parent e68092f6b5
commit a7fce807c5
8 changed files with 68 additions and 38 deletions

View File

@@ -1,23 +1,24 @@
<% if current_user.at_least(:admin) %>
<table class="items" id="users">
<table class="items" id="users">
<thead>
<tr>
<th><%= User.human_attribute_name(:email).capitalize %></th>
<th><%= User.human_attribute_name(:status).capitalize %></th>
<th><%= User.human_attribute_name(:created_at).capitalize %> <sup>UTC</sup></th>
<th><%= User.human_attribute_name(:confirmed_at).capitalize %></th>
<th><%= User.human_attribute_name(:created_at).capitalize %> <sup>UTC</sup></th>
<!-- <th><%#= t :actions %></th> -->
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<tr>
<%# TODO: add user show link %>
<td><%= user.email %></td>
<td><%= link_to user.email, user_path(user) %></td>
<td><%= user.status %></td>
<td><%= user.created_at.to_fs(:db_without_sec) %></td>
<td class="svg">
<%= svg_tag "pictograms/checkbox-marked-outline" if user.confirmed_at.present? %>
</td>
<td><%= user.created_at.to_fs(:db_without_sec) %></td>
<!-- <td class="actions"></td> -->
</tr>
<% end %>
</table>
<% end %>
</tbody>
</table>