Sha256: dcc861465f09ccbd612e9f878df544723aa9e406ea0b2bd7b0bd2d0071a6e5f8

Contents?: true

Size: 1.4 KB

Versions: 15

Compression:

Stored size: 1.4 KB

Contents

# HTML writer
# funding

# History:
#  Stan Smith 2017-04-04 original script

require_relative 'html_allocation'
require_relative 'html_temporalExtent'

module ADIWG
   module Mdtranslator
      module Writers
         module Html

            class Html_Funding

               def initialize(html)
                  @html = html
               end

               def writeHtml(hFunding)

                  # classes used
                  allocationClass = Html_Allocation.new(@html)
                  temporalClass = Html_TemporalExtent.new(@html)

                  # funding - timePeriod {timePeriod}
                  unless hFunding[:timePeriod].empty?
                     temporalObj = {}
                     temporalObj[:timeInstant] = {}
                     temporalObj[:timePeriod] = hFunding[:timePeriod]
                     temporalClass.writeHtml(temporalObj)
                  end

                  # funding - allocations [] {allocation}
                  hFunding[:allocations].each do |hAllocation|
                     @html.details do
                        @html.summary('Allocation', {'class' => 'h5'})
                        @html.section(:class => 'block') do
                           allocationClass.writeHtml(hAllocation)
                        end
                     end
                  end

               end # writeHtml
            end # Html_Funding

         end
      end
   end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.1.2 lib/adiwg/mdtranslator/writers/html/sections/html_funding.rb
adiwg-mdtranslator-2.1.1 lib/adiwg/mdtranslator/writers/html/sections/html_funding.rb
adiwg-mdtranslator-2.1.0 lib/adiwg/mdtranslator/writers/html/sections/html_funding.rb
adiwg-mdtranslator-2.0.0 lib/adiwg/mdtranslator/writers/html/sections/html_funding.rb
adiwg-mdtranslator-2.0.0rc13 lib/adiwg/mdtranslator/writers/html/sections/html_funding.rb
adiwg-mdtranslator-2.0.0rc11 lib/adiwg/mdtranslator/writers/html/sections/html_funding.rb
adiwg-mdtranslator-2.0.0rc10 lib/adiwg/mdtranslator/writers/html/sections/html_funding.rb
adiwg-mdtranslator-2.0.0rc9 lib/adiwg/mdtranslator/writers/html/sections/html_funding.rb
adiwg-mdtranslator-2.0.0rc8 lib/adiwg/mdtranslator/writers/html/sections/html_funding.rb
adiwg-mdtranslator-2.0.0rc7 lib/adiwg/mdtranslator/writers/html/sections/html_funding.rb
adiwg-mdtranslator-2.0.0rc6 lib/adiwg/mdtranslator/writers/html/sections/html_funding.rb
adiwg-mdtranslator-2.0.0rc5 lib/adiwg/mdtranslator/writers/html/sections/html_funding.rb
adiwg-mdtranslator-2.0.0rc4 lib/adiwg/mdtranslator/writers/html/sections/html_funding.rb
adiwg-mdtranslator-2.0.0rc3 lib/adiwg/mdtranslator/writers/html/sections/html_funding.rb
adiwg-mdtranslator-2.0.0rc2 lib/adiwg/mdtranslator/writers/html/sections/html_funding.rb