Display OrgUnit#resource
This commit is contained in:
parent
fc9a4ef360
commit
37c1a34c70
6 changed files with 23 additions and 0 deletions
|
@ -40,6 +40,12 @@ module ApplicationHelper
|
|||
end
|
||||
end
|
||||
|
||||
def there_is
|
||||
tag.i class: 'text-muted' do
|
||||
translate :there_is
|
||||
end
|
||||
end
|
||||
|
||||
def none
|
||||
tag.i class: 'text-muted' do
|
||||
translate :none
|
||||
|
|
|
@ -35,5 +35,18 @@
|
|||
<%= @org_unit.parent_unit.name %>
|
||||
<% end %>
|
||||
</dd>
|
||||
|
||||
<dt><%= OrgUnit.human_attribute_name :resource %></dt>
|
||||
<dd>
|
||||
<% case @org_unit.resource %>
|
||||
<% when nil %>
|
||||
<%= none %>
|
||||
<% when FederalSubject %>
|
||||
<%= link_to @org_unit.resource.display_name,
|
||||
federal_subject_path(@org_unit.resource) %>
|
||||
<% else %>
|
||||
<%= there_is %>
|
||||
<% end %>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
|
|
@ -78,6 +78,7 @@ en:
|
|||
short_name: Short name
|
||||
name: Name
|
||||
parent_unit: Parent
|
||||
resource: Resource
|
||||
org_unit_kind:
|
||||
id: ID
|
||||
codename: Codename
|
||||
|
|
|
@ -78,6 +78,7 @@ ru:
|
|||
short_name: Короткое развание
|
||||
name: Название
|
||||
parent_unit: Родитель
|
||||
resource: Ресурс
|
||||
org_unit_kind:
|
||||
id: ID
|
||||
codename: Кодовое имя
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
en:
|
||||
title: Libertarian party of Russia
|
||||
staff_services: Staff services
|
||||
there_is: There is
|
||||
none: None
|
||||
current: current
|
||||
:yes: Yes
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
ru:
|
||||
title: Либертарианская партия России
|
||||
staff_services: Сервисы для сотрудников
|
||||
there_is: Есть
|
||||
none: Нет
|
||||
current: текущее
|
||||
:yes: Да
|
||||
|
|
Reference in a new issue