Sha256: f973048ee25f55addfec81d18ffc9cbc1322add2756d8643734949dc60603b3a

Contents?: true

Size: 509 Bytes

Versions: 17

Compression:

Stored size: 509 Bytes

Contents

# frozen_string_literal: true

module Blacklight
  class MetadataFieldPlainTextLayoutComponent < Blacklight::MetadataFieldLayoutComponent
    with_collection_parameter :field

    def initialize(field:, **kwargs)
      super(field: field, **kwargs, value_tag: nil)
    end

    # rubocop:disable Rails/OutputSafety
    def call
      [label.to_s.strip, helpers.strip_tags(CGI.unescape_html(safe_join(values, "\n")).strip)].compact.join(' ').html_safe
    end
    # rubocop:enable Rails/OutputSafety
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
blacklight-8.6.1 app/components/blacklight/metadata_field_plain_text_layout_component.rb
blacklight-8.6.0 app/components/blacklight/metadata_field_plain_text_layout_component.rb
blacklight-8.5.1 app/components/blacklight/metadata_field_plain_text_layout_component.rb
blacklight-8.5.0 app/components/blacklight/metadata_field_plain_text_layout_component.rb
blacklight-8.4.0 app/components/blacklight/metadata_field_plain_text_layout_component.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/app/components/blacklight/metadata_field_plain_text_layout_component.rb
blacklight-8.3.0 app/components/blacklight/metadata_field_plain_text_layout_component.rb
blacklight-8.2.2 app/components/blacklight/metadata_field_plain_text_layout_component.rb
blacklight-8.2.1 app/components/blacklight/metadata_field_plain_text_layout_component.rb
blacklight-8.2.0 app/components/blacklight/metadata_field_plain_text_layout_component.rb
blacklight-8.1.0 app/components/blacklight/metadata_field_plain_text_layout_component.rb
blacklight-8.0.1 app/components/blacklight/metadata_field_plain_text_layout_component.rb
blacklight-8.0.0 app/components/blacklight/metadata_field_plain_text_layout_component.rb
blacklight-8.0.0.beta8 app/components/blacklight/metadata_field_plain_text_layout_component.rb
blacklight-8.0.0.beta7 app/components/blacklight/metadata_field_plain_text_layout_component.rb
blacklight-8.0.0.beta6 app/components/blacklight/metadata_field_plain_text_layout_component.rb
blacklight-8.0.0.beta5 app/components/blacklight/metadata_field_plain_text_layout_component.rb