Skip to content

Commit

Permalink
Adjust managed/manager list styling
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWalkingLeek committed Nov 23, 2023
1 parent 4b7e434 commit e976b61
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion app/helpers/people_youth_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e976b61

Please sign in to comment.