Sha256: 54d9fab6fbefe2f41bf4612184e2b3be3e060570936e10cae481a43ba4ce815c
Contents?: true
Size: 995 Bytes
Versions: 21
Compression:
Stored size: 995 Bytes
Contents
# frozen_string_literal: true module Blacklight class ClausePresenter attr_reader :key, :user_parameters, :field_config, :view_context, :search_state def initialize(key, user_parameters, field_config, view_context, search_state = view_context.search_state) @key = key @user_parameters = user_parameters @field_config = field_config @view_context = view_context @search_state = search_state end def field_label field_config.display_label('search') end ## # Get the displayable version of a facet's value # # @return [String] def label user_parameters[:query] end def constraint_label label end def remove_href(path = search_state) view_context.search_action_path(path.reset_search(clause: path.clause_params.except(key))) end private def facet_field_presenter @facet_field_presenter ||= view_context.facet_field_presenter(facet_config, {}) end end end
Version data entries
21 entries across 21 versions & 2 rubygems