Skip to content

Commit

Permalink
🐛 Add UV search params onto other gallery views
Browse files Browse the repository at this point in the history
This commit will remove a method that didn't seem to be working and
instead use the #generate_work_url method instead.  This way it actually
passes the UV search params.
  • Loading branch information
kirkkwang committed Feb 6, 2025
1 parent 8cd04f0 commit 32bfd02
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 32bfd02

Please sign in to comment.