Sha256: 608e6cedd177380db84ad784a9772836673b1ef82a7fe7dd37260828e788e0ea

Contents?: true

Size: 1.81 KB

Versions: 16

Compression:

Stored size: 1.81 KB

Contents

# HTML writer
# descriptive keywords

# History:
# 	Stan Smith 2015-03-23 original script
#   Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS

require_relative 'html_citation'

module ADIWG
    module Mdtranslator
        module Writers
            module Html

                class MdHtmlKeyword
                    def initialize(html)
                        @html = html
                    end

                    def writeHtml(hKeyList)

                        # classes used
                        htmlCitation = MdHtmlCitation.new(@html)

                        # descriptive keywords - type
                        s = hKeyList[:keywordType]
                        if !s.nil?
                            @html.text!(s)
                            @html.br
                        end

                        @html.section(:class=>'block') do

                            # descriptive keywords - keywords - required
                            @html.em('Keywords: ')
                            @html.ul do
                                hKeyList[:keyword].each do |keyword|
                                    @html.li(keyword)
                                end
                            end

                            # descriptive keywords - citation
                            hCitation = hKeyList[:keyTheCitation]
                            if !hCitation.empty?
                                @html.em('Thesaurus citation: ')
                                @html.br
                                @html.section(:class=>'block') do
                                    htmlCitation.writeHtml(hCitation)
                                end
                            end
                        end

                    end # writeHtml

                end # class

            end
        end
    end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
adiwg-mdtranslator-1.4.0 lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb
adiwg-mdtranslator-1.4.0.beta14 lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb
adiwg-mdtranslator-1.4.0.beta13 lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb
adiwg-mdtranslator-1.4.0.beta12 lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb
adiwg-mdtranslator-1.4.0.beta11 lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb
adiwg-mdtranslator-1.4.0.beta10 lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb
adiwg-mdtranslator-1.4.0.beta9 lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb
adiwg-mdtranslator-1.4.0.beta8 lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb
adiwg-mdtranslator-1.4.0.beta7 lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb
adiwg-mdtranslator-1.4.0.beta6 lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb
adiwg-mdtranslator-1.4.0.beta5 lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb
adiwg-mdtranslator-1.4.0.beta4 lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb
adiwg-mdtranslator-1.4.0.beta3 lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb
adiwg-mdtranslator-1.4.0.beta2 lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb
adiwg-mdtranslator-1.4.0.beta1 lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb
adiwg-mdtranslator-1.3.0 lib/adiwg/mdtranslator/writers/html/sections/html_keyword.rb