Class: Spotlight::ResourcesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Spotlight::ResourcesController
- Defined in:
- app/controllers/spotlight/resources_controller.rb
Overview
CRUD actions for exhibit resources
Instance Method Summary collapse
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, #exhibit_masthead?, #exhibit_search_action_url, #exhibit_search_facet_url, #resource_masthead?, #search_action_url, #search_facet_url
Methods included from Config
#exhibit_specific_blacklight_config
Instance Method Details
#create ⇒ Object
21 22 23 24 25 26 27 |
# File 'app/controllers/spotlight/resources_controller.rb', line 21 def create if @resource.save_and_index redirect_to admin_exhibit_catalog_path(@resource.exhibit, sort: :timestamp) else render action: 'new' end end |
#monitor ⇒ Object
29 30 31 |
# File 'app/controllers/spotlight/resources_controller.rb', line 29 def monitor render json: current_exhibit.reindex_progress end |
#new ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'app/controllers/spotlight/resources_controller.rb', line 12 def new t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), exhibit_root_path(@exhibit) t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit) t(:'spotlight.curation.sidebar.items'), admin_exhibit_catalog_path(@exhibit) t(:'spotlight.resources.new.header'), new_exhibit_resource_path(@exhibit) render end |
#reindex_all ⇒ Object
33 34 35 36 37 |
# File 'app/controllers/spotlight/resources_controller.rb', line 33 def reindex_all @exhibit.reindex_later redirect_to admin_exhibit_catalog_path(@exhibit), notice: t(:'spotlight.resources.reindexing_in_progress') end |