Display hierarchy
This commit is contained in:
parent
bb96b555bd
commit
080e8d0afc
|
@ -29,6 +29,7 @@
|
|||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
<%= render partial: 'rel_root', locals: { person: @account.person } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<span>
|
||||
<strong>
|
||||
<% if policy([:staff, relationship.org_unit]).show? %>
|
||||
<%= link_to relationship.org_unit.name, [:staff, relationship.org_unit] %>
|
||||
<% else %>
|
||||
<%= relationship.org_unit.name %>
|
||||
<% end %>
|
||||
</strong>
|
||||
|
||||
</br>
|
||||
|
||||
<%= relationship.status.name %>
|
||||
<%= translate :since %>
|
||||
<%= localize relationship.from_date %>
|
||||
</span>
|
||||
|
||||
<ul>
|
||||
<% relationship.children_rels.each do |children_relationship| %>
|
||||
<li>
|
||||
<%= render partial: 'rel_hierarchy', locals: { relationship: children_relationship } %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
|
@ -0,0 +1,7 @@
|
|||
<ul>
|
||||
<% Relationship.where(person: @account.person, parent_rel: nil).each do |relationship| %>
|
||||
<li>
|
||||
<%= render partial: 'rel_hierarchy', locals: { relationship: relationship } %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
|
@ -13,3 +13,4 @@ en:
|
|||
hello: Hello
|
||||
new_sign_in: New sign in to your account
|
||||
sidekiq: Sidekiq
|
||||
since: since
|
||||
|
|
|
@ -13,3 +13,4 @@ ru:
|
|||
hello: Здравствуйте
|
||||
new_sign_in: Произведён вход в ваш аккаунт
|
||||
sidekiq: Sidekiq
|
||||
since: с
|
||||
|
|
Reference in New Issue