forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r427380 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/siteinfo-credits.ft
Date Mon, 31 Jul 2006 23:59:54 GMT
Author: thorsten
Date: Mon Jul 31 16:59:53 2006
New Revision: 427380

URL: http://svn.apache.org/viewvc?rev=427380&view=rev
Log:
Fixing an xstring error reported by the credit contract, if no credits are added.

Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/siteinfo-credits.ft

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/siteinfo-credits.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/siteinfo-credits.ft?rev=427380&r1=427379&r2=427380&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/siteinfo-credits.ft
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/siteinfo-credits.ft
Mon Jul 31 16:59:53 2006
@@ -46,48 +46,51 @@
         <xsl:param name="box-location"></xsl:param>
         <xsl:param name="top-separator">false</xsl:param>
         <xsl:param name="use-role-as-prefix">false</xsl:param>
- 	<xsl:param name="use-br">false</xsl:param>
+        <xsl:param name="use-br">false</xsl:param>
         <xsl:variable name="filename" select="$defaultVariables/*/*[@name='filename']/@value"/>
         <xsl:variable name="root" select="$defaultVariables/*/*[@name='root']/@value"/>
 
       <xsl:template match="/">
         <forrest:content>
           <forrest:part>
-            <xsl:if test="$siteinfo-credits/credits/credit[($use-role-as-prefix = 'true'
and starts-with( $filename, concat( @role, '.') ) ) or starts-with( $filename, 'index') ]">
-              <xsl:comment> |start siteinfo-credits </xsl:comment>
-              <div id="{$box-location}">
-                <xsl:if test="$top-separator = 'true'">
-                  <hr/>
-                </xsl:if>
-                <xsl:for-each
-                  select="$siteinfo-credits/credits/credit[($use-role-as-prefix = 'true'
and starts-with( $filename, concat( @role, '.') ) ) or starts-with( $filename, 'index') ]">
-                  <xsl:if test="not( position()=1 ) and $use-br='true'">
-                    <br/>
+            <xsl:if test="$siteinfo-credits">
+              <xsl:variable name="credit" 
+                select="$siteinfo-credits/credits/credit[($use-role-as-prefix = 'true' and
starts-with( $filename, concat( @role, '.') ) ) or starts-with( $filename, 'index') ]"/>
+              <xsl:if test="$credit">
+                <xsl:comment> |start siteinfo-credits </xsl:comment>
+                <div id="{$box-location}">
+                  <xsl:if test="$top-separator = 'true'">
+                    <hr/>
                   </xsl:if>
-                  <xsl:variable name="name" select="name"/>
-                  <xsl:variable name="url" select="url"/>
-                  <xsl:variable name="image" select="image"/>
-                  <xsl:variable name="width" select="width"/>
-                  <xsl:variable name="height" select="height"/>
-                  <a href="{$url}">
-                    <img alt="{$name} - logo" title="{$name}">
-                      <xsl:attribute name="src">
-                        <xsl:if test="not(starts-with($image, 'http://'))">
-                          <xsl:value-of select="$root"/>
-                        </xsl:if>
-                        <xsl:value-of select="$image"/>
-                      </xsl:attribute>
-                      <xsl:attribute name="style">
-                        <xsl:if test="$width">width: <xsl:value-of
-                          select="$width"/>px;</xsl:if>
-                        <xsl:if test="$height">height: <xsl:value-of
-                          select="$height"/>px;</xsl:if>
-                      </xsl:attribute>
-                    </img>
-                  </a>
-                </xsl:for-each>
-              </div>
-              <xsl:comment>+ |end siteinfo-credits +</xsl:comment>
+                  <xsl:for-each select="$credit">
+                    <xsl:if test="not( position()=1 ) and $use-br='true'">
+                      <br/>
+                    </xsl:if>
+                    <xsl:variable name="name" select="name"/>
+                    <xsl:variable name="url" select="url"/>
+                    <xsl:variable name="image" select="image"/>
+                    <xsl:variable name="width" select="width"/>
+                    <xsl:variable name="height" select="height"/>
+                    <a href="{$url}">
+                      <img alt="{$name} - logo" title="{$name}">
+                        <xsl:attribute name="src">
+                          <xsl:if test="not(starts-with($image, 'http://'))">
+                            <xsl:value-of select="$root"/>
+                          </xsl:if>
+                          <xsl:value-of select="$image"/>
+                        </xsl:attribute>
+                        <xsl:attribute name="style">
+                          <xsl:if test="$width">width: <xsl:value-of 
+                            select="$width"/>px;</xsl:if>
+                          <xsl:if test="$height">height: <xsl:value-of 
+                            select="$height"/>px;</xsl:if>
+                        </xsl:attribute>
+                      </img>
+                    </a>
+                  </xsl:for-each>
+                </div>
+                <xsl:comment>+ |end siteinfo-credits +</xsl:comment>
+              </xsl:if>
             </xsl:if>
           </forrest:part>
         </forrest:content>



Mime
View raw message