Sha256: 85f499171c54713f0014373a65a560062a1e0bd79ab82728b4b95fcfb5a62009

Contents?: true

Size: 871 Bytes

Versions: 21

Compression:

Stored size: 871 Bytes

Contents

# frozen_string_literal: true

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

      # @param [Blacklight::Solr::Response::Group] group
      # @param [Integer] group_limit
      def initialize(group:, group_limit: -1)
        @group = group
        @group_limit = group_limit
      end

      def grouped_documents
        helpers.render_document_index @group.docs
      end

      # Get path to a search within a grouped result set
      #
      # @param [Blacklight::Solr::Response::Group] group
      # @return [Hash]
      def add_group_facet_params_and_redirect(group)
        helpers.search_action_path(
          helpers.search_state.add_facet_params_and_redirect(group.field, group.key)
        )
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
blacklight-8.6.1 app/components/blacklight/document/group_component.rb
blacklight-8.6.0 app/components/blacklight/document/group_component.rb
blacklight-8.5.1 app/components/blacklight/document/group_component.rb
blacklight-8.5.0 app/components/blacklight/document/group_component.rb
blacklight-8.4.0 app/components/blacklight/document/group_component.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/app/components/blacklight/document/group_component.rb
blacklight-8.3.0 app/components/blacklight/document/group_component.rb
blacklight-8.2.2 app/components/blacklight/document/group_component.rb
blacklight-8.2.1 app/components/blacklight/document/group_component.rb
blacklight-8.2.0 app/components/blacklight/document/group_component.rb
blacklight-8.1.0 app/components/blacklight/document/group_component.rb
blacklight-8.0.1 app/components/blacklight/document/group_component.rb
blacklight-8.0.0 app/components/blacklight/document/group_component.rb
blacklight-8.0.0.beta8 app/components/blacklight/document/group_component.rb
blacklight-8.0.0.beta7 app/components/blacklight/document/group_component.rb
blacklight-8.0.0.beta6 app/components/blacklight/document/group_component.rb
blacklight-8.0.0.beta5 app/components/blacklight/document/group_component.rb
blacklight-8.0.0.beta4 app/components/blacklight/document/group_component.rb
blacklight-8.0.0.beta3 app/components/blacklight/document/group_component.rb
blacklight-8.0.0.beta2 app/components/blacklight/document/group_component.rb