Class: Blacklight::SearchNavbarComponent
- Inherits:
-
Component
- Object
- Component
- Blacklight::SearchNavbarComponent
- Defined in:
- app/components/blacklight/search_navbar_component.rb
Instance Attribute Summary collapse
-
#blacklight_config ⇒ Object
readonly
Returns the value of attribute blacklight_config.
Instance Method Summary collapse
-
#initialize(blacklight_config:) ⇒ SearchNavbarComponent
constructor
A new instance of SearchNavbarComponent.
- #search_bar ⇒ Object
- #search_bar_component ⇒ Object
- #search_bar_component_class ⇒ Object
- #view_config ⇒ Object
Constructor Details
#initialize(blacklight_config:) ⇒ SearchNavbarComponent
Returns a new instance of SearchNavbarComponent.
5 6 7 |
# File 'app/components/blacklight/search_navbar_component.rb', line 5 def initialize(blacklight_config:) @blacklight_config = blacklight_config end |
Instance Attribute Details
#blacklight_config ⇒ Object (readonly)
Returns the value of attribute blacklight_config.
9 10 11 |
# File 'app/components/blacklight/search_navbar_component.rb', line 9 def blacklight_config @blacklight_config end |
Instance Method Details
#search_bar ⇒ Object
13 14 15 |
# File 'app/components/blacklight/search_navbar_component.rb', line 13 def render end |
#search_bar_component ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'app/components/blacklight/search_navbar_component.rb', line 17 def .new( url: helpers.search_action_url, advanced_search_url: helpers.search_action_url(action: 'advanced_search'), params: helpers.search_state.params_for_search.except(:qt), autocomplete_path: suggest_index_catalog_path ) end |
#search_bar_component_class ⇒ Object
26 27 28 |
# File 'app/components/blacklight/search_navbar_component.rb', line 26 def view_config&. || Blacklight::SearchBarComponent end |
#view_config ⇒ Object
30 31 32 |
# File 'app/components/blacklight/search_navbar_component.rb', line 30 def view_config blacklight_config&.view_config(helpers.document_index_view_type) end |