Sha256: a5fe3e94beab1e86d4d5ebbfa5723dcfd4e1641be701349507057b0f2939c610
Contents?: true
Size: 792 Bytes
Versions: 17
Compression:
Stored size: 792 Bytes
Contents
# frozen_string_literal: true module Blacklight module Hierarchy class QfacetValueComponent < ::ViewComponent::Base def initialize(field_name:, item:, id: nil, suppress_link: false) @field_name = field_name @item = item @id = id @suppress_link = suppress_link end attr_reader :field_name, :item, :id, :suppress_link def path_for_facet facet_config = helpers.facet_configuration_for_field(field_name) Blacklight::FacetItemPresenter.new(item.qvalue, facet_config, helpers, field_name).href end def render_facet_count classes = "facet-count" content_tag("span", t('blacklight.search.facets.count', number: number_with_delimiter(item.hits)), class: classes) end end end end
Version data entries
17 entries across 17 versions & 1 rubygems