Sha256: 984d4134dcec42bbda14dd625356dc4722cfcddb37563e3d3c7958a44584f43c
Contents?: true
Size: 978 Bytes
Versions: 23
Compression:
Stored size: 978 Bytes
Contents
module Spotlight ## # Helper for browse views module BrowseHelper include ::BlacklightConfigurationHelper def document_index_view_type if @search && @search.default_index_view_type.present? && params[:view].blank? blacklight_config.view[@search.default_index_view_type].key else super end end ## # Override Blacklight's #default_document_index_view_type helper to # use a different default view when presenting browse categories def default_document_index_view_type if view_available? default_browse_index_view_type default_browse_index_view_type else super end end private def view_available?(view) blacklight_config.view.key?(view) && blacklight_configuration_context.evaluate_if_unless_configuration(blacklight_config.view) end def default_browse_index_view_type Spotlight::Engine.config.default_browse_index_view_type end end end
Version data entries
23 entries across 23 versions & 1 rubygems