Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Add UV search params onto other gallery views #2446

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading