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