aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/manifest.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/manifest.rb')
-rw-r--r--lib/sisu/v0/manifest.rb54
1 files changed, 40 insertions, 14 deletions
diff --git a/lib/sisu/v0/manifest.rb b/lib/sisu/v0/manifest.rb
index 6bdfdae4..78045e80 100644
--- a/lib/sisu/v0/manifest.rb
+++ b/lib/sisu/v0/manifest.rb
@@ -60,13 +60,22 @@
=end
module SiSU_Manifest
require "#{SiSU_lib}/sysenv"
- require "#{SiSU_lib}/i18n"
include SiSU_Env
+ require "#{SiSU_lib}/i18n"
+ require "#{SiSU_lib}/particulars"
+ include SiSU_Particulars
+ require "#{SiSU_lib}/html_minitoc"
+ #require "#{SiSU_lib}/html_format"
+ require "#{SiSU_lib}/html"
+ include SiSU_HTML_Format
+ require "#{SiSU_lib}/param"
include SiSU_Param
include SiSU_Viz
class Source
def initialize(opt)
@opt=opt
+ @particulars=SiSU_Particulars::Combined_singleton.instance.get_all(opt)
+ @data=SiSU_HTML::Source::Html_environment.new(@particulars).tuned_file_instructions
l=SiSU_Env::Standardise_language.new.file_to_language(@opt.fns)
@doc_language=l[:l]
end
@@ -83,16 +92,16 @@ module SiSU_Manifest
tell.green_hi_blue unless @opt.cmd =~/q/
tell=SiSU_Screen::Ansi.new(@opt.cmd,"#{browser} #{url_html}")
tell.grey_tab if @opt.cmd =~/v/i
- Output_Info.new(@md).check_output
+ Output_Info.new(@md,@data).check_output
rescue; SiSU_Errors::Info_error.new($!,$@,@opt.cmd,@opt.fns).error
ensure
end
end
private
class Output_Info <Source
- def initialize(md)
+ def initialize(md,data)
@manifest={ :txt=>[],:html=>[] }
- @md,@fns=md
+ @md,@fns,@data=md,md.fns,data
@env=SiSU_Env::Info_env.new(@md.fns)
@fnb=@md.fnb
@base_url,@base_url_src,@base_url_pod="#{@env.url.root}/#@fnb","#{@env.url.src_txt}","#{@env.url.src_pod}"
@@ -111,7 +120,7 @@ module SiSU_Manifest
manifest << x
end
end
- def summarize(id,file,img='')
+ def summarize(id,file,img='● ')
size=(File.size("#{@base_path}/#{file}")/1024.00).to_s
kb=/([0-9]+\.[0-9]{0,1})/m.match(size)[1]
@manifest[:txt] << "#{file} #{id} #{kb}\n"
@@ -169,7 +178,7 @@ module SiSU_Manifest
elsif url =~/^\.\.\//; url.gsub(/^\.(\.)?/,@env.url.root)
else url
end
- @manifest[:html] << %{<tr><th class="left"><p class="norm"><a href="#{url}">#{lnk}</a></p><p class="tiny">&nbsp;&nbsp;#{@url_brace.xml_open}<a href="#{static}">#{static}</a>#{@url_brace.xml_close}</p></th></tr>\n}
+ @manifest[:html] << %{<tr><th class="right" width=5%><p class="norm">●</p></th><td class="left"><p class="norm"><a href="#{url}">#{lnk}</a></p><p class="tiny">&nbsp;&nbsp;#{@url_brace.xml_open}<a href="#{static}">#{static}</a>#{@url_brace.xml_close}</p></td></tr>\n}
end
def output_tests
if FileTest.file?("#@base_path/#{@md.fn[:toc]}")==true
@@ -523,6 +532,7 @@ module SiSU_Manifest
end
def check_output
begin
+ minitoc=SiSU_HTML_minitoc::Toc_mini.new(@md,@data).songsheet
id,file='',''
vz=SiSU_Env::Get_init.instance.skin
banner_table=if vz.banner_home_button_only !~ /http:\/\/www\.jus\.uio\.no\/sisu/ \
@@ -555,16 +565,30 @@ SiSU manifest: #{@md.title}
</head>
<body bgcolor="#ffffff" text="#000000" link="#003090" lang="en" xml:lang="en">
#{banner_table}
-<h1 class="small">#{@md.dc_title}</h1>
+<div class="toc">
+#{minitoc.to_s}
+</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>
+<p class="small">
+&nbsp;&nbsp;<a href="#output">Document, Available Filetypes</a>
+</p>
+<p class="small">
+&nbsp;&nbsp;<a href="#metadata">Document Metadata</a>
+</p>
+<p class="tiny">
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#links">(metadata suggested links (if any)</a>
+</p>
<table summary="normal text css" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">
WOK
published_versions
@manifest[:html] << '</table>'
@manifest[:html] <<<<WOK
<h2 class="small"><a name="output">#{@translate.manifest_description_output}</a></h2>
-<table summary="normal text css" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">
-<tr> <th class="left"><p class="bold">#{@translate.description}</p></th><th class="left"><p class="bold">#{@translate.filename}</p></th><th class="right"><p class="right"><b>#{@translate.file_size}</b></p><p class="tiny_right">(kB)</p></th></tr>
+<table summary="available output/filetypes" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">
+<tr> <th class="left"><p class="bold">#{@translate.filetype_description}</p></th><th class="left"><p class="bold">#{@translate.filename}</p></th><th class="right"><p class="right"><b>#{@translate.file_size}</b></p><p class="tiny_right">(kB)</p></th></tr>
WOK
output_tests
@@ -576,7 +600,7 @@ WOK
@manifest[:html] << '</table>'
@manifest[:html] <<<<WOK
<h2 class="small"><a name="metadata">#{@translate.manifest_description_metadata}</a></h2>
-<table summary="normal text css" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">
+<table summary="document metadata" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">
<tr> <th class="left"><p class="bold">#{@translate.metadata}</p></th><th class="left"><p class="bold">#{@translate.description}</p></th></tr>
WOK
metadata_tests
@@ -584,8 +608,8 @@ WOK
</table>
WOK
@manifest[:html] <<<<WOK
-<table summary="normal text css" width="90%" border="0" bgcolor="white" cellpadding="2" align="center">
-<tr><th class="left"><p class="bold"><a name="links">#{@translate.suggested_links}:</a></p></th></tr>
+<p class="bold"><a name="links">#{@translate.suggested_links}:</a></p>
+<table summary="suggested links" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">
WOK
links_tests
@manifest[:html] <<<<WOK
@@ -593,15 +617,17 @@ WOK
WOK
@manifest[:html] <<<<WOK
<h2 class="small"><a name="languages">#{@translate.language_version_list}</a></h2>
-<table summary="normal text css" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">
+<table summary="language versions" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">
<tr> <th class="left"><p class="bold">#{@translate.filename}</p></th><th class="left"><p class="bold">#{@translate.description}</p></th><th class="right"><p class="right">&nbsp;</p></th></tr>
WOK
language_versions
@manifest[:html] <<<<WOK
</table>
-#{vz.credits_splash}
+</div>
+<div class="main_column">
#{vz.credits_sisu}
+</div>
</body>
</html>
WOK