Sha256: 08783b764826a3b78a1cb44a4922b3823e9bcada4495dd2d9bcb6b52d37dc6be

Contents?: true

Size: 635 Bytes

Versions: 9

Compression:

Stored size: 635 Bytes

Contents

# frozen_string_literal: true

module Arclight
  # Render a collection document for a
  # grouped search result view
  class GroupComponent < Blacklight::Document::GroupComponent
    def compact?
      helpers.document_index_view_type.to_s == 'compact'
    end

    def document
      @document ||= @group.docs.first.collection
    end

    def presenter
      @presenter ||= Arclight::ShowPresenter.new(document, helpers).with_field_group('group_header_field')
    end

    def search_within_collection_url
      search_catalog_path(helpers.search_without_group.merge(f: { collection: [document.collection_name] }))
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
arclight-1.1.1 app/components/arclight/group_component.rb
arclight-1.1.0 app/components/arclight/group_component.rb
arclight-1.0.1 app/components/arclight/group_component.rb
arclight-1.0.0 app/components/arclight/group_component.rb
arclight-1.0.0.beta6 app/components/arclight/group_component.rb
arclight-1.0.0.beta4 app/components/arclight/group_component.rb
arclight-1.0.0.beta3 app/components/arclight/group_component.rb
arclight-1.0.0.beta2 app/components/arclight/group_component.rb
arclight-1.0.0.beta1 app/components/arclight/group_component.rb