forked from fixin.me/fixin.me
27 lines
1007 B
Plaintext
27 lines
1007 B
Plaintext
<% if current_user.at_least(:admin) %>
|
|
<table class="items" id="users">
|
|
<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><%= t :actions %></th>
|
|
</tr>
|
|
<% @users.each do |user| %>
|
|
<tr>
|
|
<%# TODO: add user edit link %>
|
|
<td><%= user.email %></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 class="actions">
|
|
<%= image_link_to t(:delete), "account-remove-outline", user_path(user),
|
|
data: { turbo: true, turbo_method: :delete } %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
<% end %>
|