Initial commit
This commit is contained in:
32
app/views/admin/users/_user.html.erb
Normal file
32
app/views/admin/users/_user.html.erb
Normal file
@@ -0,0 +1,32 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user