Sha256: 2c18c829258be3424c140930c6483094399631e221e29b64022339df7d39da30
Contents?: true
Size: 1.17 KB
Versions: 15
Compression:
Stored size: 1.17 KB
Contents
module Europeana module Blacklight ## # Blacklight document presenter for Europeana documents class DocumentPresenter < ::Blacklight::DocumentPresenter include ActionView::Helpers::AssetTagHelper # ? def render_document_show_field_value(field, options = {}) render_nested_field_value(field, :show, options) end def render_index_field_value(field, options = {}) render_nested_field_value(field, :index, options) end def render_nested_field_value(field, context, options = {}) key = @document.nested_field_key(field) container = @document.nested_field_container(field) field_config = @configuration.send(:"#{context}_fields")[key] value = options[:value] || begin [container].flatten.compact.collect do |target| presenter = self.class.new(target, @controller, @configuration) presenter.get_field_values(key, field_config, options) end.compact.flatten end render_field_value(value, field_config) end def get_field_values(field, field_config, options = {}) @document.localize_lang_map(super) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems