Sha256: 08106111c49ccbc01ca98ad4744e99c32b917e05bee00c8a7c7e27835fa724d0

Contents?: true

Size: 518 Bytes

Versions: 51

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

51 entries across 50 versions & 2 rubygems

Version Path
blacklight-7.30.0 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.29.0 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.28.0 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.27.1 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.27.0 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.26.1 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.26.0 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.25.3 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.25.2 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.25.1 app/components/blacklight/document/more_like_this_component.rb
blacklight-7.25.0 app/components/blacklight/document/more_like_this_component.rb