Sha256: 5c29d2fad6ab8edac3cbcb633b5ab1322d0a86a24c27b751e66063e4216bcda3
Contents?: true
Size: 895 Bytes
Versions: 53
Compression:
Stored size: 895 Bytes
Contents
# frozen_string_literal: true module Blacklight module Rendering class LinkToFacet < AbstractStep extend Deprecation def render return next_step(values) unless config.link_to_facet next_step(render_link) end private # This allows the link to wrap an itemprop def render_link values.map { |v| link(link_field, v) } end def link_field return config.key if config.link_to_facet == true config.link_to_facet end def link(field, v) context.link_to v, search_path(field, v) end def search_path(field, v) context.search_action_path(facet_params(field, v)) end def facet_params(field, v) Deprecation.silence(Blacklight::SearchState) do context.search_state.reset.add_facet_params(field, v) end end end end end
Version data entries
53 entries across 53 versions & 2 rubygems