v5 v6: html navigation, enable turn off (nav buttons on remaining html segments)
authorRalph Amissah <ralph@amissah.com>
Sat, 6 Sep 2014 02:59:44 +0000 (22:59 -0400)
committerRalph Amissah <ralph@amissah.com>
Sat, 6 Sep 2014 03:14:30 +0000 (23:14 -0400)
data/doc/sisu/CHANGELOG_v5
data/doc/sisu/CHANGELOG_v6
lib/sisu/v5/html_format.rb
lib/sisu/v6/html_format.rb

index 4144342821ca785aff0c10b39a298eaa2ad1c335..aed37d241bd350089c456177caa4cd722cf8dbdb 100644 (file)
@@ -38,6 +38,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.6.5.orig.tar.xz
   sisu_5.6.5.orig.tar.xz
   sisu_5.6.5-1.dsc
 
+* html navigation, enable turn off (nav buttons on remaining html segments)
+
 * (for html) set default to navigation bar off
 
 * xml xhtml outputs, &amp; issues
index 783899f1ec63dfd513a5c8ce82865fc8eaeadf34..2e6a6f9b9cac1daa47f622bb28483d178719b47b 100644 (file)
@@ -28,6 +28,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.2.6.orig.tar.xz
   sisu_6.2.6.orig.tar.xz
   sisu_6.2.6-1.dsc
 
+* html navigation, enable turn off (nav buttons on remaining html segments)
+
 * (for html) set default to navigation bar off
 
 * xml xhtml outputs, &amp; issues
index 16120d88e673757c71c1a841c54e5fd0e1d1de12..aa002ec77df25f8ca00870a106f167caacf09e26 100644 (file)
@@ -310,6 +310,15 @@ WOK
       end
     end
     def concordance_navigation_band
+      up_button=if @make.build.html_navigation?
+        %{</td>
+<td width="5%" align="right">
+  &nbsp;<a href="toc.html" target="_top" alt="-&gt;">
+      #{png_nav.toc}
+    </a>&nbsp;
+}
+      else ''
+      end
       if @make.build.html_top_band?
         %{<table summary="concordance navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
 <tr><td width="20%">
@@ -317,29 +326,29 @@ WOK
 </td>
 <td width="75%" align="center">
   #{doc_types}
-</td>
-<td width="5%" align="right">
-  &nbsp;<a href="toc.html" target="_top" alt="-&gt;">
-      #{png_nav.toc}
-    </a>&nbsp;
+#{up_button}
 #{@vz.table_close}
 <p />}
       else ''
       end
     end
     def seg_head_navigation_band(page=:seg)
-      if page==:manifest
-        nxt=(@file.output_dir_structure.by_language_code? \
-        || @file.output_dir_structure.by_filetype?) \
-        ? "../html/#{@md.fnb}/toc#{@md.lang_code_insert}#{Sfx[:html]}"
-        : "toc#{@md.lang_code_insert}#{Sfx[:html]}"
-        firstseg=%{<a href="#{nxt}" target="_top" alt="-&gt;">
+      if @make.build.html_navigation?
+        if page==:manifest
+          nxt=(@file.output_dir_structure.by_language_code? \
+          || @file.output_dir_structure.by_filetype?) \
+          ? "../html/#{@md.fnb}/toc#{@md.lang_code_insert}#{Sfx[:html]}"
+          : "toc#{@md.lang_code_insert}#{Sfx[:html]}"
+          firstseg=%{<a href="#{nxt}" target="_top" alt="-&gt;">
+          #{png_nav.nxt}</a>}
+        elsif @md.firstseg =~/\S+/
+          firstseg=%{<a href="#{@md.firstseg}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top" alt="-&gt;">
         #{png_nav.nxt}</a>}
-      elsif @md.firstseg =~/\S+/
-        firstseg=%{<a href="#{@md.firstseg}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top" alt="-&gt;">
-      #{png_nav.nxt}</a>}
+        end
+      else ''
       end
-      %{<table summary="table of contents segment navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
+      if @make.build.html_top_band?
+        %{<table summary="table of contents segment navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
 <tr><td width="20%">
 #{button_home(page)}
 </td>
@@ -350,6 +359,8 @@ WOK
   &nbsp;#{firstseg}&nbsp;
 #{@vz.table_close}
 <p />}
+      else ''
+      end
     end
     def manifest_link(text)
 #     @file=SiSU_Env::FileOp.new(@md) if @md
index febfc30e31eaba9410e4bb562bdf581131c94c01..acc62a743f343cf2d6cb8c6bee2ac1765e30a9b5 100644 (file)
@@ -310,6 +310,15 @@ WOK
       end
     end
     def concordance_navigation_band
+      up_button=if @make.build.html_navigation?
+        %{</td>
+<td width="5%" align="right">
+  &nbsp;<a href="toc.html" target="_top" alt="-&gt;">
+      #{png_nav.toc}
+    </a>&nbsp;
+}
+      else ''
+      end
       if @make.build.html_top_band?
         %{<table summary="concordance navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
 <tr><td width="20%">
@@ -317,29 +326,29 @@ WOK
 </td>
 <td width="75%" align="center">
   #{doc_types}
-</td>
-<td width="5%" align="right">
-  &nbsp;<a href="toc.html" target="_top" alt="-&gt;">
-      #{png_nav.toc}
-    </a>&nbsp;
+#{up_button}
 #{@vz.table_close}
 <p />}
       else ''
       end
     end
     def seg_head_navigation_band(page=:seg)
-      if page==:manifest
-        nxt=(@file.output_dir_structure.by_language_code? \
-        || @file.output_dir_structure.by_filetype?) \
-        ? "../html/#{@md.fnb}/toc#{@md.lang_code_insert}#{Sfx[:html]}"
-        : "toc#{@md.lang_code_insert}#{Sfx[:html]}"
-        firstseg=%{<a href="#{nxt}" target="_top" alt="-&gt;">
+      if @make.build.html_navigation?
+        if page==:manifest
+          nxt=(@file.output_dir_structure.by_language_code? \
+          || @file.output_dir_structure.by_filetype?) \
+          ? "../html/#{@md.fnb}/toc#{@md.lang_code_insert}#{Sfx[:html]}"
+          : "toc#{@md.lang_code_insert}#{Sfx[:html]}"
+          firstseg=%{<a href="#{nxt}" target="_top" alt="-&gt;">
+          #{png_nav.nxt}</a>}
+        elsif @md.firstseg =~/\S+/
+          firstseg=%{<a href="#{@md.firstseg}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top" alt="-&gt;">
         #{png_nav.nxt}</a>}
-      elsif @md.firstseg =~/\S+/
-        firstseg=%{<a href="#{@md.firstseg}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top" alt="-&gt;">
-      #{png_nav.nxt}</a>}
+        end
+      else ''
       end
-      %{<table summary="table of contents segment navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
+      if @make.build.html_top_band?
+        %{<table summary="table of contents segment navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
 <tr><td width="20%">
 #{button_home(page)}
 </td>
@@ -350,6 +359,8 @@ WOK
   &nbsp;#{firstseg}&nbsp;
 #{@vz.table_close}
 <p />}
+      else ''
+      end
     end
     def manifest_link(text)
 #     @file=SiSU_Env::FileOp.new(@md) if @md