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

44 lines
1.2 KiB
Plaintext
Raw Normal View History

<div class="container mt-5">
<h1 class="mb-4 text-center">Employers</h1>
<div class="text-center mt-3">
<%= link_to 'New Employer', new_employer_path, class: 'btn btn-dark mb-3' %>
</div>
<table class="table table-striped table-hover">
<thead class="table-light">
<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 employer, class: 'btn btn-sm btn-secondary' do %>
<i class="bi bi-eye"></i> <!-- Eyeball icon for 'Show' -->
<% end %>
<%= link_to edit_employer_path(employer), class: 'btn btn-sm btn-info' do %>
<i class="bi bi-pencil-fill" style="color: white;"></i> <!-- Pencil icon for 'Edit' -->
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>