1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/app/views/staffs/people/account_connection_links/show.html.erb

35 lines
1 KiB
Text
Raw Normal View History

<div class="container">
<%= nav_breadcrumb(
[translate(:staff_services), staff_root_path],
[Person.model_name.human(count: 0), staff_people_path],
[@person.full_name, staff_person_path(@person)],
translate('.link_to_connect_account'),
) %>
<div class="text-center">
<p class="lead">
<%= translate '.description' %>
</p>
<% if policy([:staff, @person, AccountConnectionLink.new(@person)]).show? %>
<% if @person.account_connection_token %>
<div class="my-4">
<input
type="text"
class="form-control"
readonly="readonly"
value="<%= person_account_connection_link @person %>"
>
</div>
<% end %>
<% end %>
<% if policy([:staff, @person, AccountConnectionLink.new(@person)]).create? %>
<%= link_to translate('.generate'),
staff_person_account_connection_link_path(@person),
method: :post,
class: 'btn btn-primary btn-lg' %>
<% end %>
</div>
</div>