Skip to content

Commit

Permalink
Merge pull request #2446 from samvera/i199-uv-search-params-on-other-…
Browse files Browse the repository at this point in the history
…views

🐛 Add UV search params onto other gallery views
  • Loading branch information
kirkkwang authored Feb 6, 2025
2 parents 8cd04f0 + 32bfd02 commit dccf8dc
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions app/helpers/hyku/blacklight_helper_behavior.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def link_to_document(doc, field_or_opts = nil, opts = { counter: nil })
# pull solr_document from input if we don't already have a solr_document
document = doc&.try(:solr_document) || doc
Deprecation.silence(Blacklight::UrlHelperBehavior) do
link_to label, generate_work_url(document, request, universal_viewer_url_params(opts)), document_link_params(document, opts)
link_to label, generate_work_url(document, request, params), document_link_params(document, opts)
end
end
# rubocop:enable Metrics/MethodLength
Expand All @@ -59,11 +59,5 @@ def document_link_params(_doc, opts)
opts.except(:label, :counter, :q, :highlight)
end
private :document_link_params

# options needed to carry the search into the universalviewer
def universal_viewer_url_params(opts)
opts.slice(:q, :highlight)
end
private :document_link_params
end
end

0 comments on commit dccf8dc

Please sign in to comment.