1
0
Fork 0

Display short position

This commit is contained in:
Alex Kotov 2019-08-15 08:40:34 +05:00
parent 76d9c5d27f
commit ed2effdbad
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
4 changed files with 23 additions and 1 deletions

View file

@ -20,4 +20,12 @@ module RelationshipsHelper
translate_enum :relationship_position, relationship.position
end
end
def relationship_short_position_or_none(relationship)
if relationship&.position.nil?
translate :none
else
translate_enum :relationship_short_position, relationship.position
end
end
end

View file

@ -48,7 +48,7 @@
<tr>
<td scope="row"><%= relationship.id %></td>
<td><%= relationship_status_or_none relationship %></td>
<td><%= relationship_position_or_none relationship %></td>
<td><%= relationship_short_position_or_none relationship %></td>
<td><%= relationship_from_date_or_none relationship %></td>
<td>
<%= staff_regional_office_link_or_none \

View file

@ -15,3 +15,10 @@ en:
regional_manager: Regional manager
regional_supervisor: Regional supervisor
regional_secretary: Regional secretary
relationship_short_position:
federal_manager: Federal manager
federal_supervisor: Federal supervisor
federal_secretary: Federal secretary
regional_manager: Regional manager
regional_supervisor: Regional supervisor
regional_secretary: Regional secretary

View file

@ -17,6 +17,13 @@ ru:
Член контрольно-ревизионной комиссии регионального отделения
regional_secretary: >-
Секретарь руководящего комитета регионального отделения
relationship_short_position:
federal_manager: Член ФК
federal_supervisor: Член ЦКРК
federal_secretary: Секретарь ФК
regional_manager: Член РК РО
regional_supervisor: Член КРК РО
regional_secretary: Секретарь РК РО
relationship_role:
federal_manager: Член федерального комитета