54 lines
1.8 KiB
Text
54 lines
1.8 KiB
Text
<div class="container-fluid">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">
|
|
<%= Passport.human_attribute_name :id %>
|
|
</th>
|
|
<th scope="col">
|
|
<%= PassportMap.human_attribute_name :surname %>
|
|
</th>
|
|
<th scope="col">
|
|
<%= PassportMap.human_attribute_name :given_name %>
|
|
</th>
|
|
<th scope="col">
|
|
<%= PassportMap.human_attribute_name :patronymic %>
|
|
</th>
|
|
<th scope="col" class="d-none d-md-table-cell">
|
|
<%= PassportMap.human_attribute_name :date_of_birth %>
|
|
</th>
|
|
<th scope="col" class="d-none d-lg-table-cell">
|
|
<%= PassportMap.human_attribute_name :place_of_birth %>
|
|
</th>
|
|
<th scope="col"></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% @passports.each do |passport| %>
|
|
<tr>
|
|
<td scope="row"><%= passport.id %></td>
|
|
<td><%= truncate passport.passport_map&.surname, length: 15 %></td>
|
|
<td><%= truncate passport.passport_map&.given_name, length: 15 %></td>
|
|
<td><%= truncate passport.passport_map&.patronymic, length: 15 %></td>
|
|
<td class="d-none d-md-table-cell">
|
|
<% if passport.passport_map %>
|
|
<%= localize passport.passport_map.date_of_birth %>
|
|
<% end %>
|
|
</td>
|
|
<td class="d-none d-lg-table-cell">
|
|
<%= truncate passport.passport_map&.place_of_birth, length: 15 %>
|
|
</td>
|
|
<td>
|
|
<% if policy(passport).show? %>
|
|
<%= link_to passport_path(passport),
|
|
role: :button, class: 'btn btn-light btn-sm' do %>
|
|
<i class="far fa-eye"></i>
|
|
<% end %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|