Sha256: 0c2c7b8f4431fa5c23ec7ba13c642cf1b1738f66c0601ff852d2ddd78fde2d6c

Contents?: true

Size: 767 Bytes

Versions: 1

Compression:

Stored size: 767 Bytes

Contents

module Spotlight
  module Base
    extend ActiveSupport::Concern

    include Blacklight::Base
    include Spotlight::Config

    # This overwrites Blacklight::Configurable#blacklight_config
    def blacklight_config
      exhibit_specific_blacklight_config
    end

    def autocomplete_json_response document_list
      document_list.map do |doc|
        {
          id: doc.id,
          title: view_context.presenter(doc).raw_document_heading,
          thumbnail: doc.first(blacklight_config.index.thumbnail_field),
          thumbnails: doc[blacklight_config.index.thumbnail_field],
          description: doc.id,
          url: exhibit_catalog_path(current_exhibit, doc),
          private: doc.private?(current_exhibit)
        }
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blacklight-spotlight-0.2.0 lib/spotlight/base.rb