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

View file

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

View file

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

View file

@ -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: Кодовое имя

View file

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

View file

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