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

34 lines
975 B
Plaintext
Raw Normal View History

<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>DOB</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.dob.strftime('%B %d, %Y') if employer.dob %></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' %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>