aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-12-04 12:43:58 -0500
committerRalph Amissah <ralph@amissah.com>2010-12-04 12:44:01 -0500
commit74f7e0adab199936fd943b535f40359b08d40324 (patch)
tree3fe98437287bbb4a0c27b05f026586a81900373a
parenthtml, link to "document manifest" remains (individual output links removed) (diff)
html, link to "document manifest" & search form reviewed (testing required)
-rw-r--r--CHANGELOG_v22
-rw-r--r--data/doc/sisu/v2/CHANGELOG2
-rw-r--r--data/sisu/v2/v/version.yml4
-rw-r--r--lib/sisu/v2/html.rb4
-rw-r--r--lib/sisu/v2/html_format.rb175
-rw-r--r--lib/sisu/v2/sysenv.rb30
6 files changed, 123 insertions, 94 deletions
diff --git a/CHANGELOG_v2 b/CHANGELOG_v2
index ad6734a7..38a8978e 100644
--- a/CHANGELOG_v2
+++ b/CHANGELOG_v2
@@ -12,7 +12,7 @@ Reverse Chronological:
%% Development branch UNSTABLE
-%% 2.7.9.orig.tar.gz (2010-12-03:48/5)
+%% 2.7.9.orig.tar.gz (2010-12-04:48/6)
http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.9.orig.tar.gz
sisu_2.7.9.orig.tar.gz
sisu_2.7.9-1.dsc
diff --git a/data/doc/sisu/v2/CHANGELOG b/data/doc/sisu/v2/CHANGELOG
index 87c6cfb8..b87917d2 100644
--- a/data/doc/sisu/v2/CHANGELOG
+++ b/data/doc/sisu/v2/CHANGELOG
@@ -12,7 +12,7 @@ Reverse Chronological:
%% Development branch UNSTABLE
-%% 2.7.9.orig.tar.gz (2010-12-03:48/5)
+%% 2.7.9.orig.tar.gz (2010-12-04:48/6)
http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.9.orig.tar.gz
sisu_2.7.9.orig.tar.gz
sisu_2.7.9-1.dsc
diff --git a/data/sisu/v2/v/version.yml b/data/sisu/v2/v/version.yml
index 339fa8ec..ae204687 100644
--- a/data/sisu/v2/v/version.yml
+++ b/data/sisu/v2/v/version.yml
@@ -1,5 +1,5 @@
---
:version: 2.7.9
-:date_stamp: 2010w48/5
-:date: "2010-12-03"
+:date_stamp: 2010w48/6
+:date: "2010-12-04"
:project: SiSU
diff --git a/lib/sisu/v2/html.rb b/lib/sisu/v2/html.rb
index c984a858..ba2afabc 100644
--- a/lib/sisu/v2/html.rb
+++ b/lib/sisu/v2/html.rb
@@ -529,9 +529,7 @@ WOK
prefix_b=format_head_toc.notes.prefix_b
prefix_b=SiSU_HTML_Tune::Clean_html.new(prefix_b).clean
end
- @seg_toc_band=format_head_toc.seg_head_navigation_band('pdf') #bug, vary depending on type of doc !! examine
- @seg_toc_band_bottom=format_head_toc.seg_head_navigation_band_bottom('pdf') #bug, vary depending on type of doc !! examine
- @segtoc << @seg_toc_band
+ @segtoc << format_head_toc.seg_head_navigation_band
toc_shared << format_head_toc.scroll_head_title_banner_open
@segtoc << format_head_toc.seg_head_title_banner_open
tmp_head=nil
diff --git a/lib/sisu/v2/html_format.rb b/lib/sisu/v2/html_format.rb
index 66f9bc05..06d6d352 100644
--- a/lib/sisu/v2/html_format.rb
+++ b/lib/sisu/v2/html_format.rb
@@ -108,7 +108,17 @@ module SiSU_HTML_Format
@seg_name_html_tracker=(SiSU_HTML::Source::Seg.new.seg_name_html_tracker || [])
@index='index'
@metalink='#metadata'
- @tocband_scroll,@tocband_segtoc=nil,nil
+ end
+ def doc_types #used in toc & seg_nav_band
+ scroll=seg=''
+ wgt=Widget.new(@md)
+ %{
+<table summary="segment navigation available documents types: toc,doc,pdf,concordance" border="0" cellpadding="3" cellspacing="0">
+<tr>
+<td align="center" bgcolor=#{@vz.color_band2}>
+ #{wgt.manifest}
+ #{wgt.search}
+</tr></table>}
end
def rdf
SiSU_XML_tags::RDF.new(md)
@@ -145,13 +155,29 @@ module SiSU_HTML_Format
@cf_defaults=SiSU_Env::Info_processing_flag.new
end
def home
- ''
+ %{<td align="center" bgcolor=#{@vz.color_band2}>
+ <a href="../index.html" target="_top">
+ #{@vz.nav_txt_homepage}</a>
+</td>
+}
end
def scroll(text)
- ''
+ if @md.fns =~ /\.(?:-|ssm\.)?sst$/
+ scroll=%{<td align="center" bgcolor=#{@vz.color_band2}>
+ <a href="#{@md.fn[:doc]}" target="_top" #{@vz.js_doc}>
+ #{text}
+ </a>
+</td>
+}
+ end
end
def seg(text)
- ''
+ %{<td align="center" bgcolor="#99CC66">
+ <a href="#{@md.fn[:toc]}" target="_top" #{@vz.js_doc}>
+ #{text}
+ </a>
+</td>
+}
end
def search
env=SiSU_Env::Info_env.new(@md.fns,@md)
@@ -164,20 +190,67 @@ module SiSU_HTML_Format
</a>
</td>}
end
- def pdf
- ''
+ def pdf #retired 2.7.9
+ pdf=if @md.programs[:pdf] \
+ and @cf_defaults.cf_0 =~/p/
+ %{
+<td align="center" bgcolor=#{@vz.color_band2}>
+ <a href="#{@md.fn[:pdf_p]}" target="_top" #{@vz.js_portrait}>
+ #{@vz.nav_txt_pdf_portrait}
+ </a>
+</td>
+<td align="center" bgcolor=#{@vz.color_band2}>
+ <a href="#{@md.fn[:pdf_l]}" target="_top" #{@vz.js_landscape}>
+ #{@vz.nav_txt_pdf_landscape}
+ </a>
+</td>
+}
+ else ''
+ end
end
- def txt
- ''
+ def txt #retired 2.7.9
+ txt=if @cf_defaults.cf_0 =~/[at]/
+ %{
+<td valign=bottom bgcolor=#{@vz.color_band2}>
+ <a href="#{@md.fn[:plain]}" target="_top" #{@vz.js_plaintext}>
+ #{@vz.nav_txt_plaintext}
+ </a>
+</td>}
+ else ''
+ end
end
- def epub
- ''
+ def epub #retired 2.7.9
+ epub=if @cf_defaults.cf_0 =~/e/
+ %{
+<td align="center" bgcolor=#{@vz.color_band2}>
+ <a href="../epub/#{@md.fn[:epub]}" target="_top" #{@vz.js_epub}>
+ #{@vz.nav_txt_epub}
+ </a>
+</td>}
+ else ''
+ end
end
- def odf
- ''
+ def odf #retired 2.7.9
+ odf=if @cf_defaults.cf_0 =~/o/
+ %{
+<td align="center" bgcolor=#{@vz.color_band2}>
+ <a href="#{@md.fn[:odf]}" target="_top" #{@vz.js_odf}>
+ #{@vz.nav_txt_odf}
+ </a>
+</td>}
+ else ''
+ end
end
- def concordance(text)
- ''
+ def concordance(text) #retired 2.7.9
+ if @md.concord_make \
+ and @md.wc_words < 300000 #max word count for display of concordance here as would now be a large file
+ %{<td align="center" bgcolor=#{@vz.color_band2}>
+ <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
+ #{text}
+ </a>
+ </td>}
+ else ''
+ end
end
end
class XML
@@ -186,7 +259,6 @@ module SiSU_HTML_Format
def initialize(md)
super(md)
@md=md
- @tocband_scroll,@tocband_segtoc=make_scroll,make_seg
end
def scroll_head_navigation_band
pdf=if @md.programs[:pdf]
@@ -207,16 +279,10 @@ WOK
<p />}
end
def concordance_navigation_band(type='')
- if type=~/pdf/
- @tocband_concordance=make_concordance
- end
%{<table summary="concordance navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
<tr><td width="20%">
#{@vz.banner_band}
</td>
-<td width="60%" align="center">
- #{@tocband_concordance}
-</td>
<td width="20%" align="right">
&nbsp;<a href="index.html" target="_top" alt="-&gt;">
#{@vz.png_nav_toc}
@@ -225,6 +291,22 @@ WOK
<p />}
end
def seg_head_navigation_band(type='')
+ firstseg=%{<a href="#{@md.fnl[:pre]}#{@md.firstseg}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" target="_top" alt="-&gt;">
+ #{@vz.png_nav_nxt}
+ </a>} if @md.firstseg =~/\S+/
+ %{<table summary="table of contents segment navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
+<tr><td width="20%">
+ #{@vz.banner_band}
+</td>
+<td width="20%">
+ #{doc_types}
+</td>
+<td width="5%" align="right">
+ &nbsp;#{firstseg}&nbsp;
+#{@vz.table_close}
+<p />}
+ end
+ def seg_head_navigation_band_bottom(type='') #retired 2.7.9
if type=~/pdf/
@tocband_segtoc=make_scroll_seg_pdf
end
@@ -233,7 +315,7 @@ WOK
</a>} if @md.firstseg =~/\S+/
%{<table summary="table of contents segment navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
<tr><td width="20%">
- #{@vz.banner_band}
+ &nbsp;
</td>
<td width="75%" align="center">
#{@tocband_segtoc}
@@ -243,16 +325,20 @@ WOK
#{@vz.table_close}
<p />}
end
- def seg_head_navigation_band_bottom(type='')
- ''
- end
def manifest_link(text)
%{<font size=2>
<a href="#{@md.fn[:manifest]}" target="_top" #{@vz.js_manifest}>#{text}</a>
</font>}
end
- def concordance_link(text)
- ''
+ def concordance_link(text) #retired 2.7.9
+ if @md.concord_make
+ %{<font size=2>
+ <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
+ #{text}
+ </a>
+ </font>}
+ else ''
+ end
end
def make_seg_scroll_pdf
wgt=Widget.new(@md)
@@ -467,11 +553,6 @@ WOK
<table summary="toc segment tail" bgcolor=#{@vz.color_band1}>
<tr><td width="20%">
#{@vz.banner_band}
-</td>
-<td width="60%">
- <center>
- #{@tocband_segtoc}
- </center>
</td></tr>
</table>
<p>&nbsp;</p>
@@ -636,36 +717,6 @@ WOK
else ''
end
end
- def doc_types #used in seg_nav_band ###
- scroll=seg=''
- wgt=Widget.new(@md)
- x=if @md.concord_make
- %{
-<table summary="segment navigation available documents types: toc,doc,pdf,concordance" border="0" cellpadding="3" cellspacing="0">
-<tr>
- #{wgt.seg(@vz.nav_txt_toc_link)}
- #{wgt.scroll(@vz.nav_txt_doc_link)}
- #{wgt.txt}#{wgt.epub}#{wgt.pdf}#{wgt.odf}
-<td align="center" bgcolor=#{@vz.color_band2}>
- #{wgt.concordance(@vz.nav_txt_concordance)}
- #{wgt.manifest}
- #{wgt.search}
- #{wgt.home}
-</tr></table>}
- else
- %{
-<table summary="segment navigation available documents types: toc,doc,pdf,concordance" border="0" cellpadding="3" cellspacing="0">
-<tr>
- #{wgt.seg(@vz.nav_txt_toc_link)}
- #{wgt.scroll(@vz.nav_txt_doc_link)}
- #{wgt.txt}#{wgt.epub}#{wgt.pdf}#{wgt.odf}
-<td align="center" bgcolor=#{@vz.color_band2}>
- #{wgt.manifest}
- #{wgt.search}
- #{wgt.home}
-</tr></table>}
- end
- end
def navigation_table
%{<table summary="navigation segment table" width=#{@vz.table_width_1} border="0" bgcolor="white" cellpadding="0">
<tr><th width="#{@@indent['leve_1']}" align="right">
diff --git a/lib/sisu/v2/sysenv.rb b/lib/sisu/v2/sysenv.rb
index ed955006..ef6d86c7 100644
--- a/lib/sisu/v2/sysenv.rb
+++ b/lib/sisu/v2/sysenv.rb
@@ -1019,13 +1019,6 @@ module SiSU_Env
end
def search_form(type='sisusearch',action=nil,db=nil,table=false)
rc=SiSU_Env::Get_init.instance.yamlrc
- create_form_hyperestraier=if defined? rc['search']['sisu']['flag'] \
- and rc['search']['sisu']['flag']==true \
- and action \
- and action =~/https?:\/\//
- true
- else false
- end
create_form_sisu=if action \
and db \
and action =~/https?:\/\// \
@@ -1041,6 +1034,11 @@ module SiSU_Env
end
action=rc['search']['sisu']['action']
true
+ elsif defined? rc['search']['sisu']['flag'] \
+ and defined? rc['search']['sisu']['action'] \
+ and rc['search']['sisu']['flag']==true \
+ and rc['search']['sisu']['action'] =~/https?:\/\//
+ true
else false
end
if table
@@ -1071,24 +1069,6 @@ module SiSU_Env
#{table_close}
<!-- SiSU Search -->
WOK
- elsif create_form_hyperestraier \
- and type=~/hyperestraier/ \
- and defined? rc['search']['hyperestraier']
- <<WOK
-<!-- SiSU Search using Hyperestraier -->
-#{table_open}
-<a name="search"></a>
-<form method="get" action="#{rc['search']['hyperestraier']['action']}" target="_top">
-<font size="2">
-<input type="text" name="phrase" value="" size="24" maxlength="255" />
-<input type="submit" value="search" />
-<input type="hidden" name="enc" value="UTF-8" />
-<font size="2">
-<a href="#{rc['search']['hyperestraier']['action']}">hyperestraier search</a>
-</font></form>
-#{table_close}
-<!-- SiSU Search using Hyperestraier -->
-WOK
else ''
end
form