From d5b2fa8c360d4f790f72dbcf3058e7eaa06c60fd Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 12 May 2014 21:07:03 -0400 Subject: v5 v6: metadata, pdf, remove link to manifest page where --no-manifest is used * (Closes: #744378) --- lib/sisu/v5/shared_metadata.rb | 11 ++++++++--- lib/sisu/v6/shared_metadata.rb | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v5/shared_metadata.rb b/lib/sisu/v5/shared_metadata.rb index b7ba2f1f..da396040 100644 --- a/lib/sisu/v5/shared_metadata.rb +++ b/lib/sisu/v5/shared_metadata.rb @@ -886,6 +886,8 @@ WOK def initialize(md) @md=md @br="\\\\\n" + @make=SiSU_Env::ProcessingSettings.new(md) + @o_str ||=SiSU_Env::ProcessingSettings.new(md).output_dir_structure end def meta_para(tag,inf,sc=true) inf=((inf.is_a?(String) && sc) ? spec_char(inf) : inf) @@ -906,9 +908,12 @@ WOK l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language language=l[:n] tr=SiSU_Translate::Source.new(@md,language) - tag="Document Manifest @" - inf="#{@br}#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}" - meta << meta_para(tag,inf) + if @make.build.links_to_manifest? \ + and not @o_str.dump_or_redirect? + tag="Document Manifest @" + inf="#{@br}#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}" + meta << meta_para(tag,inf) + end if defined? @md.title.full \ and @md.title.full=~/\S+/ tag,inf=tr.full_title,@md.title.full diff --git a/lib/sisu/v6/shared_metadata.rb b/lib/sisu/v6/shared_metadata.rb index 546eb788..c2fe06b9 100644 --- a/lib/sisu/v6/shared_metadata.rb +++ b/lib/sisu/v6/shared_metadata.rb @@ -886,6 +886,8 @@ WOK def initialize(md) @md=md @br="\\\\\n" + @make=SiSU_Env::ProcessingSettings.new(md) + @o_str ||=SiSU_Env::ProcessingSettings.new(md).output_dir_structure end def meta_para(tag,inf,sc=true) inf=((inf.is_a?(String) && sc) ? spec_char(inf) : inf) @@ -906,9 +908,12 @@ WOK l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language language=l[:n] tr=SiSU_Translate::Source.new(@md,language) - tag="Document Manifest @" - inf="#{@br}#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}" - meta << meta_para(tag,inf) + if @make.build.links_to_manifest? \ + and not @o_str.dump_or_redirect? + tag="Document Manifest @" + inf="#{@br}#{@md.file.output_path.manifest.url}/#{@md.file.base_filename.manifest}" + meta << meta_para(tag,inf) + end if defined? @md.title.full \ and @md.title.full=~/\S+/ tag,inf=tr.full_title,@md.title.full -- cgit v1.2.3