obdev/app/views/employers/index.html.erb

41 lines
1.2 KiB
Plaintext

<div class="container mt-5">
<h1 class="mb-4">Employers</h1>
<%= link_to 'New Employer', new_employer_path, class: 'btn btn-primary mb-3' %>
<table class="table table-striped table-hover">
<thead class="table-dark">
<tr>
<th>Name</th>
<th>Address</th>
<th>Phone</th>
<th>Email</th>
<th>TIN</th>
<th>DOB</th>
<th>SSN</th>
<th>Gender</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<% @employers.each do |employer| %>
<tr>
<td><%= employer.name %></td>
<td><%= employer.address %></td>
<td><%= employer.phone %></td>
<td><%= employer.email %></td>
<td><%= employer.tin %></td>
<td><%= employer.dob %></td>
<td><%= employer.ssn %></td>
<td><%= employer.gender %></td>
<td>
<%= link_to 'Show', employer, class: 'btn btn-sm btn-info' %>
<%= link_to 'Edit', edit_employer_path(employer), class: 'btn btn-sm btn-warning' %>
<%= link_to 'Destroy', @employer, method: :delete, data: { confirm: 'Are you sure?', turbo: 'false' }, class: 'btn btn-sm btn-danger' %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>