1
0
Fork 0

Add confirmation button

This commit is contained in:
Alex Kotov 2018-12-03 21:23:50 +05:00
parent e50824afce
commit 2eb272a8cd
No known key found for this signature in database
GPG Key ID: 4E831250F47DE154
3 changed files with 21 additions and 0 deletions

View File

@ -1,6 +1,19 @@
<div class="container">
<%= render partial: 'passports/nav_tabs', locals: { tab: :confirmations } %>
<% if @passport.can_have_confirmations? && current_account %>
<div class="mb-3">
<% if @passport.passport_confirmations.where(account: current_account).exists? %>
<%= translate '.already_confirmed' %>
<% else %>
<%= link_to translate('.new_confirmation'),
'#', # new_passport_passport_confirmation_path(@passport),
role: :button,
class: 'btn btn-success' %>
<% end %>
</div>
<% end %>
<table class="table">
<thead>
<tr>

View File

@ -10,3 +10,7 @@ en:
Please compare it with corresponding data on the image.
It you believe the data matches,
confirm it by pressing the button below.
passport_confirmations:
index:
new_confirmation: New confirmation
already_confirmed: You have already confirmed the passport.

View File

@ -10,3 +10,7 @@ ru:
Пожалуйста, сравните их с соответствующими данными на картинке.
Если вы считаете, что данные совпадают,
подтвердите это нажатием кнопки ниже.
passport_confirmations:
index:
new_confirmation: Новое подтверждение
already_confirmed: Вы уже подтвердили этот паспорт.