Sha256: 6db737dc9e3c68e80b54174483e4a49d0a71a7459998c3b0150dada2738cf21c
Contents?: true
Size: 901 Bytes
Versions: 4
Compression:
Stored size: 901 Bytes
Contents
class ModsDisplay::Cartographics < ModsDisplay::Field def fields return nil if @values.nil? return_fields = [] @values.each do |value| if value.respond_to?(:cartographics) value.cartographics.each do |field| scale = field.scale.empty? ? "Scale not given" : field.scale.text projection = field.projection.empty? ? nil : field.projection.text coordinates = field.coordinates.empty? ? nil : field.coordinates.text post_scale = [projection, coordinates].compact.length > 0 ? [projection, coordinates].compact.join(" ") : nil return_fields << ModsDisplay::Values.new({:label => (displayLabel(field) || label || I18n.t('mods_display.map_data')), :values => [[scale, post_scale].compact.join(" ; ")]}) end end end collapse_fields(return_fields) end end
Version data entries
4 entries across 4 versions & 1 rubygems