Sha256: 7a4e938a3a444be0ecf43685452ad1a56363406f82713c16762b80861a1244bb

Contents?: true

Size: 779 Bytes

Versions: 36

Compression:

Stored size: 779 Bytes

Contents

module Hyrax
  # Builds a query to find the members of an admin set.
  # For use on the admin menu, so it includes works regardless of status.
  class AdminAdminSetMemberSearchBuilder < ::SearchBuilder
    self.default_processor_chain += [:in_admin_set]
    self.default_processor_chain -= [:only_active_works]

    attr_reader :collection

    # @param [scope] Typically the controller object
    # @param [Collection]
    def initialize(scope:, collection:)
      @collection = collection
      super(scope)
    end

    # include filters into the query to only include the admin_set members (regardless of status)
    def in_admin_set(solr_parameters)
      solr_parameters[:fq] ||= []
      solr_parameters[:fq] << "{!term f=isPartOf_ssim}#{collection.id}"
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-2.9.5 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-2.9.4 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-2.9.3 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-2.9.2 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-2.9.1 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-2.9.0 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-2.8.0 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-2.7.2 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-2.7.1 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-2.7.0 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-2.6.0 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-3.0.0.pre.rc1 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-3.0.0.pre.beta3 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-2.5.1 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-2.5.0 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-3.0.0.pre.beta2 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-2.4.1 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-3.0.0.pre.beta1 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb
hyrax-2.4.0 app/search_builders/hyrax/admin_admin_set_member_search_builder.rb