Sha256: 2437e9c39c249b45a660fd0ec9a7f66267f6dec89c50abf2a6613fd91c4d81eb

Contents?: true

Size: 487 Bytes

Versions: 27

Compression:

Stored size: 487 Bytes

Contents

module Hyrax
  module Renderers
    class LinkedAttributeRenderer < 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(
            search_field: search_field, q: ERB::Util.h(value)
          )
        end

        def search_field
          options.fetch(:search_field, field)
        end
    end
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
hyrax-1.1.1 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.0.3 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.1.0.rc3 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.1.0.rc2 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.1.0.rc1 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-1.1.0 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.1.0.beta2 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.0.2 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.1.0.beta1 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.0.1 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.0.0 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.0.0.rc3 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.0.0.rc2 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.0.0.rc1 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-1.0.5 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.0.0.beta5 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.0.0.beta4 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.0.0.beta3 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.0.0.beta2 app/renderers/hyrax/renderers/linked_attribute_renderer.rb
hyrax-2.0.0.beta1 app/renderers/hyrax/renderers/linked_attribute_renderer.rb