2018-11-30 10:09:44 -05:00
|
|
|
<div class="container-fluid">
|
2018-12-01 21:28:34 -05:00
|
|
|
<% if @passport.image && current_account %>
|
|
|
|
<% if @passport.passport_confirmations.where(account: current_account).exists? %>
|
2018-11-30 09:59:29 -05:00
|
|
|
<div role="alert" class="alert alert-success">
|
|
|
|
<%= translate '.instruction_confirmed' %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<button class="btn btn-primary" disabled>
|
|
|
|
<%= translate '.confirm' %>
|
|
|
|
</button>
|
|
|
|
<% else %>
|
|
|
|
<div role="alert" class="alert alert-warning">
|
|
|
|
<%= translate '.instruction_unconfirmed' %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<%= link_to translate('.confirm'),
|
|
|
|
passport_passport_confirmations_path(@passport),
|
|
|
|
method: :post,
|
|
|
|
role: :button,
|
|
|
|
class: 'btn btn-primary' %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<hr/>
|
|
|
|
<% end %>
|
|
|
|
|
2018-11-30 01:19:38 -05:00
|
|
|
<div class="row">
|
2018-12-02 12:40:31 -05:00
|
|
|
<div class="col-md-6">
|
2018-11-30 01:09:56 -05:00
|
|
|
<dl class="row">
|
2018-11-30 07:03:25 -05:00
|
|
|
<dt class="col-lg-4">
|
|
|
|
<%= Passport.human_attribute_name :confirmed %>
|
|
|
|
</dt>
|
|
|
|
<dd class="col-lg-8">
|
|
|
|
<% if @passport.confirmed? %>
|
|
|
|
<span class="badge badge-success">
|
|
|
|
<%= Passport.human_attribute_name 'confirmed.true' %>
|
|
|
|
</span>
|
|
|
|
<% else %>
|
|
|
|
<span class="badge badge-warning">
|
|
|
|
<%= Passport.human_attribute_name 'confirmed.false' %>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
|
|
|
</dt>
|
|
|
|
|
|
|
|
<dt class="col-lg-4">
|
|
|
|
<%= Passport.human_attribute_name :passport_confirmations_count %>
|
|
|
|
</dt>
|
|
|
|
<dd class="col-lg-8">
|
|
|
|
<%= @passport.passport_confirmations.count %>
|
|
|
|
/
|
|
|
|
<%= Passport::REQUIRED_CONFIRMATIONS %>
|
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-12-02 12:43:09 -05:00
|
|
|
<%= PassportMap.human_attribute_name :surname %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-12-02 11:44:02 -05:00
|
|
|
<%= @passport.passport_map&.surname %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-12-02 12:43:09 -05:00
|
|
|
<%= PassportMap.human_attribute_name :given_name %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-12-02 11:44:02 -05:00
|
|
|
<%= @passport.passport_map&.given_name %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-12-02 12:43:09 -05:00
|
|
|
<%= PassportMap.human_attribute_name :patronymic %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-12-02 11:44:02 -05:00
|
|
|
<%= @passport.passport_map&.patronymic %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-12-02 12:43:09 -05:00
|
|
|
<%= PassportMap.human_attribute_name :sex %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-12-02 11:44:02 -05:00
|
|
|
<% if @passport.passport_map %>
|
2018-12-02 12:43:09 -05:00
|
|
|
<%= PassportMap.human_attribute_name "sex.#{@passport.passport_map.sex}" %>
|
2018-12-02 11:44:02 -05:00
|
|
|
<% end %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-12-02 12:43:09 -05:00
|
|
|
<%= PassportMap.human_attribute_name :date_of_birth %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-12-02 11:44:02 -05:00
|
|
|
<% if @passport.passport_map %>
|
|
|
|
<%= localize @passport.passport_map.date_of_birth %>
|
|
|
|
<% end %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-12-02 12:43:09 -05:00
|
|
|
<%= PassportMap.human_attribute_name :place_of_birth %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-12-02 11:44:02 -05:00
|
|
|
<%= @passport.passport_map&.place_of_birth %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-12-02 12:43:09 -05:00
|
|
|
<%= PassportMap.human_attribute_name :series %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-12-02 11:44:02 -05:00
|
|
|
<% if @passport.passport_map %>
|
|
|
|
<%= passport_series @passport.passport_map.series %>
|
|
|
|
<% end %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-12-02 12:43:09 -05:00
|
|
|
<%= PassportMap.human_attribute_name :number %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-12-02 11:44:02 -05:00
|
|
|
<% if @passport.passport_map %>
|
|
|
|
<%= passport_number @passport.passport_map.number %>
|
|
|
|
<% end %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-12-02 12:43:09 -05:00
|
|
|
<%= PassportMap.human_attribute_name :issued_by %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-12-02 11:44:02 -05:00
|
|
|
<%= @passport.passport_map&.issued_by %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-12-02 12:43:09 -05:00
|
|
|
<%= PassportMap.human_attribute_name :unit_code %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-12-02 11:44:02 -05:00
|
|
|
<%= @passport.passport_map&.unit_code %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-12-02 12:43:09 -05:00
|
|
|
<%= PassportMap.human_attribute_name :date_of_issue %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-12-02 11:44:02 -05:00
|
|
|
<% if @passport.passport_map %>
|
|
|
|
<%= localize @passport.passport_map.date_of_issue %>
|
|
|
|
<% end %>
|
2018-11-30 01:09:56 -05:00
|
|
|
</dd>
|
|
|
|
</dl>
|
2018-11-29 22:10:33 -05:00
|
|
|
</div>
|
|
|
|
|
2018-12-01 05:23:58 -05:00
|
|
|
<% @passport.image.try do |image| %>
|
2018-12-02 12:40:31 -05:00
|
|
|
<div class="col-md-6">
|
2018-12-02 08:20:22 -05:00
|
|
|
<div>
|
2018-12-02 08:27:52 -05:00
|
|
|
<%= image_tag url_for(image), id: :image, class: 'img-fluid', style: 'max-height: 600px' %>
|
2018-12-02 08:20:22 -05:00
|
|
|
</div>
|
2018-12-01 04:59:41 -05:00
|
|
|
</div>
|
|
|
|
<% end %>
|
2018-11-29 22:10:33 -05:00
|
|
|
</div>
|
2018-11-29 21:34:46 -05:00
|
|
|
</div>
|