Class: Blacklight::Hierarchy::SelectedQfacetValueComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Blacklight::Hierarchy::SelectedQfacetValueComponent
- Defined in:
- app/components/blacklight/hierarchy/selected_qfacet_value_component.rb
Overview
Standard display of a SELECTED facet value, no link, special span with class, and ‘remove’ button.
Instance Attribute Summary collapse
-
#field_name ⇒ Object
readonly
Returns the value of attribute field_name.
-
#item ⇒ Object
readonly
Returns the value of attribute item.
Instance Method Summary collapse
-
#initialize(field_name:, item:) ⇒ SelectedQfacetValueComponent
constructor
A new instance of SelectedQfacetValueComponent.
- #remove_href ⇒ Object
Constructor Details
#initialize(field_name:, item:) ⇒ SelectedQfacetValueComponent
Returns a new instance of SelectedQfacetValueComponent.
7 8 9 10 |
# File 'app/components/blacklight/hierarchy/selected_qfacet_value_component.rb', line 7 def initialize(field_name:, item:) @field_name = field_name @item = item end |
Instance Attribute Details
#field_name ⇒ Object (readonly)
Returns the value of attribute field_name.
12 13 14 |
# File 'app/components/blacklight/hierarchy/selected_qfacet_value_component.rb', line 12 def field_name @field_name end |
#item ⇒ Object (readonly)
Returns the value of attribute item.
12 13 14 |
# File 'app/components/blacklight/hierarchy/selected_qfacet_value_component.rb', line 12 def item @item end |
Instance Method Details
#remove_href ⇒ Object
14 15 16 |
# File 'app/components/blacklight/hierarchy/selected_qfacet_value_component.rb', line 14 def remove_href helpers.search_action_path(helpers.search_state.remove_facet_params(field_name, item.qvalue)) end |