Skip to content

Commit

Permalink
Merge pull request #33 from feature/update-submission-mdetamodel-2023
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Sep 5, 2023
1 parent a5f0c71 commit 472677a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions helpers/metadata_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,23 @@ def klass_metadata(klass, type)

# Get display from the metadata
if klass.attribute_settings(attr)[:display].nil?
attr_settings[:display] = "no"
attr_settings[:category] = "no"
else
attr_settings[:display] = klass.attribute_settings(attr)[:display]
attr_settings[:category] = klass.attribute_settings(attr)[:display]
end

if !klass.attribute_settings(attr)[:helpText].nil?
unless klass.attribute_settings(attr)[:helpText].nil?
attr_settings[:helpText] = klass.attribute_settings(attr)[:helpText]
end

unless klass.attribute_settings(attr)[:description].nil?
attr_settings[:description] = klass.attribute_settings(attr)[:description]
end

unless klass.attribute_settings(attr)[:example].nil?
attr_settings[:example] = klass.attribute_settings(attr)[:example]
end

attr_settings[:@context] = {
"@vocab" => "#{id_url_prefix}metadata/"
}
Expand Down

0 comments on commit 472677a

Please sign in to comment.