diff options
Diffstat (limited to 'lib/sisu/v0/manifest.rb')
-rw-r--r-- | lib/sisu/v0/manifest.rb | 104 |
1 files changed, 59 insertions, 45 deletions
diff --git a/lib/sisu/v0/manifest.rb b/lib/sisu/v0/manifest.rb index 0b7c7bfc..3fa189fd 100644 --- a/lib/sisu/v0/manifest.rb +++ b/lib/sisu/v0/manifest.rb @@ -170,7 +170,7 @@ module SiSU_Manifest end end def metadata(id,info) - @manifest[:html] << %{<tr><th class="left"><p class="bold">#{id}:</p></th><td><p class="left">#{info}</p></td></tr>\n} + @manifest[:html] << %{<tr><th class="left"><p class="bold_left">#{id}:</p></th><td><p class="left">#{info}</p></td></tr>\n} end def links(url,lnk,target) static=if url =~/^\.\//; url.gsub(/^\.(\.)?/,@base_url) @@ -319,8 +319,8 @@ module SiSU_Manifest end end def metadata_tests - if @md.dc_title - id,info=@translate.dc_title,@md.dc_title + if @md.full_title #dc + id,info=@translate.full_title,@md.full_title metadata(id,info) end if @md.title @@ -331,12 +331,12 @@ module SiSU_Manifest id,info=@translate.subtitle,@md.subtitle metadata(id,info) end - if @md.dc_creator - id,info=@translate.creator,@md.dc_creator + if @md.author #dc + id,info=@translate.author,@md.author metadata(id,info) end - if @md.dc_contributor - id,info=@translate.contributor,@md.dc_contributor + if @md.contributor #dc + id,info=@translate.contributor,@md.contributor metadata(id,info) end if @md.translator @@ -347,8 +347,8 @@ module SiSU_Manifest id,info=@translate.illustrator,@md.illustrator metadata(id,info) end - if @md.dc_publisher - id,info=@translate.publisher,@md.dc_publisher + if @md.publisher #dc + id,info=@translate.publisher,@md.publisher metadata(id,info) end if @md.prepared_by @@ -359,53 +359,53 @@ module SiSU_Manifest id,info=@translate.digitized_by,@md.digitized_by metadata(id,info) end - if @md.dc_subject - id,info=@translate.subject,@md.dc_subject + if @md.subject #dc + id,info=@translate.subject,@md.subject metadata(id,info) end - if @md.dc_description - id,info=@translate.dc_description,@md.dc_description + if @md.description #dc + id,info=@translate.description,@md.description metadata(id,info) end if @md.abstract id,info=@translate.abstract,@md.abstract metadata(id,info) end - if @md.dc_type - id,info=@translate.type,@md.dc_type + if @md.type #dc + id,info=@translate.type,@md.type metadata(id,info) end - if @md.dc_rights - id,info=@translate.rights,@md.dc_rights + if @md.rights #dc + id,info=@translate.rights,@md.rights metadata(id,info) end - if @md.dc_date - id,info=@translate.date,@md.dc_date + if @md.date #dc + id,info=@translate.date,@md.date metadata(id,info) end - if @md.dc_date_created - id,info=@translate.date_created,@md.dc_date_created + if @md.date_created #dc + id,info=@translate.date_created,@md.date_created metadata(id,info) end - if @md.dc_date_issued - id,info=@translate.date_issued,@md.dc_date_issued + if @md.date_issued #dc + id,info=@translate.date_issued,@md.date_issued metadata(id,info) end - if @md.dc_date_available - id,info=@translate.date_available,@md.dc_date_available + if @md.date_available #dc + id,info=@translate.date_available,@md.date_available metadata(id,info) end - if @md.dc_date_modified - id,info=@translate.date_modified,@md.dc_date_modified + if @md.date_modified #dc + id,info=@translate.date_modified,@md.date_modified metadata(id,info) end - if @md.dc_date_valid - id,info=@translate.date_valid,@md.dc_date_valid + if @md.date_valid #dc + id,info=@translate.date_valid,@md.date_valid metadata(id,info) end - if @md.dc_language \ - and @md.dc_language[:name] - id,info=@translate.language,@md.dc_language[:name] + if @md.language \ + and @md.language[:name] #dc + id,info=@translate.language,@md.language[:name] metadata(id,info) end if @md.language_original \ @@ -413,24 +413,24 @@ module SiSU_Manifest id,info=@translate.language_original,@md.language_original[:name] metadata(id,info) end - if @md.dc_format - id,info=@transate.format,@md.dc_format + if @md.format #dc + id,info=@transate.format,@md.format metadata(id,info) end - if @md.dc_identifier - id,info=@translate.identifier,@md.dc_identifier + if @md.identifier #dc + id,info=@translate.identifier,@md.identifier metadata(id,info) end - if @md.dc_source - id,info=@translate.source,@md.dc_source + if @md.source #dc + id,info=@translate.source,@md.source metadata(id,info) end - if @md.dc_relation - id,info=@translate.relation,@md.dc_relation + if @md.relation #dc + id,info=@translate.relation,@md.relation metadata(id,info) end - if @md.dc_coverage - id,info=@translate.coverage,@md.dc_coverage + if @md.coverage #dc + id,info=@translate.coverage,@md.coverage metadata(id,info) end if @md.keywords @@ -465,6 +465,20 @@ module SiSU_Manifest id,info=@translate.prefix_b,@md.prefix_b metadata(id,info) end + if @md.topic_register_array.length > 1 + @manifest[:html] << %{<tr><th class="left"><p class="bold_left">#{@translate.topic_register}:</p></th><td>\n} + @md.topic_register_array.each do |t| + t.each_with_index do |st,i| + if st.class == Array + st.each do |v| + @manifest[:html] << %{<p class="it#{i}">#{v}</p>\n} + end + else @manifest[:html] << %{<p class="it#{i}">#{st}</p>\n} + end + end + end + @manifest[:html] << %{</td></tr>\n} + end if @md.fns id,info=@translate.sourcefile,@md.fns metadata(id,info) @@ -544,7 +558,7 @@ WOK <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> -SiSU manifest: #{@md.title} +SiSU manifest: #{@md.full_title} </title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="sourcefile" content="#{@md.fns}" /> @@ -559,8 +573,8 @@ SiSU manifest: #{@md.title} </div> <div class="content"> <h1 class="small">#{@translate.manifest_description}</h1> -<h2 class="small">#{@md.dc_title}</h2> -<p class="bold">#{@md.dc_creator}</p> +<h2 class="small">#{@md.full_title}</h2> +<p class="bold">#{@md.author}</p> <p class="small"> <a href="#output">Document, Available Filetypes</a> </p> |