Class: Geoblacklight::DocumentPresenter
- Inherits:
-
Blacklight::IndexPresenter
- Object
- Blacklight::IndexPresenter
- Geoblacklight::DocumentPresenter
- Includes:
- ActionView::Helpers::OutputSafetyHelper
- Defined in:
- app/presenters/geoblacklight/document_presenter.rb
Overview
Adds custom functionality for Geoblacklight document presentation
Instance Method Summary collapse
-
#index_fields_display ⇒ String
Presents configured index fields in search results.
Instance Method Details
#index_fields_display ⇒ String
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.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/presenters/geoblacklight/document_presenter.rb', line 11 def index_fields_display fields_values = [] @configuration.index_fields.each do |field_name, _| val = field_value(field_name) unless val.blank? val += '.' unless val.end_with?('.') fields_values << val end end safe_join(fields_values, ' ') end |