Class: Spotlight::BlacklightConfigurationsController

Inherits:
ApplicationController show all
Includes:
Blacklight::SolrHelper
Defined in:
app/controllers/spotlight/blacklight_configurations_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#search_action_url

Instance Method Details

#edit_facet_fieldsObject

Edit the index and show view metadata fields



26
27
28
29
30
31
# File 'app/controllers/spotlight/blacklight_configurations_controller.rb', line 26

def edit_facet_fields
  add_breadcrumb @exhibit.title, @exhibit
  add_breadcrumb t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit)
  add_breadcrumb t(:'spotlight.curation.sidebar.search_facets'), exhibit_edit_facets_path(@exhibit)
  @fields = blacklight_solr.get('admin/luke', params: { fl: '*', 'json.nl' => 'map' })['fields']
end

#edit_metadata_fieldsObject

Edit the index and show view metadata fields



18
19
20
21
22
# File 'app/controllers/spotlight/blacklight_configurations_controller.rb', line 18

def 
  add_breadcrumb @exhibit.title, @exhibit
  add_breadcrumb t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit)
  add_breadcrumb t(:'spotlight.curation.sidebar.metadata'), (@exhibit)
end

#updateObject



8
9
10
11
12
13
14
# File 'app/controllers/spotlight/blacklight_configurations_controller.rb', line 8

def update
  if @blacklight_configuration.update(exhibit_params)
    redirect_to main_app.root_path, notice: "The exhibit was saved."
  else
    redirect_to [:edit, @exhibit]
  end
end