From b2a1d9c6f06750cd0b2ccf7d069fe98381c2afb8 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 20 Mar 2013 20:44:22 -0400 Subject: v4: manifest & harvest, links to default site home page index.html --- lib/sisu/v4/harvest_authors.rb | 17 +++++++++++++++-- lib/sisu/v4/harvest_topics.rb | 17 +++++++++++++++-- lib/sisu/v4/manifest.rb | 14 +++++++++++--- 3 files changed, 41 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v4/harvest_authors.rb b/lib/sisu/v4/harvest_authors.rb index 671b93ab..e360e3a3 100644 --- a/lib/sisu/v4/harvest_authors.rb +++ b/lib/sisu/v4/harvest_authors.rb @@ -252,6 +252,19 @@ module SiSU_HarvestAuthors harvest_languages += %{#{l}   } end sv=SiSU_Env::InfoVersion.instance.get_version + if @env.output_dir_structure.by? == :language + home_pth='../..' + output_structure_by='(output organised by language & filetype)' + elsif @env.output_dir_structure.by? == :filetype + home_pth='..' + output_structure_by='(output organised by filetype)' + elsif @env.output_dir_structure.by? == :filename + home_pth='.' + output_structure_by='(output organised by filename)' + else + home_pth='.' + output_structure_by='(output organised by ?)' + end < @@ -270,8 +283,8 @@ module SiSU_HarvestAuthors -

SiSU Metadata Harvest - Authors

-

[ HOME ] also see SiSU Metadata Harvest - Topics

+

SiSU Metadata Harvest - Authors #{output_structure_by}

+

[ HOME ] also see SiSU Metadata Harvest - Topics

#{@env.widget_static.search_form}


#{harvest_languages}

diff --git a/lib/sisu/v4/harvest_topics.rb b/lib/sisu/v4/harvest_topics.rb index fda71e7c..bce96ced 100644 --- a/lib/sisu/v4/harvest_topics.rb +++ b/lib/sisu/v4/harvest_topics.rb @@ -610,6 +610,19 @@ module SiSU_HarvestTopics harvest_languages += %{#{l}   } end sv=SiSU_Env::InfoVersion.instance.get_version + if @env.output_dir_structure.by? == :language + home_pth='../..' + output_structure_by='(output organised by language & filetype)' + elsif @env.output_dir_structure.by? == :filetype + home_pth='..' + output_structure_by='(output organised by filetype)' + elsif @env.output_dir_structure.by? == :filename + home_pth='.' + output_structure_by='(output organised by filename)' + else + home_pth='.' + output_structure_by='(output organised by ?)' + end < @@ -628,8 +641,8 @@ module SiSU_HarvestTopics -

SiSU Metadata Harvest - Topics

-

[ HOME ] also see SiSU Metadata Harvest - Authors

+

SiSU Metadata Harvest - Topics #{output_structure_by}

+

[ HOME ] also see SiSU Metadata Harvest - Authors

#{@env.widget_static.search_form}


#{harvest_languages}

diff --git a/lib/sisu/v4/manifest.rb b/lib/sisu/v4/manifest.rb index 1f5724c5..403271b5 100644 --- a/lib/sisu/v4/manifest.rb +++ b/lib/sisu/v4/manifest.rb @@ -833,14 +833,22 @@ WOK elsif @f.output_dir_structure.by_language_code? \ or @f.output_dir_structure.by_filetype? pth_local=@f.output_path.manifest.dir - pth_rel='./' + pth_rel='.' else pth_local=@f.output_path.base.dir - pth_rel='../' + pth_rel='..' + end + pth_rel_home=if @env.output_dir_structure.by? == :language + '../..' + elsif @env.output_dir_structure.by? == :filetype + '..' + elsif @env.output_dir_structure.by? == :filename + '..' + else '..' end harvest=(FileTest.file?("#{pth_local}/authors#{@fn_lng}.html") \ && FileTest.file?("#{pth_local}/topics#{@fn_lng}.html")) \ - ? %{

other document manifests: [authors] [topics]

} + ? %{

.: other document manifests: [authors] [topics]

} : '' manifest_title=%{

#{@translate.manifest_description}

#{harvest}} @manifest[:html] <<<