Class: Spotlight::BrowseController

Inherits:
ApplicationController show all
Includes:
Blacklight::Facet, Base
Defined in:
app/controllers/spotlight/browse_controller.rb

Overview

Index and read actions for browse (see SearchesController for the curator’s create-update-delete actions)

Instance Method Summary collapse

Methods included from Base

#autocomplete_json_response, #autocomplete_json_response_for_document, #blacklight_config

Methods included from Config

#exhibit_specific_blacklight_config

Methods included from Concerns::ApplicationController

#enabled_in_spotlight_view_type_configuration?, #field_enabled?

Methods included from Controller

#blacklight_config, #current_exhibit, #current_masthead=, #current_site, #default_url_options, #exhibit_masthead?, #exhibit_search_action_url, #exhibit_search_facet_url, #search_action_url, #search_facet_url, #set_exhibit_locale_scope, #set_locale

Instance Method Details

#indexObject



19
20
21
# File 'app/controllers/spotlight/browse_controller.rb', line 19

def index
  @searches = @exhibit.searches.published
end

#showObject



23
24
25
26
27
28
29
30
31
32
33
# File 'app/controllers/spotlight/browse_controller.rb', line 23

def show
  @response, @document_list = search_results(search_query)

  respond_to do |format|
    format.html
    format.json do
      @presenter = Blacklight::JsonPresenter.new(@response, @document_list, facets_from_request, blacklight_config)
      render template: 'catalog/index'
    end
  end
end