Add Users#disguise/#revert

This commit is contained in:
2023-05-13 23:38:07 +02:00
parent a7fce807c5
commit 459836ca38
8 changed files with 59 additions and 11 deletions

View File

@@ -5,7 +5,7 @@
<th><%= User.human_attribute_name(:status).capitalize %></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> -->
<th><%= t :actions %></th>
</tr>
</thead>
<tbody>
@@ -17,7 +17,10 @@
<%= 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> -->
<td class="actions">
<%= image_link_to t(".disguise"), "incognito", disguise_user_path(user),
data: {turbo: true, turbo_method: :post} if allow_disguise?(user) %>
</td>
</tr>
<% end %>
</tbody>