Class: Spotlight::HomePagesController
- Inherits:
-
PagesController
- Object
- ApplicationController
- ApplicationController
- PagesController
- Spotlight::HomePagesController
- Includes:
- Blacklight::SearchHelper, Catalog
- Defined in:
- app/controllers/spotlight/home_pages_controller.rb
Overview
CRUD actions for the exhibit home page
Instance Method Summary collapse
-
#clone ⇒ Object
We’re oddly getting an unknown action error w/o explicitly defining this here.
- #edit ⇒ Object
- #index ⇒ Object
- #show ⇒ Object
Methods included from Catalog
#add_facet_visibility_field, #render_save_this_search?
Methods included from Base
#autocomplete_json_response, #autocomplete_json_response_for_document, #blacklight_config
Methods included from Config
#exhibit_specific_blacklight_config
Methods inherited from PagesController
#create, #destroy, #new, #preview, #update, #update_all
Methods included from Concerns::ApplicationController
#enabled_in_spotlight_view_type_configuration?, #field_enabled?
Methods included from Controller
#blacklight_config, #current_exhibit, #current_masthead, #current_masthead=, #current_site, #default_url_options, #exhibit_masthead?, #exhibit_search_action_url, #exhibit_search_facet_url, #resource_masthead?, #set_exhibit_locale_scope, #set_locale
Instance Method Details
#clone ⇒ Object
We’re oddly getting an unknown action error w/o explicitly defining this here
34 35 36 |
# File 'app/controllers/spotlight/home_pages_controller.rb', line 34 def clone super end |
#edit ⇒ Object
12 13 14 15 16 |
# File 'app/controllers/spotlight/home_pages_controller.rb', line 12 def edit t(:'spotlight.curation.sidebar.feature_pages'), exhibit_feature_pages_path(@exhibit) @page.title, [:edit, @exhibit, @page] super end |
#index ⇒ Object
18 19 20 |
# File 'app/controllers/spotlight/home_pages_controller.rb', line 18 def index redirect_to exhibit_feature_pages_path(@exhibit) end |
#show ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/spotlight/home_pages_controller.rb', line 22 def show @response, @document_list = search_results({}) if @page. if @page.nil? || !@page.published? render '/catalog/index' else render 'show' end end |