Sha256: 4f32f549de0232f912ce6b8dc176fd55d85f2326f58cfa874fc96678a789c5d2

Contents?: true

Size: 449 Bytes

Versions: 13

Compression:

Stored size: 449 Bytes

Contents

# frozen_string_literal: true

module Arclight
  # Render a document for a search result; this works with
  # both the compact and list views for grouped or ungrouped
  # results.
  class SearchResultComponent < Blacklight::DocumentComponent
    attr_reader :document

    def compact?
      presenter.view_config.key.to_s == 'compact'
    end

    def icon
      helpers.blacklight_icon helpers.document_or_parent_icon(@document)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
arclight-1.4.0 app/components/arclight/search_result_component.rb
arclight-1.3.0 app/components/arclight/search_result_component.rb
arclight-1.2.0 app/components/arclight/search_result_component.rb
arclight-1.1.3 app/components/arclight/search_result_component.rb
arclight-1.1.2 app/components/arclight/search_result_component.rb
arclight-1.1.1 app/components/arclight/search_result_component.rb
arclight-1.1.0 app/components/arclight/search_result_component.rb
arclight-1.0.1 app/components/arclight/search_result_component.rb
arclight-1.0.0 app/components/arclight/search_result_component.rb
arclight-1.0.0.beta6 app/components/arclight/search_result_component.rb
arclight-1.0.0.beta4 app/components/arclight/search_result_component.rb
arclight-1.0.0.beta3 app/components/arclight/search_result_component.rb
arclight-1.0.0.beta2 app/components/arclight/search_result_component.rb