1
0
Fork 0

Display OrgUnit#resource

This commit is contained in:
Alex Kotov 2019-10-21 13:12:49 +05:00
parent fc9a4ef360
commit 37c1a34c70
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
6 changed files with 23 additions and 0 deletions

View file

@ -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

View file

@ -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>

View file

@ -78,6 +78,7 @@ en:
short_name: Short name
name: Name
parent_unit: Parent
resource: Resource
org_unit_kind:
id: ID
codename: Codename

View file

@ -78,6 +78,7 @@ ru:
short_name: Короткое развание
name: Название
parent_unit: Родитель
resource: Ресурс
org_unit_kind:
id: ID
codename: Кодовое имя

View file

@ -1,6 +1,7 @@
en:
title: Libertarian party of Russia
staff_services: Staff services
there_is: There is
none: None
current: current
:yes: Yes

View file

@ -1,6 +1,7 @@
ru:
title: Либертарианская партия России
staff_services: Сервисы для сотрудников
there_is: Есть
none: Нет
current: текущее
:yes: Да