Class: Blacklight::SearchHistoryConstraintLayoutComponent

Inherits:
ConstraintLayoutComponent show all
Defined in:
app/components/blacklight/search_history_constraint_layout_component.rb

Overview

Override the regular constraint layout to remove any interactive features so this can be treated as quasi-plain text

Constant Summary

Constants inherited from Component

Component::EXCLUDE_VARIABLES

Instance Method Summary collapse

Methods inherited from ConstraintLayoutComponent

#initialize, #remove_aria_label, #render?

Methods inherited from Component

compiler, config, #inspect

Constructor Details

This class inherits a constructor from Blacklight::ConstraintLayoutComponent

Instance Method Details

#callObject



7
8
9
10
11
12
# File 'app/components/blacklight/search_history_constraint_layout_component.rb', line 7

def call
  label = tag.span(t('blacklight.search.filters.label', label: @label), class: 'filter-name') if @label.present?
  value = tag.span(@value, class: 'filter-values')

  tag.span(safe_join([label, value].compact), class: 'constraint')
end