Sha256: b8c038748fe26ada3a59e6cc0693f3d18dbc9bbf6712ce00aee549e4e0bcd10b

Contents?: true

Size: 1.97 KB

Versions: 70

Compression:

Stored size: 1.97 KB

Contents

# HTML writer
# releasability

# History:
#  Stan Smith 2017-03-31 original script

require_relative 'html_responsibility'

module ADIWG
   module Mdtranslator
      module Writers
         module Html

            class Html_Releasability

               def initialize(html)
                  @html = html
               end

               def writeHtml(hRelease)

                  # classes used
                  responsibilityClass = Html_Responsibility.new(@html)

                  # releasability - dissemination constraint {restrictionCode}
                  hRelease[:disseminationConstraint].each do |restriction|
                     @html.em('Dissemination Constraint Code: ')
                     @html.text!(restriction)
                     @html.br
                  end

                  # releasability - statement
                  unless hRelease[:statement].nil?
                     @html.em('Statement: ')
                     @html.section(:class => 'block') do
                        @html.text!(hRelease[:statement])
                     end
                  end

                  # releasability - addressee [] {responsibility}
                  unless hRelease[:addressee].empty?
                     @html.details do
                        @html.summary('Applies to', {'class' => 'h5'})
                        @html.section(:class => 'block') do
                           hRelease[:addressee].each do |hAddressee|
                              @html.details do
                                 @html.summary(hAddressee[:roleName], 'class' => 'h5')
                                 @html.section(:class => 'block') do
                                    responsibilityClass.writeHtml(hAddressee)
                                 end
                              end
                           end
                        end
                     end
                  end

               end # writeHtml
            end # Html_Releasability

         end
      end
   end
end

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.19.0.pre.beta.31 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.30 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.29 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.28 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.27 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.26 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.13 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.12 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.11 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.10 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.9 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.8 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.19.0.pre.beta.7 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.18.4 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.18.2 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.18.1 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.18.0 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.18.0rc9 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.18.0rc8 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.18.0rc7 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb