Sha256: 18fc31820d15fa0299dc9176464d50fe6c8c40026372eee269fcc782c546bc72

Contents?: true

Size: 1000 Bytes

Versions: 18

Compression:

Stored size: 1000 Bytes

Contents

module Spotlight
  ##
  # Spotlight catalog mixins
  module Catalog
    extend ActiveSupport::Concern
    include Blacklight::Catalog
    include Spotlight::Base

    require 'spotlight/catalog/access_controls_enforcement'

    include Spotlight::Catalog::AccessControlsEnforcement

    included do
      before_filter do
        if current_exhibit && can?(:curate, current_exhibit)
          blacklight_config.add_facet_field 'exhibit_visibility',
                                            label: I18n.t(:'spotlight.catalog.facets.exhibit_visibility.label'),
                                            query: {
                                              private: {
                                                label: I18n.t(:'spotlight.catalog.facets.exhibit_visibility.private'),
                                                fq: "#{Spotlight::SolrDocument.visibility_field(current_exhibit)}:false" }
                                            }
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
blacklight-spotlight-0.12.1 lib/spotlight/catalog.rb
blacklight-spotlight-0.12.0 lib/spotlight/catalog.rb
blacklight-spotlight-0.11.0 lib/spotlight/catalog.rb
blacklight-spotlight-0.10.3 lib/spotlight/catalog.rb
blacklight-spotlight-0.10.2 lib/spotlight/catalog.rb
blacklight-spotlight-0.10.1 lib/spotlight/catalog.rb
blacklight-spotlight-0.10.0 lib/spotlight/catalog.rb
blacklight-spotlight-0.9.2 lib/spotlight/catalog.rb
blacklight-spotlight-0.9.1 lib/spotlight/catalog.rb
blacklight-spotlight-0.9.0 lib/spotlight/catalog.rb
blacklight-spotlight-0.8.2 lib/spotlight/catalog.rb
blacklight-spotlight-0.8.1 lib/spotlight/catalog.rb
blacklight-spotlight-0.8.0 lib/spotlight/catalog.rb
blacklight-spotlight-0.7.2 lib/spotlight/catalog.rb
blacklight-spotlight-0.7.1 lib/spotlight/catalog.rb
blacklight-spotlight-0.7.0 lib/spotlight/catalog.rb
blacklight-spotlight-0.6.0 lib/spotlight/catalog.rb
blacklight-spotlight-0.5.0 lib/spotlight/catalog.rb