Files
fizzy/app/views/accounts/users/_user.html.erb
T

18 lines
849 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="flex-item-grow margin-none" 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>