mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-03-12 21:25:17 +09:00
16 lines
748 B
Plaintext
16 lines
748 B
Plaintext
<% if user.active? %>
|
|
<%= button_to user_ban_path(user), method: :post,
|
|
class: "btn full-width",
|
|
data: { turbo_confirm: "Are you sure you want to ban this user? This will log them out, delete their messages, and block their IP addresses." } do %>
|
|
<%= image_tag "cancel.svg", aria: { hidden: "true", label: "Ban #{@user.name}" } %>
|
|
<span>Ban <%= user.name %></span>
|
|
<% end %>
|
|
<% else %>
|
|
<%= button_to user_ban_path(user), method: :delete,
|
|
class: "btn btn--negative full-width",
|
|
data: { turbo_confirm: "Are you sure you want to remove the ban on this user?" } do %>
|
|
<%= image_tag "cancel.svg", aria: { hidden: "true", label: "Ban #{@user.name}" } %>
|
|
<span>Remove ban</span>
|
|
<% end %>
|
|
<% end %>
|