Sha256: 06a06511e7026cb4bae737fe5d59ed47ec1c6d7288bd68e7d61bbdb922627288

Contents?: true

Size: 1.57 KB

Versions: 62

Compression:

Stored size: 1.57 KB

Contents

# HTML writer
# metadata repository

# History:
#  Stan Smith 2017-06-06 added metadata repository citation
#  Stan Smith 2017-04-05 original script

require_relative 'html_citation'

module ADIWG
   module Mdtranslator
      module Writers
         module Html

            class Html_Repository

               def initialize(html)
                  @html = html
               end

               def writeHtml(hRepository)

                  # classes used
                  citationClass = Html_Citation.new(@html)

                  # metadata repository - repository
                  unless hRepository[:repository].nil?
                     @html.em('Repository Name: ')
                     @html.text!(hRepository[:repository])
                     @html.br
                  end

                  # metadata repository - metadata standard
                  unless hRepository[:metadataStandard].nil?
                     @html.em('Metadata Standard: ')
                     @html.text!(hRepository[:metadataStandard])
                     @html.br
                  end

                  # metadata repository - citation
                  unless hRepository[:citation].empty?
                     @html.details do
                        @html.summary('Citation', {'class' => 'h5'})
                        @html.section(:class => 'block') do
                           citationClass.writeHtml(hRepository[:citation])
                        end
                     end
                  end

               end # writeHtml
            end # Html_Repository

         end
      end
   end
end

Version data entries

62 entries across 62 versions & 1 rubygems

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