88 lines
2.9 KiB
Text
88 lines
2.9 KiB
Text
<div class="container">
|
|
<%= nav_breadcrumb(
|
|
[translate(:staff_services), staff_root_path],
|
|
[Person.model_name.human(count: 0), staff_people_path],
|
|
@person.full_name,
|
|
) %>
|
|
|
|
<%= render partial: 'nav_tabs', locals: { person: @person, tab: :overview } %>
|
|
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<% if @person.photo.attached? %>
|
|
<%= image_tag @person.photo, class: 'img-thumbnail mb-4' %>
|
|
<% else %>
|
|
<%= image_tag 'image_placeholder.png', class: 'img-thumbnail mb-4' %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<dl>
|
|
<dt><%= Person.human_attribute_name :account %></dt>
|
|
<dd>
|
|
<%= staff_account_link_or_none @person.account %>
|
|
|
|
<% if policy([:staff,
|
|
@person,
|
|
AccountConnectionLink.new(@person)]).new? %>
|
|
<br/>
|
|
|
|
<small>
|
|
<%= link_to(
|
|
translate('.create_link_to_connect_account'),
|
|
new_staff_person_account_connection_link_path(@person),
|
|
) %>
|
|
</small>
|
|
<% end %>
|
|
</dd>
|
|
|
|
<dt><%= Person.human_attribute_name :last_name %></dt>
|
|
<dd><%= truncate @person.last_name %></dd>
|
|
|
|
<dt><%= Person.human_attribute_name :first_name %></dt>
|
|
<dd><%= truncate @person.first_name %></dd>
|
|
|
|
<dt><%= Person.human_attribute_name :middle_name %></dt>
|
|
<dd><%= truncate @person.middle_name %></dd>
|
|
|
|
<dt><%= Person.human_attribute_name :sex %></dt>
|
|
<dd><%= translate_enum :sex, @person.sex if @person.sex %></dd>
|
|
|
|
<dt><%= Person.human_attribute_name :date_of_birth %></dt>
|
|
<dd><%= localize @person.date_of_birth if @person.date_of_birth %></dd>
|
|
|
|
<dt><%= Person.human_attribute_name :place_of_birth %></dt>
|
|
<dd><%= truncate @person.place_of_birth if @person.place_of_birth %></dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<dl>
|
|
<dt><%= Relationship.human_attribute_name :status %></dt>
|
|
<dd><%= relationship_status_or_none @person.current_relationship %></dd>
|
|
|
|
<dt><%= Relationship.human_attribute_name :position %></dt>
|
|
<dd>
|
|
<%= relationship_position_or_none @person.current_relationship %>
|
|
</dd>
|
|
|
|
<dt><%= Relationship.human_attribute_name :from_date %></dt>
|
|
<dd>
|
|
<%= relationship_from_date_or_none @person.current_relationship %>
|
|
</dd>
|
|
|
|
<dt><%= Relationship.human_attribute_name :regional_office %></dt>
|
|
<dd>
|
|
<%= staff_regional_office_link_or_none \
|
|
@person.current_relationship&.regional_office %>
|
|
</dd>
|
|
|
|
<dt><%= Relationship.human_attribute_name :initiator_account %></dt>
|
|
<dd>
|
|
<%= staff_account_link_or_none \
|
|
@person.current_relationship&.initiator_account %>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|