Sha256: 08106111c49ccbc01ca98ad4744e99c32b917e05bee00c8a7c7e27835fa724d0

Contents?: true

Size: 518 Bytes

Versions: 46

Compression:

Stored size: 518 Bytes

Contents

# frozen_string_literal: true

module Blacklight
  module Document
    # Render the 'more like this' results from the response
    class MoreLikeThisComponent < Blacklight::Component
      with_collection_parameter :document

      # @param [Blacklight::Document] document
      def initialize(document:)
        @document = document
      end

      def render?
        @document.more_like_this.present?
      end

      def link_to_document(*args)
        helpers.link_to_document(*args)
      end
    end
  end
end

Version data entries

46 entries across 45 versions & 2 rubygems

Version Path
blacklight-8.6.1 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.40.0 app/components/blacklight/document/more_like_this_component.rb
blacklight-8.6.0 app/components/blacklight/document/more_like_this_component.rb
blacklight-8.5.1 app/components/blacklight/document/more_like_this_component.rb
blacklight-8.5.0 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.39.0 app/components/blacklight/document/more_like_this_component.rb
blacklight-8.4.0 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.38.0 app/components/blacklight/document/more_like_this_component.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/app/components/blacklight/document/more_like_this_component.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/app/components/blacklight/document/more_like_this_component.rb
blacklight-8.3.0 app/components/blacklight/document/more_like_this_component.rb
blacklight-8.2.2 app/components/blacklight/document/more_like_this_component.rb
blacklight-8.2.1 app/components/blacklight/document/more_like_this_component.rb
blacklight-8.2.0 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.37.0 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.36.2 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.36.1 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.36.0 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.35.0 app/components/blacklight/document/more_like_this_component.rb
blacklight-8.1.0 app/components/blacklight/document/more_like_this_component.rb