diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v4/manifest.rb | 29 |
1 files changed, 22 insertions, 7 deletions
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 |