48 lines
1.5 KiB
Text
48 lines
1.5 KiB
Text
<div class="container">
|
|
<div class="row">
|
|
<div class="col-md-3 mb-4">
|
|
<%= render partial: 'settings/nav_sidebar', locals: { tab: :contacts } %>
|
|
</div>
|
|
|
|
<div class="col-md-9">
|
|
<%= render partial: 'form', locals: { contact: @contact } %>
|
|
|
|
<% unless @contacts.nil? %>
|
|
<table class="table mt-3">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">
|
|
<%= Contact.human_attribute_name :contact_network %>
|
|
</th>
|
|
<th scope="col">
|
|
<%= Contact.human_attribute_name :value %>
|
|
</th>
|
|
<th scope="col"></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% @contacts.each do |contact| %>
|
|
<tr>
|
|
<td><%= contact.contact_network.name %></td>
|
|
<td><%= truncate contact.value %></td>
|
|
<td>
|
|
<% if policy([:settings, contact]).destroy? %>
|
|
<%= link_to(
|
|
[:settings, contact],
|
|
method: :delete,
|
|
class: 'btn btn-danger btn-sm',
|
|
data: { confirm: contact_destroy_confirmation(contact) },
|
|
) do %>
|
|
<i class="fas fa-trash"></i>
|
|
<% end %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|