Sha256: 0cd6f4df395dc5260b8999b6a808ed025511eef48c6b9e765c04278ab5870ab9
Contents?: true
Size: 1.08 KB
Versions: 27
Compression:
Stored size: 1.08 KB
Contents
module CurationConcerns module ConfiguredMicrodata def microdata?(field) return false unless CurationConcerns.config.display_microdata key = "curation_concerns.schema_org.#{field}.property" t(key, default: false) end def microdata_object?(field) return false unless CurationConcerns.config.display_microdata key = "curation_concerns.schema_org.#{field}.type" t(key, default: false) end def microdata_object_attributes(field) if microdata_object?(field) { itemprop: microdata_property(field), itemscope: '', itemtype: microdata_type(field) } else {} end end def microdata_property(field) t("curation_concerns.schema_org.#{field}.property") end def microdata_type(field) t("curation_concerns.schema_org.#{field}.type") end def microdata_value_attributes(field) if microdata?(field) key = microdata_object?(field) ? :value : :property { itemprop: t("curation_concerns.schema_org.#{field}.#{key}") } else {} end end end end
Version data entries
27 entries across 27 versions & 1 rubygems