Add partials
This commit is contained in:
parent
72d2fd97cc
commit
106fb396cd
4 changed files with 88 additions and 160 deletions
34
app/views/passports/_common_descr_list.html.erb
Normal file
34
app/views/passports/_common_descr_list.html.erb
Normal file
|
@ -0,0 +1,34 @@
|
|||
<dl>
|
||||
<dt><%= Passport.human_attribute_name :last_name %></dt>
|
||||
<dd><%= passport.last_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :first_name %></dt>
|
||||
<dd><%= passport.first_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :middle_name %></dt>
|
||||
<dd><%= passport.middle_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :sex %></dt>
|
||||
<dd><%= translate_enum :sex, passport.sex %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :date_of_birth %></dt>
|
||||
<dd><%= localize passport.date_of_birth %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :place_of_birth %></dt>
|
||||
<dd><%= passport.place_of_birth %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :series %></dt>
|
||||
<dd><%= passport.series %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :number %></dt>
|
||||
<dd><%= passport.number %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :issued_by %></dt>
|
||||
<dd><%= passport.issued_by %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :unit_code %></dt>
|
||||
<dd><%= passport.unit_code %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :date_of_issue %></dt>
|
||||
<dd><%= localize passport.date_of_issue %></dd>
|
||||
</dl>
|
46
app/views/passports/_registration_descr_list.html.erb
Normal file
46
app/views/passports/_registration_descr_list.html.erb
Normal file
|
@ -0,0 +1,46 @@
|
|||
<dl>
|
||||
<dt><%= Passport.human_attribute_name :zip_code %></dt>
|
||||
<dd><%= passport.zip_code %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :town_type %></dt>
|
||||
<dd><%= passport.town_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :town_name %></dt>
|
||||
<dd><%= passport.town_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :settlement_type %></dt>
|
||||
<dd><%= passport.settlement_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :settlement_name %></dt>
|
||||
<dd><%= passport.settlement_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :district_type %></dt>
|
||||
<dd><%= passport.district_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :district_name %></dt>
|
||||
<dd><%= passport.district_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :street_type %></dt>
|
||||
<dd><%= passport.street_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :street_name %></dt>
|
||||
<dd><%= passport.street_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :residence_type %></dt>
|
||||
<dd><%= passport.residence_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :residence_name %></dt>
|
||||
<dd><%= passport.residence_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :building_type %></dt>
|
||||
<dd><%= passport.building_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :building_name %></dt>
|
||||
<dd><%= passport.building_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :apartment_type %></dt>
|
||||
<dd><%= passport.apartment_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :apartment_name %></dt>
|
||||
<dd><%= passport.apartment_name %></dd>
|
||||
</dl>
|
|
@ -5,89 +5,13 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<dl>
|
||||
<dt><%= Passport.human_attribute_name :last_name %></dt>
|
||||
<dd><%= @passport.last_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :first_name %></dt>
|
||||
<dd><%= @passport.first_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :middle_name %></dt>
|
||||
<dd><%= @passport.middle_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :sex %></dt>
|
||||
<dd><%= translate_enum :sex, @passport.sex %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :date_of_birth %></dt>
|
||||
<dd><%= localize @passport.date_of_birth %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :place_of_birth %></dt>
|
||||
<dd><%= @passport.place_of_birth %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :series %></dt>
|
||||
<dd><%= @passport.series %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :number %></dt>
|
||||
<dd><%= @passport.number %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :issued_by %></dt>
|
||||
<dd><%= @passport.issued_by %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :unit_code %></dt>
|
||||
<dd><%= @passport.unit_code %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :date_of_issue %></dt>
|
||||
<dd><%= localize @passport.date_of_issue %></dd>
|
||||
</dl>
|
||||
<%= render partial: 'passports/common_descr_list',
|
||||
locals: { passport: @passport } %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<dl>
|
||||
<dt><%= Passport.human_attribute_name :zip_code %></dt>
|
||||
<dd><%= @passport.zip_code %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :town_type %></dt>
|
||||
<dd><%= @passport.town_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :town_name %></dt>
|
||||
<dd><%= @passport.town_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :settlement_type %></dt>
|
||||
<dd><%= @passport.settlement_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :settlement_name %></dt>
|
||||
<dd><%= @passport.settlement_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :district_type %></dt>
|
||||
<dd><%= @passport.district_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :district_name %></dt>
|
||||
<dd><%= @passport.district_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :street_type %></dt>
|
||||
<dd><%= @passport.street_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :street_name %></dt>
|
||||
<dd><%= @passport.street_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :residence_type %></dt>
|
||||
<dd><%= @passport.residence_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :residence_name %></dt>
|
||||
<dd><%= @passport.residence_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :building_type %></dt>
|
||||
<dd><%= @passport.building_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :building_name %></dt>
|
||||
<dd><%= @passport.building_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :apartment_type %></dt>
|
||||
<dd><%= @passport.apartment_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :apartment_name %></dt>
|
||||
<dd><%= @passport.apartment_name %></dd>
|
||||
</dl>
|
||||
<%= render partial: 'passports/registration_descr_list',
|
||||
locals: { passport: @passport } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -8,89 +8,13 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<dl>
|
||||
<dt><%= Passport.human_attribute_name :last_name %></dt>
|
||||
<dd><%= @passport.last_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :first_name %></dt>
|
||||
<dd><%= @passport.first_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :middle_name %></dt>
|
||||
<dd><%= @passport.middle_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :sex %></dt>
|
||||
<dd><%= translate_enum :sex, @passport.sex %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :date_of_birth %></dt>
|
||||
<dd><%= localize @passport.date_of_birth %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :place_of_birth %></dt>
|
||||
<dd><%= @passport.place_of_birth %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :series %></dt>
|
||||
<dd><%= @passport.series %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :number %></dt>
|
||||
<dd><%= @passport.number %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :issued_by %></dt>
|
||||
<dd><%= @passport.issued_by %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :unit_code %></dt>
|
||||
<dd><%= @passport.unit_code %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :date_of_issue %></dt>
|
||||
<dd><%= localize @passport.date_of_issue %></dd>
|
||||
</dl>
|
||||
<%= render partial: 'passports/common_descr_list',
|
||||
locals: { passport: @passport } %>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<dl>
|
||||
<dt><%= Passport.human_attribute_name :zip_code %></dt>
|
||||
<dd><%= @passport.zip_code %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :town_type %></dt>
|
||||
<dd><%= @passport.town_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :town_name %></dt>
|
||||
<dd><%= @passport.town_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :settlement_type %></dt>
|
||||
<dd><%= @passport.settlement_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :settlement_name %></dt>
|
||||
<dd><%= @passport.settlement_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :district_type %></dt>
|
||||
<dd><%= @passport.district_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :district_name %></dt>
|
||||
<dd><%= @passport.district_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :street_type %></dt>
|
||||
<dd><%= @passport.street_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :street_name %></dt>
|
||||
<dd><%= @passport.street_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :residence_type %></dt>
|
||||
<dd><%= @passport.residence_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :residence_name %></dt>
|
||||
<dd><%= @passport.residence_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :building_type %></dt>
|
||||
<dd><%= @passport.building_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :building_name %></dt>
|
||||
<dd><%= @passport.building_name %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :apartment_type %></dt>
|
||||
<dd><%= @passport.apartment_type %></dd>
|
||||
|
||||
<dt><%= Passport.human_attribute_name :apartment_name %></dt>
|
||||
<dd><%= @passport.apartment_name %></dd>
|
||||
</dl>
|
||||
<%= render partial: 'passports/registration_descr_list',
|
||||
locals: { passport: @passport } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Reference in a new issue