Skip to content

Commit

Permalink
Display member number in search results, fixes #476
Browse files Browse the repository at this point in the history
  • Loading branch information
carlobeltrame committed May 2, 2024
1 parent 14b337b commit 3969965
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/decorators/sac_cas/person_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ def as_typeahead
{ id: id, label: h.h(full_label_with_changed_suffix) }
end

def as_quicksearch
super.tap do |data|
data[:label] = "#{data[:label]} [#{model.id}]"
end
end

private

def full_label_with_changed_suffix
Expand Down
1 change: 1 addition & 0 deletions app/views/full_text/_people_columns_sac_cas.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- t.col(Person.human_attribute_name(:id)) { |p| p.id.to_s }

0 comments on commit 3969965

Please sign in to comment.