lib/adiwg/mdtranslator/writers/html/sections/html_allocation.rb in adiwg-mdtranslator-2.10.0 vs lib/adiwg/mdtranslator/writers/html/sections/html_allocation.rb in adiwg-mdtranslator-2.12.0.pre
- old
+ new
@@ -3,10 +3,11 @@
# History:
# Stan Smith 2017-08-31 refactored for mdJson 2.3 schema update
# Stan Smith 2017-04-04 original script
+require_relative 'html_responsibility'
require_relative 'html_onlineResource'
module ADIWG
module Mdtranslator
module Writers
@@ -19,10 +20,11 @@
end
def writeHtml(hAllocation)
# classes used
+ responsibilityClass = Html_Responsibility.new(@html)
onlineClass = Html_OnlineResource.new(@html)
# allocation - id
unless hAllocation[:id].nil?
@html.em('Source Allocation ID: ')
@@ -73,10 +75,20 @@
@html.em('Matching Funds Provided: ')
@html.text!(hAllocation[:matching].to_s)
@html.br
end
- # allocation - online resource []
+ # allocation - responsible parties [] {responsibleParty}
+ hAllocation[:responsibleParties].each do |hResponsibility|
+ @html.details do
+ @html.summary(hResponsibility[:roleName], 'class' => 'h5')
+ @html.section(:class => 'block') do
+ responsibilityClass.writeHtml(hResponsibility)
+ end
+ end
+ end
+
+ # allocation - online resource [] {onlineResource}
hAllocation[:onlineResources].each do |hOnline|
@html.details do
@html.summary('Online Resource', {'class' => 'h5'})
@html.section(:class => 'block') do
onlineClass.writeHtml(hOnline)