app/controllers/spotlight/pages_controller.rb in blacklight-spotlight-3.0.0.rc2 vs app/controllers/spotlight/pages_controller.rb in blacklight-spotlight-3.0.0.rc3

- old
+ new

@@ -17,10 +17,14 @@ include Spotlight::Base include Blacklight::SearchContext helper_method :get_search_results, :search_results, :fetch, :page_collection_name, :presenter + before_action do + blacklight_config.view.gallery.classes = 'row-cols-2 row-cols-md-4' unless @page&.display_sidebar + end + # GET /exhibits/1/pages def index # set up a model the inline "add a new page" form @page = CanCan::ControllerResource.new(self).send(:build_resource) @@ -144,17 +148,10 @@ def page_attributes %i[id published title weight display_sidebar parent_page_id] end def allowed_page_params - [:title, :content, thumbnail_attributes: featured_image_attributes] - end - - def featured_image_attributes - %i[ - source image document_global_id iiif_region iiif_tilesource - iiif_manifest_url iiif_canvas_id iiif_image_id - ] + [:title, :content, thumbnail_attributes: featured_image_params] end def human_name @human_name ||= page_collection_name.humanize end