2018-11-30 10:09:44 -05:00
|
|
|
<div class="container-fluid">
|
2018-11-30 01:19:38 -05:00
|
|
|
<h1>
|
|
|
|
<%= @passport.surname %>
|
|
|
|
<%= @passport.given_name %>
|
|
|
|
<%= @passport.patronymic %>
|
|
|
|
</h1>
|
2018-11-30 01:09:56 -05:00
|
|
|
|
2018-11-30 01:19:38 -05:00
|
|
|
<hr/>
|
2018-11-30 01:09:56 -05:00
|
|
|
|
2018-11-30 09:59:29 -05:00
|
|
|
<% if user_signed_in? %>
|
|
|
|
<% if @passport.passport_confirmations.where(user: current_user).exists? %>
|
|
|
|
<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-11-30 10:09:44 -05:00
|
|
|
<div class="col-md-4 col-lg-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-11-30 01:09:56 -05:00
|
|
|
<%= Passport.human_attribute_name :surname %>
|
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= @passport.surname %>
|
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= Passport.human_attribute_name :given_name %>
|
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= @passport.given_name %>
|
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= Passport.human_attribute_name :patronymic %>
|
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= @passport.patronymic %>
|
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= Passport.human_attribute_name :sex %>
|
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= Passport.human_attribute_name "sex.#{@passport.sex}" %>
|
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= Passport.human_attribute_name :date_of_birth %>
|
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= localize @passport.date_of_birth %>
|
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= Passport.human_attribute_name :place_of_birth %>
|
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= @passport.place_of_birth %>
|
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= Passport.human_attribute_name :series %>
|
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= passport_series @passport.series %>
|
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= Passport.human_attribute_name :number %>
|
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= passport_number @passport.number %>
|
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= Passport.human_attribute_name :issued_by %>
|
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= @passport.issued_by %>
|
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= Passport.human_attribute_name :unit_code %>
|
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= @passport.unit_code %>
|
|
|
|
</dd>
|
|
|
|
|
2018-11-30 01:22:07 -05:00
|
|
|
<dt class="col-lg-4">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= Passport.human_attribute_name :date_of_issue %>
|
|
|
|
</dt>
|
2018-11-30 01:22:07 -05:00
|
|
|
<dd class="col-lg-8">
|
2018-11-30 01:09:56 -05:00
|
|
|
<%= localize @passport.date_of_issue %>
|
|
|
|
</dd>
|
|
|
|
</dl>
|
2018-11-29 22:10:33 -05:00
|
|
|
</div>
|
|
|
|
|
2018-12-01 04:59:41 -05:00
|
|
|
<% if @passport.image.attached? %>
|
|
|
|
<div class="col-md-8 col-lg-6">
|
|
|
|
<%= image_tag url_for(@passport.image), class: 'img-fluid' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2018-11-29 22:10:33 -05:00
|
|
|
</div>
|
2018-11-29 21:34:46 -05:00
|
|
|
</div>
|