Skip to content

Commit

Permalink
[ESSI-2025] prepare campus-specific #link_to_facet
Browse files Browse the repository at this point in the history
  • Loading branch information
aploshay committed Oct 25, 2024
1 parent 3eafffb commit 7fe444e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/helpers/facet_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,13 @@ module FacetHelper
def campus_label(value)
CampusService.find(value)[:term] || ''
end

# imported from hyrax to prep campus-specific version
# @param item [Object]
# @param field [String]
# @return [ActiveSupport::SafeBuffer] the html_safe link
def link_to_facet(item, field)
path = main_app.search_catalog_path(search_state.add_facet_params_and_redirect(field, item))
link_to(item, path)
end
end

0 comments on commit 7fe444e

Please sign in to comment.