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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def there_is
|
||||||
|
tag.i class: 'text-muted' do
|
||||||
|
translate :there_is
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def none
|
def none
|
||||||
tag.i class: 'text-muted' do
|
tag.i class: 'text-muted' do
|
||||||
translate :none
|
translate :none
|
||||||
|
|
|
@ -35,5 +35,18 @@
|
||||||
<%= @org_unit.parent_unit.name %>
|
<%= @org_unit.parent_unit.name %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</dd>
|
</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>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -78,6 +78,7 @@ en:
|
||||||
short_name: Short name
|
short_name: Short name
|
||||||
name: Name
|
name: Name
|
||||||
parent_unit: Parent
|
parent_unit: Parent
|
||||||
|
resource: Resource
|
||||||
org_unit_kind:
|
org_unit_kind:
|
||||||
id: ID
|
id: ID
|
||||||
codename: Codename
|
codename: Codename
|
||||||
|
|
|
@ -78,6 +78,7 @@ ru:
|
||||||
short_name: Короткое развание
|
short_name: Короткое развание
|
||||||
name: Название
|
name: Название
|
||||||
parent_unit: Родитель
|
parent_unit: Родитель
|
||||||
|
resource: Ресурс
|
||||||
org_unit_kind:
|
org_unit_kind:
|
||||||
id: ID
|
id: ID
|
||||||
codename: Кодовое имя
|
codename: Кодовое имя
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
en:
|
en:
|
||||||
title: Libertarian party of Russia
|
title: Libertarian party of Russia
|
||||||
staff_services: Staff services
|
staff_services: Staff services
|
||||||
|
there_is: There is
|
||||||
none: None
|
none: None
|
||||||
current: current
|
current: current
|
||||||
:yes: Yes
|
:yes: Yes
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
ru:
|
ru:
|
||||||
title: Либертарианская партия России
|
title: Либертарианская партия России
|
||||||
staff_services: Сервисы для сотрудников
|
staff_services: Сервисы для сотрудников
|
||||||
|
there_is: Есть
|
||||||
none: Нет
|
none: Нет
|
||||||
current: текущее
|
current: текущее
|
||||||
:yes: Да
|
:yes: Да
|
||||||
|
|
Reference in a new issue