aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/html.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v2/html.rb')
-rw-r--r--lib/sisu/v2/html.rb15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/sisu/v2/html.rb b/lib/sisu/v2/html.rb
index 4959d683..834eefa1 100644
--- a/lib/sisu/v2/html.rb
+++ b/lib/sisu/v2/html.rb
@@ -533,7 +533,7 @@ WOK
format_txt_obj=SiSU_HTML_Format::Format_text_object.new(@md,txt_obj)
toc_shared << format_txt_obj.center_bold
@segtoc << format_txt_obj.center_bold
- if @md.creator.author
+ if defined? @md.creator.author
creator_endnote=@md.creator.author.gsub(/(\*+)/,%{&nbsp;<sup><a href="#notes">\\1</a></sup>})
tmp_head=creator_endnote + "\n"
txt_obj={:txt =>tmp_head}
@@ -553,13 +553,20 @@ WOK
end
tmp_head=nil
toc_shared << @links_guide_toc
- toc_shared << rights if @md.rights.all
- toc_shared << prefix_b if @md.prefix_b
+ if defined? @md.rights.all #and ? @md.rights.all
+ toc_shared << rights
+ end
+ if defined? @md.prefix_b
+ toc_shared << prefix_b
+ end
#Table of Contents added/appended here
toc_shared << @toc[:scr]
@segtoc << @links_guide_toc
@segtoc << @toc[:seg]
- @segtoc << rights if @md.rights.all
+ if defined? @md.rights.all \
+ and not @md.rights.all.empty?
+ @segtoc << rights
+ end
@segtoc << prefix_b if @md.prefix_b
#Segtoc tail added here
@segtoc << "</p>\n" #bugfix sort later DEBUGNOW