diff --git a/app/helpers/people_youth_helper.rb b/app/helpers/people_youth_helper.rb index 915e5f4..ac6c6fa 100644 --- a/app/helpers/people_youth_helper.rb +++ b/app/helpers/people_youth_helper.rb @@ -12,7 +12,21 @@ def existing_person_nationalities end def format_person_readable_manageds(person) - format_many_assoc(person, OpenStruct.new({ name: :readable_manageds })) + manageds = person.decorate.readable_manageds + if manageds.size.zero? + ta(:no_entry, association(person, :readable_manageds)) + else + simple_list(manageds, class: 'unstyled') { |val| assoc_link(val) } + end + end + + def format_person_managers(person) + managers = person.managers + if managers.size.zero? + ta(:no_entry, association(person, :managers)) + else + simple_list(managers, class: 'unstyled') { |val| assoc_link(val) } + end end end