1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/app/views/passports/index.html.erb

55 lines
1.8 KiB
Text
Raw Normal View History

2018-11-29 20:56:44 -05:00
<div class="container-fluid">
<table class="table">
<thead>
<tr>
<th scope="col">
<%= Passport.human_attribute_name :id %>
</th>
<th scope="col">
2018-12-02 12:43:09 -05:00
<%= PassportMap.human_attribute_name :surname %>
2018-11-29 20:56:44 -05:00
</th>
<th scope="col">
2018-12-02 12:43:09 -05:00
<%= PassportMap.human_attribute_name :given_name %>
2018-11-29 20:56:44 -05:00
</th>
<th scope="col">
2018-12-02 12:43:09 -05:00
<%= PassportMap.human_attribute_name :patronymic %>
2018-11-29 20:56:44 -05:00
</th>
2018-11-29 21:21:18 -05:00
<th scope="col" class="d-none d-md-table-cell">
2018-12-02 12:43:09 -05:00
<%= PassportMap.human_attribute_name :date_of_birth %>
2018-11-29 20:56:44 -05:00
</th>
2018-11-29 21:21:18 -05:00
<th scope="col" class="d-none d-lg-table-cell">
2018-12-02 12:43:09 -05:00
<%= PassportMap.human_attribute_name :place_of_birth %>
2018-11-29 20:56:44 -05:00
</th>
2018-11-29 21:29:39 -05:00
<th scope="col"></th>
2018-11-29 20:56:44 -05:00
</tr>
</thead>
<tbody>
<% @passports.each do |passport| %>
<tr>
<td scope="row"><%= passport.id %></td>
2018-12-02 12:29:09 -05:00
<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>
2018-11-29 21:21:18 -05:00
<td class="d-none d-md-table-cell">
2018-12-02 12:29:09 -05:00
<% if passport.passport_map %>
<%= localize passport.passport_map.date_of_birth %>
<% end %>
2018-11-29 21:21:18 -05:00
</td>
<td class="d-none d-lg-table-cell">
2018-12-02 12:29:09 -05:00
<%= truncate passport.passport_map&.place_of_birth, length: 15 %>
2018-11-29 20:56:44 -05:00
</td>
2018-11-29 21:29:39 -05:00
<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>
2018-11-29 20:56:44 -05:00
</tr>
<% end %>
</tbody>
</table>
</div>