aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-03-20 20:44:22 -0400
committerRalph Amissah <ralph@amissah.com>2013-03-20 20:44:22 -0400
commitb2a1d9c6f06750cd0b2ccf7d069fe98381c2afb8 (patch)
tree8ba96a2079b8a513f73645070b3591d23204f8d2
parentv4: version & changelog (diff)
v4: manifest & harvest, links to default site home page index.html
-rw-r--r--data/doc/sisu/CHANGELOG_v42
-rw-r--r--lib/sisu/v4/harvest_authors.rb17
-rw-r--r--lib/sisu/v4/harvest_topics.rb17
-rw-r--r--lib/sisu/v4/manifest.rb14
4 files changed, 43 insertions, 7 deletions
diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4
index 7e747585..8ac9e79b 100644
--- a/data/doc/sisu/CHANGELOG_v4
+++ b/data/doc/sisu/CHANGELOG_v4
@@ -28,6 +28,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.17.orig.tar.xz
sisu_4.0.17.orig.tar.xz
sisu_4.0.17-1.dsc
+* v4: manifest & harvest, links to default site home page index.html
+
%% 4.0.16.orig.tar.xz (2013-03-18:11/1)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.16
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.16-1
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 += %{<a href="#{file}">#{l}</a>&nbsp;&nbsp;&nbsp;}
end
sv=SiSU_Env::InfoVersion.instance.get_version
+ if @env.output_dir_structure.by? == :language
+ home_pth='../..'
+ output_structure_by='(output organised by language &amp; 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
<<WOK
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -270,8 +283,8 @@ module SiSU_HarvestAuthors
<a name="top" id="top"></a>
<a name="up" id="up"></a>
<a name="start" id="start"></a>
-<h1>SiSU Metadata Harvest - Authors</h1>
-<p>[<a href="../index.html">&nbsp;HOME&nbsp;</a>] also see <a href="#{topics}">SiSU Metadata Harvest - Topics</a></p>
+<h1>SiSU Metadata Harvest - Authors #{output_structure_by}</h1>
+<p>[<a href="#{home_pth}/index.html">&nbsp;HOME&nbsp;</a>] also see <a href="#{topics}">SiSU Metadata Harvest - Topics</a></p>
<p>#{@env.widget_static.search_form}</p>
<hr />
<p class="tiny">#{harvest_languages}</p>
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 += %{<a href="#{file}">#{l}</a>&nbsp;&nbsp;&nbsp;}
end
sv=SiSU_Env::InfoVersion.instance.get_version
+ if @env.output_dir_structure.by? == :language
+ home_pth='../..'
+ output_structure_by='(output organised by language &amp; 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
<<WOK
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -628,8 +641,8 @@ module SiSU_HarvestTopics
<a name="top" id="top"></a>
<a name="up" id="up"></a>
<a name="start" id="start"></a>
-<h1>SiSU Metadata Harvest - Topics</h1>
-<p>[<a href="../index.html">&nbsp;HOME&nbsp;</a>] also see <a href="#{authors}">SiSU Metadata Harvest - Authors</a></p>
+<h1>SiSU Metadata Harvest - Topics #{output_structure_by}</h1>
+<p>[<a href="#{home_pth}/index.html">&nbsp;HOME&nbsp;</a>] also see <a href="#{authors}">SiSU Metadata Harvest - Authors</a></p>
<p>#{@env.widget_static.search_form}</p>
<hr />
<p class="tiny">#{harvest_languages}</p>
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")) \
- ? %{<p class="small">other document manifests: [<a href="#{pth_rel}authors#{@fn_lng}.html">authors</a>] [<a href="#{pth_rel}topics#{@fn_lng}.html">topics</a>]</p>}
+ ? %{<p class="small"><a href="#{pth_rel_home}/index.html">.:</a> other document manifests: [<a href="#{pth_rel}/authors#{@fn_lng}.html">authors</a>] [<a href="#{pth_rel}/topics#{@fn_lng}.html">topics</a>]</p>}
: ''
manifest_title=%{<p class="bold">#{@translate.manifest_description}</p>#{harvest}}
@manifest[:html] <<<<WOK