Author: ltheussl
Date: Mon Sep 12 10:05:49 2005
New Revision: 280371

URL: http://svn.apache.org/viewcvs?rev=280371&view=rev
Log:
MPXDOC-24 : Add navigation bar

Modified:
    maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl
    
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates.properties
    
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_de.properties
    
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_fr.properties
    maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml
    maven/maven-1/plugins/trunk/xdoc/xdocs/index.xml

Modified: maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl?rev=280371&r1=280370&r2=280371&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl (original)
+++ maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/site.jsl Mon Sep 12 
10:05:49 2005
@@ -840,6 +840,29 @@
     <jsl:applyTemplates trim="false"/>
   </jsl:template>
 
+  <!-- process a guide-like navbar -->
+  <jsl:template match="navbar" trim="false">
+    <x:set var="_prevlink" select="string(@prev)"/>
+    <x:set var="_homelink" select="string(@home)"/>
+    <x:set var="_nextlink" select="string(@next)"/>
+    <j:set var="prev"><fmt:message key="site.navbar.previous" 
bundle="${msg}"/></j:set>
+    <j:set var="home"><fmt:message key="site.navbar.home" 
bundle="${msg}"/></j:set>
+    <j:set var="next"><fmt:message key="site.navbar.next" 
bundle="${msg}"/></j:set>
+    <hr/>
+    <div align="center" class="navbar">
+      [
+      <j:if test="${ ! empty(_prevlink) }"><a 
href="${_prevlink}">${prev}</a></j:if>
+      <j:if test="${ empty(_prevlink) }">${prev}</j:if>
+      |
+      <j:if test="${ ! empty(_homelink)}"><a 
href="${_homelink}">${home}</a></j:if>
+      <j:if test="${ empty(_homelink) }">home</j:if>
+      |
+      <j:if test="${ ! empty(_nextlink)}"><a 
href="${_nextlink}">${next}</a></j:if>
+      <j:if test="${ empty(_nextlink)}">${next}</j:if>
+      ]
+    </div>
+  </jsl:template>
+
   <!-- element values don't pass through as text -->
   <jsl:template match="@*"/>
 

Modified: 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates.properties
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates.properties?rev=280371&r1=280370&r2=280371&view=diff
==============================================================================
--- 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates.properties
 (original)
+++ 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates.properties
 Mon Sep 12 10:05:49 2005
@@ -164,3 +164,6 @@
 site.goals=Goals
 site.goal=Goal
 site.description=Description
+site.navbar.previous=previous
+site.navbar.home=home
+site.navbar.next=next

Modified: 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_de.properties
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_de.properties?rev=280371&r1=280370&r2=280371&view=diff
==============================================================================
--- 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_de.properties
 (original)
+++ 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_de.properties
 Mon Sep 12 10:05:49 2005
@@ -163,3 +163,6 @@
 site.language = Sprache
 site.locale.en = Englisch
 site.locale.fr = Französisch
+site.navbar.previous=zurück
+site.navbar.home=Übersicht
+site.navbar.next=weiter

Modified: 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_fr.properties
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_fr.properties?rev=280371&r1=280370&r2=280371&view=diff
==============================================================================
--- 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_fr.properties
 (original)
+++ 
maven/maven-1/plugins/trunk/xdoc/src/plugin-resources/templates/templates_fr.properties
 Mon Sep 12 10:05:49 2005
@@ -166,3 +166,6 @@
 site.goals=Buts
 site.goal=But
 site.description=Description
+site.navbar.previous=précédent
+site.navbar.home=Accueil
+site.navbar.next=suivant

Modified: maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml?rev=280371&r1=280370&r2=280371&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/xdoc/xdocs/changes.xml Mon Sep 12 10:05:49 2005
@@ -27,6 +27,7 @@
   </properties>
   <body>
     <release version="1.10" date="in SVN">
+      <action dev="ltheussl" type="add" issue="MPXDOC-24" due-to="Gilles 
Dodinet">Add a navigation bar.</action>
       <action dev="ltheussl" type="add" issue="MPXDOC-158">Add an optional id 
tag to sub/sections, so they can be referenced.</action>
       <action dev="ltheussl" type="add" issue="MPXDOC-144">Add a property to 
override <code>navigation.xml</code>.</action>
       <action dev="ltheussl" type="add" issue="MPXDOC-127" due-to="Shinobu 
Kawai Yoshida">Show organization in header even if logo not set.</action>

Modified: maven/maven-1/plugins/trunk/xdoc/xdocs/index.xml
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/xdocs/index.xml?rev=280371&r1=280370&r2=280371&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/xdocs/index.xml (original)
+++ maven/maven-1/plugins/trunk/xdoc/xdocs/index.xml Mon Sep 12 10:05:49 2005
@@ -53,6 +53,16 @@
     </A>
    </footer>]]></source>
       </subsection>
+      <subsection name="Navigation bar">
+        <p>
+          You can put a navigation bar on bottom of each page by including
+          a <code>&lt;navbar/&gt;</code> element in an xdoc's body.
+          This element takes three optional attributes,
+          <code>prev</code>, <code>home</code> and <code>next</code>, as
+          shown in the following example:
+        </p>
+        <source><![CDATA[<navbar prev="first.html" home="../index.html" 
next="next.html"/>]]></source>
+      </subsection>
       <subsection name="Google Search">
         <p>If a <code>search</code> element is found in the 
<code>navigation.xml</code> body, a search navigation menu is generated that 
uses <a href="http://www.google.com";>google</a></p>
       </subsection>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to