Module: Spotlight::Base
- Extended by:
- ActiveSupport::Concern
- Includes:
- Blacklight::Base, Config
- Included in:
- BrowseController, Catalog, DashboardsController, PagesController, SearchesController
- Defined in:
- lib/spotlight/base.rb
Instance Method Summary collapse
- #autocomplete_json_response(document_list) ⇒ Object
-
#blacklight_config ⇒ Object
This overwrites Blacklight::Configurable#blacklight_config.
Methods included from Config
#exhibit_specific_blacklight_config
Instance Method Details
#autocomplete_json_response(document_list) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/spotlight/base.rb', line 13 def autocomplete_json_response document_list document_list.map do |doc| { id: doc.id, title: CGI.unescapeHTML(view_context.presenter(doc).document_heading.to_str), thumbnail: doc.first(blacklight_config.index.thumbnail_field), thumbnails: doc.spotlight_image_versions.try(:thumb) || doc[blacklight_config.index.thumbnail_field], full_images: doc.spotlight_image_versions.try(:full), description: doc.id, url: exhibit_catalog_path(current_exhibit, doc), private: doc.private?(current_exhibit), global_id: doc.to_global_id.to_s } end end |
#blacklight_config ⇒ Object
This overwrites Blacklight::Configurable#blacklight_config
9 10 11 |
# File 'lib/spotlight/base.rb', line 9 def blacklight_config exhibit_specific_blacklight_config end |