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.18.0rc6 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.18.0rc5 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.18.0rc4 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.18.0rc3 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.18.0rc2 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.18.0rc1 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.17.1 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.16.1 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.15.0 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.14.2 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.14.1 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.14.0 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.13.3 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.13.2 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.13.1 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.13.0 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.12.0 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.12.0.pre lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.10.0 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb
adiwg-mdtranslator-2.9.2 lib/adiwg/mdtranslator/writers/html/sections/html_releasability.rb