Class: Geoblacklight::DocumentPresenter

Inherits:
Blacklight::IndexPresenter
  • Object
show all
Includes:
ActionView::Helpers::OutputSafetyHelper
Defined in:
app/presenters/geoblacklight/document_presenter.rb

Overview

Adds custom functionality for Geoblacklight document presentation

Instance Method Summary collapse

Instance Method Details

#index_fields_displayString

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.

Returns:

  • (String)


12
13
14
15
16
17
18
19
20
21
22
# File 'app/presenters/geoblacklight/document_presenter.rb', line 12

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