Sha256: 19225cb45a880c3898c81b8d60d3f3eb29c1cb91e222e1eb189739de3d0174a3

Contents?: true

Size: 833 Bytes

Versions: 20

Compression:

Stored size: 833 Bytes

Contents

# frozen_string_literal: true
module Geoblacklight
  ##
  # Adds custom functionality for Geoblacklight document presentation
  class DocumentPresenter < Blacklight::IndexPresenter
    include ActionView::Helpers::OutputSafetyHelper
    ##
    # Presents configured index fields in search results. Passes values through
    # configured helper_method. Multivalued fields separated by presenter
    # field_value_separator (default: comma). Fields separated by period.
    # @return [String]
    def index_fields_display
      fields_values = []
      @configuration.index_fields.each do |_field_name, field_config|
        val = field_value(field_config)
        if val.present?
          val += '.' unless val.end_with?('.')
          fields_values << val
        end
      end
      safe_join(fields_values, ' ')
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
geoblacklight-3.8.1 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-3.8.0 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-4.0.0 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-4.0.0.pre.rc3 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-3.7.0 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-4.0.0.pre.rc2 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-4.0.0.pre.rc1 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-3.6.0 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-3.5.0 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-4.0.0.pre.alpha.3 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-4.0.0.pre.alpha.2 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-4.0.0.pre.alpha.1 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-4.0.0.pre.alpha app/presenters/geoblacklight/document_presenter.rb
geoblacklight-3.4.0 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-3.3.1 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-3.3.0 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-3.2.0 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-3.1.0 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-3.0.1 app/presenters/geoblacklight/document_presenter.rb
geoblacklight-3.0.0 app/presenters/geoblacklight/document_presenter.rb