33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
<tr id="<%= dom_id(user) %>">
|
|
<td>
|
|
<%= user.email %>
|
|
</td>
|
|
<td>
|
|
<%= user.first_name %>
|
|
</td>
|
|
<td>
|
|
<%= user.last_name %>
|
|
</td>
|
|
<td>
|
|
<%= user.account_auths.map(&:role).compact.join(",") %>
|
|
</td>
|
|
<td>
|
|
<%= user.accounts.map(&:name).join(",") %>
|
|
</td>
|
|
<td>
|
|
<%= time_ago_in_words(user.created_at) %> ago
|
|
</td>
|
|
<td class="text-right">
|
|
<% if user != Current.user %>
|
|
<div class="btn-group">
|
|
<%= button_tag "Manage", class: "btn btn-light btn-sm dropdown-toggle border", data: { toggle: "dropdown", boundary: "window" }, aria: { haspopup: true, expanded: false } %>
|
|
<div class="dropdown-menu dropdown-menu-right">
|
|
<%= link_to fa_icon("user-secret", text: "Masquerade"), [:admin, user, :masquerade], method: :post, class: "dropdown-item" %>
|
|
<%= link_to fa_icon("pencil", text: "Edit"), [:edit, :admin, user], class: "dropdown-item" %>
|
|
<%= link_to fa_icon("trash", text: "Delete"), [:admin, user], class: "dropdown-item", remote: true, method: :delete, data: { confirm: "Are you sure?" } %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|