lib/adiwg/mdtranslator/writers/html/sections/html_metadataInfo.rb in adiwg-mdtranslator-1.1.0 vs lib/adiwg/mdtranslator/writers/html/sections/html_metadataInfo.rb in adiwg-mdtranslator-1.1.1
- old
+ new
@@ -26,19 +26,25 @@
htmlResParty = $HtmlNS::MdHtmlResponsibleParty.new(@html)
htmlDateTime = $HtmlNS::MdHtmlDateTime.new(@html)
htmlResMaint = $HtmlNS::MdHtmlResourceMaintenance.new(@html)
# metadata identifier
- @html.details do
- @html.summary('Metadata Identifier', {'id'=>'metadata-identifier', 'class'=>'h3'})
- @html.section(:class=>'block') do
- @html.em('Identifier:')
- @html.text!(hMetaInfo[:metadataId][:identifier])
- @html.br
+ id = hMetaInfo[:metadataId][:identifier]
+ if id
+ @html.details do
+ @html.summary('Metadata Identifier', {'id'=>'metadata-identifier', 'class'=>'h3'})
+ @html.section(:class=>'block') do
+ @html.em('Identifier:')
+ @html.text!(id)
+ @html.br
- @html.em('Identifier type:')
- @html.text!(hMetaInfo[:metadataId][:identifierType])
- @html.br
+ type = hMetaInfo[:metadataId][:identifierType]
+ if type
+ @html.em('Identifier type:')
+ @html.text!(type)
+ @html.br
+ end
+ end
end
end
# metadata information
@html.details do