You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Ben Walding <de...@walding.com> on 2003/02/25 09:09:15 UTC

Re: [patch] Fix maven.xdoc.date

I've applied this patch with a few small changes to fix layout and one 
bug with navigation-top.
Adam Murdoch wrote:

>Hi,
>
>A few changes to the xdoc plugin's site.jsl template:
>
>- maven.xdoc.date was only working for 'left' and 'right'.
>- maven.xdoc.date set to 'navigation-top' would not include a date.
>- Changed the default template to use trim='true'.  This gets rid of the wierd 
>spacing after inline elements like <a> or <code>.
>
>  
>
>------------------------------------------------------------------------
>
>Index: src/plugins-build/xdoc/src/plugin-resources/site.jsl
>===================================================================
>RCS file: /home/cvspublic/jakarta-turbine-maven/src/plugins-build/xdoc/src/plugin-resources/site.jsl,v
>retrieving revision 1.10
>diff -u -r1.10 site.jsl
>--- src/plugins-build/xdoc/src/plugin-resources/site.jsl	23 Feb 2003 15:57:38 -0000	1.10
>+++ src/plugins-build/xdoc/src/plugin-resources/site.jsl	25 Feb 2003 00:57:30 -0000
>@@ -13,6 +13,7 @@
>     <j:useBean var="navbean" class="org.apache.maven.NavBean"/>
> 	<j:set var="location" value="${outFile.substring(destdir.length())}"/>
> 	<util:replace var="location" oldChar="\" newChar="/" value="${location}"/>
>+      <j:set var="date">${maven.xdoc.date}</j:set>
>       
> 	<j:setProperties 
> 		object="${navbean}"
>@@ -108,7 +109,6 @@
>           <table border="0" cellspacing="0" cellpadding="4" width="100%">
>             <tr>
>               <!-- date of publish and version -->
>-              <j:set var="date">${maven.xdoc.date}</j:set>
>               <j:if test="${date == 'left'}">
>                 <j:set var="version" value="${maven.xdoc.version}"/>
>                 <td>Last published: ${build.date}
>@@ -138,9 +138,9 @@
>           <tr valign="top">
>             <td id="leftcol" width="20%">
>               <div id="navcolumn">
>-                <j:if test="${context.findVariable('maven.xdoc.date') == 'navigation-top'}">
>+                <j:if test="${date == 'navigation-top'}">
>                   <div>
>-                    <small>Last published: ${buildDate}</small>
>+                    <small>Last published: ${build.date}</small>
>                   </div>
>                 </j:if>
> 
>@@ -284,7 +284,7 @@
>                   </j:if>
>                 </div>
>               </j:if>
>-                <j:if test="${context.findVariable('maven.xdoc.date') == 'navigation-bottom'}">
>+                <j:if test="${date == 'navigation-bottom'}">
>                   <div>
>                     <small>Last published: ${build.date}</small>
>                   </div>
>@@ -326,11 +326,11 @@
>                   </j:if>
>                 </j:if>
> 
>-                <j:if test="${context.findVariable('maven.xdoc.date') == 'bottom'}">
>+                <j:if test="${date == 'bottom'}">
>                   - Last published: ${build.date}
>                 </j:if>
>               </td>
>-              <j:if test="${context.findVariable('maven.xdoc.date') == 'bottom-right'}">
>+              <j:if test="${date == 'bottom-right'}">
>                 <td align="right">Last published: ${build.date}</td>
>               </j:if>
>             </tr>
>@@ -555,9 +555,9 @@
> 
> 
>   <!-- copy any other elements through -->
>-  <jsl:template match="*" trim="false">
>-    <jsl:copy trim="false">
>-      <jsl:applyTemplates trim="false"/>
>+  <jsl:template match="*" trim="true">
>+    <jsl:copy trim="true">
>+      <jsl:applyTemplates trim="true"/>
>     </jsl:copy>
>    </jsl:template>
> 
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-maven-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-maven-dev-help@jakarta.apache.org
>