diff options
author | Ralph Amissah <ralph@amissah.com> | 2008-09-13 23:27:28 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2008-09-13 23:27:28 -0400 |
commit | dbde53fbcfb79fd01762d97fac929af2a4cfc26a (patch) | |
tree | c98a4c884198aab848443f5b57f5e996f2d55bdd /lib/sisu/v0/dal_idx.rb | |
parent | dal_idx: capitalize first letter of index lev1 for sort; provide letter a-z n... (diff) |
dal_idx, and concordance, letter list for navigation
Diffstat (limited to 'lib/sisu/v0/dal_idx.rb')
-rw-r--r-- | lib/sisu/v0/dal_idx.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/sisu/v0/dal_idx.rb b/lib/sisu/v0/dal_idx.rb index 9691a997..a5806d06 100644 --- a/lib/sisu/v0/dal_idx.rb +++ b/lib/sisu/v0/dal_idx.rb @@ -169,20 +169,20 @@ module SiSU_book_index @idx[:sst] << "\n\n#{Mx[:br_page_new]}" @idx[:sst] << "\n\n#{Mx[:lv_o]}2:#{Mx[:lv_c]}Index #{Mx[:id_o]}~0;0:0;x0#{Mx[:id_c]}" @idx[:sst] << "\n\n#{Mx[:lv_o]}4:idx#{Mx[:lv_c]} [Index] #{Mx[:pa_non_object_dummy_heading]} #{Mx[:id_o]}~0;0:0;x0#{Mx[:id_c]}" - @alph=%W[A B C D E F G H I J K L M N O P Q R S T U V W X Y Z] + alph=%W[A B C D E F G H I J K L M N O P Q R S T U V W X Y Z] @idx[:html] << '<p>' - @alph.each {|x| @idx[:html] << %{<a href="##{x}">#{x}</a>, }} + alph.each {|x| @idx[:html] << %{<a href="##{x}">#{x}</a>, }} @idx[:html] << '</p>' - @letter=@alph.shift + letter=alph.shift @idx[:html] << %{\n<hr />\n<p class="book_index_lev1"><a name="A">A</a></p>} the_idx.each do |i| i.each do |x| if x.class == String f=/^(\S)/.match(x)[1] - if @letter < f - while @letter < f - @letter=@alph.shift - @idx[:html] << %{\n<hr />\n<p class="book_index_lev1"><a name="#{@letter}">#{@letter}</a></p>} + if letter < f + while letter < f + letter=alph.shift + @idx[:html] << %{\n<hr />\n<p class="book_index_lev1"><a name="#{letter}">#{letter}</a></p>} end end @idx[:sst] << %{\n\n#{Mx[:fa_bold_o]}#{x},#{Mx[:fa_bold_c]} } |