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/org_units/show.html.erb
2019-10-02 08:29:47 +05:00

39 lines
1.1 KiB
Text

<div class="container">
<%= nav_breadcrumb(
[translate(:staff_services), staff_root_path],
[OrgUnit.model_name.human(count: 0), staff_org_units_path],
@org_unit.name,
) %>
<dl>
<dt><%= OrgUnit.human_attribute_name :kind %></dt>
<dd>
<% if @org_unit.kind.nil? %>
<%= none %>
<% elsif policy([:staff, @org_unit.kind]).show? %>
<%= link_to @org_unit.kind.name,
[:staff, @org_unit.kind] %>
<% else %>
<%= @org_unit.kind.name %>
<% end %>
</dd>
<dt><%= OrgUnit.human_attribute_name :short_name %></dt>
<dd><%= @org_unit.short_name %></dd>
<dt><%= OrgUnit.human_attribute_name :name %></dt>
<dd><%= @org_unit.name %></dd>
<dt><%= OrgUnit.human_attribute_name :parent_unit %></dt>
<dd>
<% if @org_unit.parent_unit.nil? %>
<%= none %>
<% elsif policy([:staff, @org_unit.parent_unit]).show? %>
<%= link_to @org_unit.parent_unit.name,
[:staff, @org_unit.parent_unit] %>
<% else %>
<%= @org_unit.parent_unit.name %>
<% end %>
</dd>
</dl>
</div>