lib/adiwg/mdtranslator/writers/html/sections/html_body.rb in adiwg-mdtranslator-2.7.0 vs lib/adiwg/mdtranslator/writers/html/sections/html_body.rb in adiwg-mdtranslator-2.8.0

- old
+ new

@@ -1,9 +1,10 @@ # HTML writer # html body # History: +# Stan Smith 2018-01-19 add resource citation title to report header # Stan Smith 2017-03-22 refactor for mdTranslator 2.0 # Stan Smith 2015-07-20 moved mdTranslator logo to html_inlineCss.css # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS # Stan Smith 2014-04-10 add open and close buttons # Stan Smith 2015-03-23 original script @@ -28,11 +29,11 @@ def initialize(html) @html = html end - def writeHtml(version,intObj) + def writeHtml(version, intObj) @html.body do # classes used metaInfoClass = Html_MetadataInfo.new(@html) contactClass = Html_Contact.new(@html) @@ -92,17 +93,26 @@ # report title # aShortVersion = version.split('.') # shortVersion = aShortVersion[0].to_s + '.' + aShortVersion[1].to_s @html.h1('mdTranslator ' + version + ' HTML Metadata Record', 'id' => 'mdtranslator-metadata-report') + # resource citation title + unless hResourceInfo.empty? + unless hResourceInfo[:citation].empty? + unless hResourceInfo[:citation][:title].nil? + @html.h2(hResourceInfo[:citation][:title]) + end + end + end + # report date @html.section(:class => 'block') do @html.em('Report Generated:') @html.text!(Time.new.inspect) end # metadata source - @html.h2('Metadata Source', 'id' => 'metadataSource') + @html.h3('Metadata Source', 'id' => 'metadataSource') @html.section(:class => 'block') do @html.em('Metadata schema:') @html.text!(hSchema[:name]) @html.br