Files
fizzy/app/views/accounts/users/_user.html.erb
T
2024-10-28 17:20:49 -05:00

18 lines
932 B
Plaintext

<div class="flex align-center gap-half pad-inline">
<%= avatar_tag user, loading: :lazy, class: "flex-item-no-shrink" %>
<strong class="overflow-ellipsis">
<%= user.name %>
</strong>
<hr class="separator--horizontal flex-item-grow" style="--border-color: var(--color-subtle-dark); --border-style: dashed" aria-hidden="true">
<%# FIXME: Move this Current.user check to a stimulus controller that just checks for admin? or the like we so we can cache user list %>
<%= button_to account_user_path(user), method: :delete, class: "btn btn--small btn--negative flex-item-no-shrink",
disabled: !Current.user.can_remove?(user),
data: { turbo_confirm: "Are you sure you want to permanently remove this person from the account?" } do %>
<%= image_tag "minus.svg", aria: { hidden: true }, size: 24 %>
<span class="for-screen-reader">Remove <%= user.name %> from the account</span>
<% end %>
</div>