1
0
Fork 0

Reorder displayed attributes

This commit is contained in:
Alex Kotov 2019-07-26 02:45:10 +05:00
parent 3f94c7656b
commit f6c6052ebd
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 7 additions and 7 deletions

View file

@ -5,15 +5,15 @@
<th scope="col"> <th scope="col">
<%= Person.human_attribute_name :id %> <%= Person.human_attribute_name :id %>
</th> </th>
<th scope="col">
<%= Person.human_attribute_name :last_name %>
</th>
<th scope="col"> <th scope="col">
<%= Person.human_attribute_name :first_name %> <%= Person.human_attribute_name :first_name %>
</th> </th>
<th scope="col"> <th scope="col">
<%= Person.human_attribute_name :middle_name %> <%= Person.human_attribute_name :middle_name %>
</th> </th>
<th scope="col">
<%= Person.human_attribute_name :last_name %>
</th>
<th scope="col" class="d-none d-lg-table-cell"> <th scope="col" class="d-none d-lg-table-cell">
<%= Person.human_attribute_name :date_of_birth %> <%= Person.human_attribute_name :date_of_birth %>
</th> </th>
@ -28,9 +28,9 @@
<% @people.each do |person| %> <% @people.each do |person| %>
<tr> <tr>
<td scope="row"><%= person.id %></td> <td scope="row"><%= person.id %></td>
<td><%= truncate person.last_name, length: 15 %></td>
<td><%= truncate person.first_name, length: 15 %></td> <td><%= truncate person.first_name, length: 15 %></td>
<td><%= truncate person.middle_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"> <td class="d-none d-lg-table-cell">
<%= localize person.date_of_birth if person.date_of_birth %> <%= localize person.date_of_birth if person.date_of_birth %>
</td> </td>

View file

@ -2,15 +2,15 @@
<%= render partial: 'nav_tabs', locals: { person: @person, tab: :overview } %> <%= render partial: 'nav_tabs', locals: { person: @person, tab: :overview } %>
<dl> <dl>
<dt><%= Person.human_attribute_name :last_name %></dt>
<dd><%= truncate @person.last_name %></dd>
<dt><%= Person.human_attribute_name :first_name %></dt> <dt><%= Person.human_attribute_name :first_name %></dt>
<dd><%= truncate @person.first_name %></dd> <dd><%= truncate @person.first_name %></dd>
<dt><%= Person.human_attribute_name :middle_name %></dt> <dt><%= Person.human_attribute_name :middle_name %></dt>
<dd><%= truncate @person.middle_name %></dd> <dd><%= truncate @person.middle_name %></dd>
<dt><%= Person.human_attribute_name :last_name %></dt>
<dd><%= truncate @person.last_name %></dd>
<dt><%= Person.human_attribute_name :sex %></dt> <dt><%= Person.human_attribute_name :sex %></dt>
<dd><%= translate_enum :sex, @person.sex if @person.sex %></dd> <dd><%= translate_enum :sex, @person.sex if @person.sex %></dd>