Class: Blacklight::Configuration::ViewConfig
- Inherits:
-
OpenStructWithHashAccess
- Object
- OpenStruct
- OpenStructWithHashAccess
- Blacklight::Configuration::ViewConfig
- Defined in:
- lib/blacklight/configuration/view_config.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#constraints_component ⇒ Class
Component class used to render the constraints.
-
#display_type_field ⇒ String, Symbol
Solr field to use to render format-specific partials.
-
#document_actions ⇒ NestedOpenStructWithHashAccess{Symbol => Blacklight::Configuration::ToolConfig}
‘tools’ to render for each document.
-
#document_component ⇒ Class
Component class used to render a document; defaults to Blacklight::DocumentComponent.
-
#document_presenter_class ⇒ Class
Document presenter class used by helpers and views.
-
#facet_group_component ⇒ Class
Component class used to render a facet group.
-
#icon ⇒ String, ...
Icon file to use in the view picker.
-
#partials ⇒ Array<String>
Partials to render for each document(see #render_document_partials).
-
#search_bar_component ⇒ Class
Component class used to render the search bar.
-
#search_header_component ⇒ Class
Component class used to render the header above the documents.
-
#template ⇒ String
Partial to render around the documents.
-
#title_field ⇒ String, Symbol
Solr field to use to render a document title.
Instance Method Summary collapse
Methods inherited from OpenStructWithHashAccess
#deep_dup, #deep_transform_values, #merge, #merge!, #reverse_merge, #select, #sort_by, #sort_by!, #to_h, #try
Instance Attribute Details
#constraints_component ⇒ Class
Returns component class used to render the constraints.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/blacklight/configuration/view_config.rb', line 29 def display_label(**) I18n.t( :"blacklight.search.view_title.#{key}", default: [ :"blacklight.search.view.#{key}", label, title, key.to_s.humanize ], ** ) end |
#display_type_field ⇒ String, Symbol
Returns solr field to use to render format-specific partials.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/blacklight/configuration/view_config.rb', line 29 def display_label(**) I18n.t( :"blacklight.search.view_title.#{key}", default: [ :"blacklight.search.view.#{key}", label, title, key.to_s.humanize ], ** ) end |
#document_actions ⇒ NestedOpenStructWithHashAccess{Symbol => Blacklight::Configuration::ToolConfig}
Returns ‘tools’ to render for each document.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/blacklight/configuration/view_config.rb', line 29 def display_label(**) I18n.t( :"blacklight.search.view_title.#{key}", default: [ :"blacklight.search.view.#{key}", label, title, key.to_s.humanize ], ** ) end |
#document_component ⇒ Class
Returns component class used to render a document; defaults to Blacklight::DocumentComponent.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/blacklight/configuration/view_config.rb', line 29 def display_label(**) I18n.t( :"blacklight.search.view_title.#{key}", default: [ :"blacklight.search.view.#{key}", label, title, key.to_s.humanize ], ** ) end |
#document_presenter_class ⇒ Class
Returns document presenter class used by helpers and views.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/blacklight/configuration/view_config.rb', line 29 def display_label(**) I18n.t( :"blacklight.search.view_title.#{key}", default: [ :"blacklight.search.view.#{key}", label, title, key.to_s.humanize ], ** ) end |
#facet_group_component ⇒ Class
Returns component class used to render a facet group.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/blacklight/configuration/view_config.rb', line 29 def display_label(**) I18n.t( :"blacklight.search.view_title.#{key}", default: [ :"blacklight.search.view.#{key}", label, title, key.to_s.humanize ], ** ) end |
#icon ⇒ String, ...
Returns icon file to use in the view picker.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/blacklight/configuration/view_config.rb', line 29 def display_label(**) I18n.t( :"blacklight.search.view_title.#{key}", default: [ :"blacklight.search.view.#{key}", label, title, key.to_s.humanize ], ** ) end |
#partials ⇒ Array<String>
Returns partials to render for each document(see #render_document_partials).
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/blacklight/configuration/view_config.rb', line 29 def display_label(**) I18n.t( :"blacklight.search.view_title.#{key}", default: [ :"blacklight.search.view.#{key}", label, title, key.to_s.humanize ], ** ) end |
#search_bar_component ⇒ Class
Returns component class used to render the search bar.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/blacklight/configuration/view_config.rb', line 29 def display_label(**) I18n.t( :"blacklight.search.view_title.#{key}", default: [ :"blacklight.search.view.#{key}", label, title, key.to_s.humanize ], ** ) end |
#search_header_component ⇒ Class
Returns component class used to render the header above the documents.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/blacklight/configuration/view_config.rb', line 29 def display_label(**) I18n.t( :"blacklight.search.view_title.#{key}", default: [ :"blacklight.search.view.#{key}", label, title, key.to_s.humanize ], ** ) end |
#template ⇒ String
Returns partial to render around the documents.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/blacklight/configuration/view_config.rb', line 29 def display_label(**) I18n.t( :"blacklight.search.view_title.#{key}", default: [ :"blacklight.search.view.#{key}", label, title, key.to_s.humanize ], ** ) end |
#title_field ⇒ String, Symbol
Returns solr field to use to render a document title.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/blacklight/configuration/view_config.rb', line 29 def display_label(**) I18n.t( :"blacklight.search.view_title.#{key}", default: [ :"blacklight.search.view.#{key}", label, title, key.to_s.humanize ], ** ) end |
Instance Method Details
#display_label(**options) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/blacklight/configuration/view_config.rb', line 29 def display_label(**) I18n.t( :"blacklight.search.view_title.#{key}", default: [ :"blacklight.search.view.#{key}", label, title, key.to_s.humanize ], ** ) end |