Sha256: b6484f3d9594f37a921c2278700859ec24ac489bb7eaa637ff857acebc998837
Contents?: true
Size: 1.01 KB
Versions: 18
Compression:
Stored size: 1.01 KB
Contents
# frozen_string_literal: true module Blacklight class SearchContextComponent < Blacklight::Component with_collection_parameter :search_context def initialize(search_context:, search_session:) @search_context = search_context @search_session = search_session end def render? @search_context.present? && (@search_context[:prev] || @search_context[:next]) end def item_page_entry_info Deprecation.silence(Blacklight::CatalogHelperBehavior) do helpers.item_page_entry_info end end def link_to_previous_document(document = nil, *args, **kwargs) Deprecation.silence(Blacklight::UrlHelperBehavior) do helpers.link_to_previous_document(document || @search_context[:prev], *args, **kwargs) end end def link_to_next_document(document = nil, *args, **kwargs) Deprecation.silence(Blacklight::UrlHelperBehavior) do helpers.link_to_next_document(document || @search_context[:next], *args, **kwargs) end end end end
Version data entries
18 entries across 18 versions & 2 rubygems