Skip to content

Commit 88f3f94

Browse files
committed
Ensure edit (not trash) is displayed
Fix conditional
1 parent 6f256f5 commit 88f3f94

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

app/views/accounts/users/_user.html.erb

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@
2020
<% end %>
2121
<% end %>
2222

23-
<%= button_to account_user_path(user), method: :delete, class: "btn txt-small flex-item-no-shrink btn--negative", data: {
24-
turbo_confirm: "Are you sure you want to permanently remove this person from the account? This can’t be undone."} do %>
25-
<%= image_tag "minus.svg", size: 20, aria: { hidden: "true" } %>
26-
<span class="for-screen-reader">Delete <%= user.name %></span>
23+
<% unless user == Current.user %>
24+
<%= button_to account_user_path(user), method: :delete, class: "btn txt-small flex-item-no-shrink btn--negative", data: {
25+
turbo_confirm: "Are you sure you want to permanently remove this person from the account? This can’t be undone."} do %>
26+
<%= image_tag "minus.svg", size: 20, aria: { hidden: "true" } %>
27+
<span class="for-screen-reader">Delete <%= user.name %></span>
28+
<% end %>
2729
<% end %>
28-
<% elsif user == Current.user %>
30+
<% end %>
31+
<% if user == Current.user %>
2932
<%= link_to user_profile_path, class: "btn txt-small flex-item-no-shrink", target: "_top" do %>
3033
<%= image_tag "pencil.svg", size: 20, aria: { hidden: "true" } %>
3134
<span class="for-screen-reader">My settings</span>

0 commit comments

Comments
 (0)