app/models/spotlight/blacklight_configuration.rb in blacklight-spotlight-3.0.0.rc5 vs app/models/spotlight/blacklight_configuration.rb in blacklight-spotlight-3.0.0.rc6

- old
+ new

@@ -72,35 +72,44 @@ # Create a new config based on the defaults config = default_blacklight_config.inheritable_copy(self.class) config.current_exhibit = exhibit + config.document_presenter_class = lambda do |context| + if context.action_name == 'index' + config.index.document_presenter_class + else + config.show.document_presenter_class + end + end + config.show.merge! show unless show.blank? config.index.merge! index unless index.blank? config.index.respond_to[:iiif_json] = true config.index.thumbnail_field ||= Spotlight::Engine.config.thumbnail_field config.add_results_collection_tool 'curator_actions', if: :render_curator_actions? unless config.curator_actions config.curator_actions ||= Blacklight::NestedOpenStructWithHashAccess.new(Blacklight::Configuration::ToolConfig) - config.curator_actions.save_search - config.curator_actions.bulk_actions + config.curator_actions.save_search! + config.curator_actions.bulk_actions! end unless config.bulk_actions config.bulk_actions ||= Blacklight::NestedOpenStructWithHashAccess.new(Blacklight::Configuration::ToolConfig) - config.bulk_actions.change_visibility - config.bulk_actions.add_tags - config.bulk_actions.remove_tags + config.bulk_actions.change_visibility! + config.bulk_actions.add_tags! + config.bulk_actions.remove_tags! end config.default_solr_params = config.default_solr_params.merge(default_solr_params) config.default_per_page = default_per_page if default_per_page + config.view.embed! config.view.embed.partials ||= ['openseadragon'] config.view.embed.if = false config.view.embed.locals ||= { osd_container_class: '' } # Add any custom fields