Class: Spotlight::HomePagesController

Inherits:
PagesController show all
Includes:
Blacklight::SolrHelper, Catalog
Defined in:
app/controllers/spotlight/home_pages_controller.rb

Instance Method Summary collapse

Methods included from Base

#autocomplete_json_response, #blacklight_config

Methods included from Config

#exhibit_specific_blacklight_config

Methods inherited from PagesController

#_prefixes, #create, #destroy, #new, #preview, #update, #update_all

Methods included from Controller

#blacklight_config, #current_exhibit, #exhibit_search_action_url, #exhibit_search_facet_url

Instance Method Details

#editObject



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

def edit
  add_breadcrumb t(:'spotlight.curation.sidebar.feature_pages'), exhibit_feature_pages_path(@exhibit)
  add_breadcrumb @page.title, [:edit, @exhibit, @page]
  super
end

#indexObject



16
17
18
# File 'app/controllers/spotlight/home_pages_controller.rb', line 16

def index
  redirect_to exhibit_feature_pages_path(@exhibit)
end

#showObject



20
21
22
23
24
25
26
27
28
# File 'app/controllers/spotlight/home_pages_controller.rb', line 20

def show
  (@response, @document_list) = get_search_results

  if @page.nil? or !@page.published?
    render '/catalog/index'
  else
    render 'show'
  end
end