class Blacklight::Configuration::ViewConfig
Public Instance Methods
display_label(**options)
click to toggle source
@!attribute template
@return [String] partial to render around the documents
@!attribute partials
@return [Array<String>] partials to render for each document(see #render_document_partials)
@!attribute document_presenter_class
@return [Class] document presenter class used by helpers and views
@!attribute document_component
@return [Class] component class used to render a document; defaults to Blacklight::DocumentComponent
@!attribute title_field
@return [String, Symbol] solr field to use to render a document title
@!attribute display_type_field
@return [String, Symbol] solr field to use to render format-specific partials
@!attribute icon
@return [String, Symbol, Blacklight::Icons::IconComponent] icon file to use in the view picker
@!attribute document_actions
@return [NestedOpenStructWithHashAccess{Symbol => Blacklight::Configuration::ToolConfig}] 'tools' to render for each document
@!attribute facet_group_component
@return [Class] component class used to render a facet group
@!attribute constraints_component
@return [Class] component class used to render the constraints
@!attribute search_bar_component
@return [Class] component class used to render the search bar
@!attribute search_header_component
@return [Class] component class used to render the header above the documents
# File lib/blacklight/configuration/view_config.rb, line 29 def display_label(**options) I18n.t( :"blacklight.search.view_title.#{key}", default: [ :"blacklight.search.view.#{key}", label, title, key.to_s.humanize ], **options ) end
title_field=(value)
click to toggle source
Translate an ordinary field into the expected DisplayField
object
Calls superclass method
# File lib/blacklight/configuration/view_config.rb, line 43 def title_field=(value) if value.is_a?(Blacklight::Configuration::Field) && !value.is_a?(Blacklight::Configuration::DisplayField) super(Blacklight::Configuration::DisplayField.new(value.to_h)) else super end end