Display list of passports
This commit is contained in:
parent
82db15d727
commit
df866b50ce
3 changed files with 60 additions and 0 deletions
|
@ -0,0 +1,54 @@
|
|||
<div class="container-fluid">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<%= Passport.human_attribute_name :id %>
|
||||
</th>
|
||||
<th scope="col">
|
||||
<%= Passport.human_attribute_name :surname %>
|
||||
</th>
|
||||
<th scope="col">
|
||||
<%= Passport.human_attribute_name :given_name %>
|
||||
</th>
|
||||
<th scope="col">
|
||||
<%= Passport.human_attribute_name :patronymic %>
|
||||
</th>
|
||||
<th scope="col">
|
||||
<%= Passport.human_attribute_name :sex %>
|
||||
</th>
|
||||
<th scope="col">
|
||||
<%= Passport.human_attribute_name :date_of_birth %>
|
||||
</th>
|
||||
<th scope="col">
|
||||
<%= Passport.human_attribute_name :place_of_birth %>
|
||||
</th>
|
||||
<th scope="col">
|
||||
<%= Passport.human_attribute_name :series %>
|
||||
</th>
|
||||
<th scope="col">
|
||||
<%= Passport.human_attribute_name :number %>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @passports.each do |passport| %>
|
||||
<tr>
|
||||
<td scope="row"><%= passport.id %></td>
|
||||
<td><%= truncate passport.surname %></td>
|
||||
<td><%= truncate passport.given_name %></td>
|
||||
<td><%= truncate passport.patronymic %></td>
|
||||
<td>
|
||||
<%= Passport.human_attribute_name \
|
||||
"sex.#{Passport.sexes.key(passport.sex)}" %>
|
||||
</td>
|
||||
<td><%= localize passport.date_of_birth %></td>
|
||||
<td><%= truncate passport.place_of_birth %></td>
|
||||
<td><%= passport.series.to_s.rjust(4, '0') %></td>
|
||||
<td><%= passport.number.to_s.rjust(6, '0') %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
|
@ -12,6 +12,7 @@ en:
|
|||
other: Users
|
||||
attributes:
|
||||
membership_application:
|
||||
id: ID
|
||||
first_name: First name
|
||||
last_name: Last name
|
||||
middle_name: Middle name
|
||||
|
@ -23,6 +24,7 @@ en:
|
|||
organization_membership: Membership in other social organizations
|
||||
comment: Comment
|
||||
passport:
|
||||
id: ID
|
||||
surname: Surname
|
||||
given_name: Given names
|
||||
patronymic: Patronymic
|
||||
|
@ -38,6 +40,7 @@ en:
|
|||
male: Male
|
||||
female: Female
|
||||
user:
|
||||
id: ID
|
||||
confirmation_sent_at: Confirmation sent at
|
||||
confirmation_token: Confirmation token
|
||||
confirmed_at: Confirmed at
|
||||
|
|
|
@ -12,6 +12,7 @@ ru:
|
|||
other: Пользователи
|
||||
attributes:
|
||||
membership_application:
|
||||
id: ID
|
||||
first_name: Имя
|
||||
last_name: Фамилия
|
||||
middle_name: Отчество
|
||||
|
@ -23,6 +24,7 @@ ru:
|
|||
organization_membership: Членство в других общественных организациях
|
||||
comment: Комментарий
|
||||
passport:
|
||||
id: ID
|
||||
surname: Фамилия
|
||||
given_name: Имя
|
||||
patronymic: Отчество
|
||||
|
@ -38,6 +40,7 @@ ru:
|
|||
male: Мужской
|
||||
female: Женский
|
||||
user:
|
||||
id: ID
|
||||
confirmation_sent_at: Дата отправки подтверждения
|
||||
confirmation_token: Токен подтверждения
|
||||
confirmed_at: Дата подтверждения
|
||||
|
|
Reference in a new issue