52 lines
1.6 KiB
Text
52 lines
1.6 KiB
Text
<div class="container">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">
|
|
<%= Person.human_attribute_name :id %>
|
|
</th>
|
|
<th scope="col">
|
|
<%= Person.human_attribute_name :first_name %>
|
|
</th>
|
|
<th scope="col">
|
|
<%= Person.human_attribute_name :middle_name %>
|
|
</th>
|
|
<th scope="col">
|
|
<%= Person.human_attribute_name :last_name %>
|
|
</th>
|
|
<th scope="col" class="d-none d-lg-table-cell">
|
|
<%= Person.human_attribute_name :date_of_birth %>
|
|
</th>
|
|
<th scope="col" class="d-none d-md-table-cell">
|
|
<%= Person.human_attribute_name :place_of_birth %>
|
|
</th>
|
|
<th scope="col"></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% @people.each do |person| %>
|
|
<tr>
|
|
<td scope="row"><%= person.id %></td>
|
|
<td><%= truncate person.first_name, length: 15 %></td>
|
|
<td><%= truncate person.middle_name, length: 15 %></td>
|
|
<td><%= truncate person.last_name, length: 15 %></td>
|
|
<td class="d-none d-lg-table-cell">
|
|
<%= localize person.date_of_birth %>
|
|
</td>
|
|
<td class="d-none d-md-table-cell">
|
|
<%= truncate person.place_of_birth, length: 15 %>
|
|
</td>
|
|
<td>
|
|
<% if policy([:staff, person]).show? %>
|
|
<%= link_to [:staff, person],
|
|
role: :button, class: 'btn btn-light btn-sm' do %>
|
|
<i class="far fa-eye"></i>
|
|
<% end %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|