Sha256: cdb5fbc80604055afa80f7c7b66fd1e8eefc561fab3d188e58e84b09be670a70

Contents?: true

Size: 531 Bytes

Versions: 34

Compression:

Stored size: 531 Bytes

Contents

module CurationConcerns
  module Renderers
    class FacetedAttributeRenderer < AttributeRenderer
      private

        def li_value(value)
          link_to(ERB::Util.h(value), search_path(value))
        end

        def search_path(value)
          Rails.application.routes.url_helpers.search_catalog_path(:"f[#{search_field}][]" => ERB::Util.h(value))
        end

        def search_field
          ERB::Util.h(Solrizer.solr_name(options.fetch(:search_field, field), :facetable, type: :string))
        end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
curation_concerns-1.3.2 app/renderers/curation_concerns/renderers/faceted_attribute_renderer.rb
curation_concerns-1.3.1 app/renderers/curation_concerns/renderers/faceted_attribute_renderer.rb
curation_concerns-1.3.0 app/renderers/curation_concerns/renderers/faceted_attribute_renderer.rb
curation_concerns-1.2.0 app/renderers/curation_concerns/renderers/faceted_attribute_renderer.rb
curation_concerns-1.1.2 app/renderers/curation_concerns/renderers/faceted_attribute_renderer.rb
curation_concerns-1.1.1 app/renderers/curation_concerns/renderers/faceted_attribute_renderer.rb
curation_concerns-1.1.0 app/renderers/curation_concerns/renderers/faceted_attribute_renderer.rb
curation_concerns-1.0.0 app/renderers/curation_concerns/renderers/faceted_attribute_renderer.rb
curation_concerns-1.0.0.beta10 app/renderers/curation_concerns/renderers/faceted_attribute_renderer.rb
curation_concerns-1.0.0.beta9 app/renderers/curation_concerns/renderers/faceted_attribute_renderer.rb
curation_concerns-1.0.0.beta8 app/renderers/curation_concerns/renderers/faceted_attribute_renderer.rb
curation_concerns-1.0.0.beta7 app/renderers/curation_concerns/renderers/faceted_attribute_renderer.rb
curation_concerns-1.0.0.beta6 app/renderers/curation_concerns/renderers/faceted_attribute_renderer.rb
curation_concerns-1.0.0.beta5 app/renderers/curation_concerns/renderers/faceted_attribute_renderer.rb