<%= contact.contact_network.name %> |
<% if contact.link.nil? %>
<%= truncate contact.value %>
<% else %>
<%= link_to truncate(contact.value), contact.link, target: :_blank %>
<% end %>
|
<% if policy([
:settings,
ContactSecurityNotificationSwitch.new(contact),
]).create? %>
<%= link_to(
settings_contact_security_notification_switch_path(contact),
method: :post,
) do %>
<%= bool_badge contact.send_security_notifications %>
<% end %>
<% end %>
|
<% if policy([
:settings,
ContactPublicSwitch.new(contact),
]).create? %>
<%= link_to(
settings_contact_public_switch_path(contact),
method: :post,
) do %>
<%= bool_badge contact.show_in_public %>
<% end %>
<% end %>
|
<% if policy([:settings, contact]).destroy? %>
<%= link_to(
[:settings, contact],
method: :delete,
class: 'btn btn-danger btn-sm',
data: { confirm: contact_destroy_confirmation(contact) },
) do %>
<% end %>
<% end %>
|
<% end %>