From 74f7e0adab199936fd943b535f40359b08d40324 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 4 Dec 2010 12:43:58 -0500 Subject: html, link to "document manifest" & search form reviewed (testing required) --- CHANGELOG_v2 | 2 +- data/doc/sisu/v2/CHANGELOG | 2 +- data/sisu/v2/v/version.yml | 4 +- lib/sisu/v2/html.rb | 4 +- lib/sisu/v2/html_format.rb | 175 +++++++++++++++++++++++++++++---------------- lib/sisu/v2/sysenv.rb | 30 ++------ 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) + %{ + + +
+ #{wgt.manifest} + #{wgt.search} +
} 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 - '' + %{ + + #{@vz.nav_txt_homepage} + +} end def scroll(text) - '' + if @md.fns =~ /\.(?:-|ssm\.)?sst$/ + scroll=%{ + + #{text} + + +} + end end def seg(text) - '' + %{ + + #{text} + + +} end def search env=SiSU_Env::Info_env.new(@md.fns,@md) @@ -164,20 +190,67 @@ module SiSU_HTML_Format } end - def pdf - '' + def pdf #retired 2.7.9 + pdf=if @md.programs[:pdf] \ + and @cf_defaults.cf_0 =~/p/ + %{ + + + #{@vz.nav_txt_pdf_portrait} + + + + + #{@vz.nav_txt_pdf_landscape} + + +} + else '' + end end - def txt - '' + def txt #retired 2.7.9 + txt=if @cf_defaults.cf_0 =~/[at]/ + %{ + + + #{@vz.nav_txt_plaintext} + +} + else '' + end end - def epub - '' + def epub #retired 2.7.9 + epub=if @cf_defaults.cf_0 =~/e/ + %{ + + + #{@vz.nav_txt_epub} + +} + else '' + end end - def odf - '' + def odf #retired 2.7.9 + odf=if @cf_defaults.cf_0 =~/o/ + %{ + + + #{@vz.nav_txt_odf} + +} + 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 + %{ + + #{text} + + } + 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

} end def concordance_navigation_band(type='') - if type=~/pdf/ - @tocband_concordance=make_concordance - end %{ -
#{@vz.banner_band} - #{@tocband_concordance} -   #{@vz.png_nav_toc} @@ -225,6 +291,22 @@ WOK

} end def seg_head_navigation_band(type='') + firstseg=%{ + #{@vz.png_nav_nxt} + } if @md.firstseg =~/\S+/ + %{ + + +
+ #{@vz.banner_band} + + #{doc_types} + +  #{firstseg}  +#{@vz.table_close} +

} + 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 } if @md.firstseg =~/\S+/ %{
- #{@vz.banner_band} +   #{@tocband_segtoc} @@ -243,16 +325,20 @@ WOK #{@vz.table_close}

} end - def seg_head_navigation_band_bottom(type='') - '' - end def manifest_link(text) %{ #{text} } end - def concordance_link(text) - '' + def concordance_link(text) #retired 2.7.9 + if @md.concord_make + %{ + + #{text} + + } + else '' + end end def make_seg_scroll_pdf wgt=Widget.new(@md) @@ -467,11 +553,6 @@ WOK -
#{@vz.banner_band} - -
- #{@tocband_segtoc} -

 

@@ -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 - %{ - - - #{wgt.seg(@vz.nav_txt_toc_link)} - #{wgt.scroll(@vz.nav_txt_doc_link)} - #{wgt.txt}#{wgt.epub}#{wgt.pdf}#{wgt.odf} -
- #{wgt.concordance(@vz.nav_txt_concordance)} - #{wgt.manifest} - #{wgt.search} - #{wgt.home} -
} - else - %{ - - - #{wgt.seg(@vz.nav_txt_toc_link)} - #{wgt.scroll(@vz.nav_txt_doc_link)} - #{wgt.txt}#{wgt.epub}#{wgt.pdf}#{wgt.odf} -
- #{wgt.manifest} - #{wgt.search} - #{wgt.home} -
} - end - end def navigation_table %{
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 @@ -1070,24 +1068,6 @@ module SiSU_Env #{table_close} -WOK - elsif create_form_hyperestraier \ - and type=~/hyperestraier/ \ - and defined? rc['search']['hyperestraier'] - < -#{table_open} - -
- - - - - -hyperestraier search - -#{table_close} - WOK else '' end -- cgit v1.2.3