diff options
-rw-r--r-- | data/doc/sisu/CHANGELOG_v4 | 2 | ||||
-rw-r--r-- | lib/sisu/v4/manifest.rb | 29 |
2 files changed, 24 insertions, 7 deletions
diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index dd117c70..fc773627 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -32,6 +32,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.14.orig.tar.xz * v4: harvest, links for output_by? filename +* v4: manifest, links for output_by? alternatives, harvest & qrcode related + %% 4.0.13.orig.tar.xz (2013-03-13:10/3) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.13 http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.13-1 diff --git a/lib/sisu/v4/manifest.rb b/lib/sisu/v4/manifest.rb index c8103a0a..1f5724c5 100644 --- a/lib/sisu/v4/manifest.rb +++ b/lib/sisu/v4/manifest.rb @@ -124,6 +124,9 @@ module SiSU_Manifest @translate=SiSU_Translate::Source.new(md,@language) @brace_url=SiSU_Viz::Defaults.new.url_decoration @stylesheet=SiSU_Style::CSS_HeadInfo.new(md).stylesheet + @fn_lng=(@f.output_dir_structure.by_language_code?) \ + ? '' + : ('.' + md.opt.lng) end def output manifest=@f.write_file.manifest @@ -448,12 +451,15 @@ module SiSU_Manifest end end def qrc_image - fn=@md.fnb - pth=(@o_str.dump_or_redirect?) \ + fn=(@f.output_dir_structure.by_filename?) \ + ? 'sisu_manifest' + : @md.fnb + pth=((@o_str.dump_or_redirect?) \ + || (@f.output_dir_structure.by_filename?)) \ ? '.' : 'qrcode' - img_md="#{pth}/#{fn}.md.png" - img_title="#{pth}/#{fn}.title.png" + img_md="#{pth}/#{fn}#{@fn_lng}.md.png" + img_title="#{pth}/#{fn}#{@fn_lng}.title.png" if FileTest.file?(@f.place_file.qrcode_md.dir)==true @manifest[:html] <<<<WOK <tr><td class="left"> @@ -823,9 +829,18 @@ WOK <div> WOK end - harvest=(FileTest.file?("#{@f.output_path.manifest.dir}/authors.html") \ - && FileTest.file?("#{@f.output_path.manifest.dir}/topics.html")) \ - ? %{<p class="small">other document manifests: [<a href="authors.html">authors</a>] [<a href="topics.html">topics</a>]</p>} + if @o_str.dump_or_redirect? + elsif @f.output_dir_structure.by_language_code? \ + or @f.output_dir_structure.by_filetype? + pth_local=@f.output_path.manifest.dir + pth_rel='./' + else + pth_local=@f.output_path.base.dir + pth_rel='../' + 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>} : '' manifest_title=%{<p class="bold">#{@translate.manifest_description}</p>#{harvest}} @manifest[:html] <<<<WOK |