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
permalink #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.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/presenters/geoblacklight/document_presenter.rb', line 13 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 |