forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdupoiri...@apache.org
Subject svn commit: r369455 - in /forrest/trunk/main/template-sites/v3/src/documentation/resources/themes: pelt.fv pelt/html/siteinfo-credits.ft
Date Mon, 16 Jan 2006 12:32:42 GMT
Author: cdupoirieux
Date: Mon Jan 16 04:32:27 2006
New Revision: 369455

URL: http://svn.apache.org/viewcvs?rev=369455&view=rev
Log:
siteinfo-credits.ft migration (and correction because the use-role-as-prefix parameter was
not taken into account in dispatcher v2. (FOR-787)

Added:
    forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt/html/siteinfo-credits.ft
      - copied, changed from r369411, forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/siteinfo-credits.ft
Modified:
    forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt.fv

Modified: forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt.fv
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt.fv?rev=369455&r1=369454&r2=369455&view=diff
==============================================================================
--- forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt.fv (original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt.fv Mon Jan
16 04:32:27 2006
@@ -324,29 +324,27 @@
               <search name="MyProject" domain="mydomain" provider="google"/>
             </forrest:property>
           </forrest:contract>
-          <!--
           <forrest:contract name="siteinfo-credits">
-            <forrest:properties contract="siteinfo-credits">
-              <forrest:property name="box-location">credit</forrest:property>
-              <forrest:property name="top-separator">true</forrest:property>
-              <forrest:property name="siteinfo-credits">
-                <credits>
-                  <credit>
-                    <name>Built with Apache Forrest</name>
-                    <url>http://forrest.apache.org/</url>
-                    <image>images/built-with-forrest-button.png</image>
-                    <width>88</width>
-                    <height>31</height>
-                  </credit>
-                </credits>
-              </forrest:property>
-            </forrest:properties>
+            <forrest:property name="box-location">credit</forrest:property>
+            <forrest:property name="top-separator">true</forrest:property>
+            <forrest:property name="siteinfo-credits">
+              <credits>
+                <credit>
+                  <name>Built with Apache Forrest</name>
+                  <url>http://forrest.apache.org/</url>
+                  <image>images/built-with-forrest-button.png</image>
+                  <width>88</width>
+                  <height>31</height>
+                </credit>
+              </credits>
+            </forrest:property>
           </forrest:contract>
           <forrest:contract name="genericMarkup">
             <forrest:property name="genericMarkup">
               <hr/>
             </forrest:property>
           </forrest:contract>
+          <!--
           <forrest:contract name="content-motd-page">
             <forrest:properties contract="content-motd-page">
               <forrest:property name="content-motd-page">

Copied: forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt/html/siteinfo-credits.ft
(from r369411, forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/siteinfo-credits.ft)
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt/html/siteinfo-credits.ft?p2=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt/html/siteinfo-credits.ft&p1=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/siteinfo-credits.ft&r1=369411&r2=369455&rev=369455&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/pelt/html/siteinfo-credits.ft
(original)
+++ forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt/html/siteinfo-credits.ft
Mon Jan 16 04:32:27 2006
@@ -1,28 +1,27 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-Copyright 2002-2005 The Apache Software Foundation or its licensors,
-as applicable.
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
 
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
 -->
-<forrest:contract xmlns:i18n="http://apache.org/cocoon/i18n/2.1" 
-  xmlns:forrest="http://apache.org/forrest/templates/1.0" 
-  name="siteinfo-credits" type="nugget">
-  <description> siteinfo-credits - Template will output the siteinfo-credits 
+<forrest:contract xmlns:forrest="http://apache.org/forrest/templates/1.0"
+  name="siteinfo-credits">
+  <description> siteinfo-credits - Template will output the siteinfo-credits
     with pelt look'n feel. </description>
+
   <usage><![CDATA[<forrest:contract name="siteinfo-credits">
-   [<forrest:properties contract="siteinfo-credits">
-     <forrest:property name="box-location"></forrest:property>
+    [<forrest:property name="box-location"></forrest:property>
      <forrest:property name="top-separator">[true|<strong>false</strong>]</forrest:property>
      <forrest:property name="use-role-as-prefix">[true|<strong>false</strong>]</forrest:property>
      <forrest:property name="siteinfo-credits">
@@ -35,55 +34,62 @@
           <height>31</height>
         </credit>
       </credits>
-    </forrest:property>
-   </forrest:properties>]
- </forrest:contract>]]></usage>
-  <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0" 
-    format="html" name="siteinfo-credits" inputFormat="xsl" body="true" 
-    head="false">
-    <xsl:stylesheet version="1.1" 
+    </forrest:property>]
+  </forrest:contract>]]></usage>
+
+  <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+    name="siteinfo-credits" inputFormat="xsl">
+    <xsl:stylesheet version="1.1"
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-      <xsl:template name="siteinfo-credits-body">
+        <xsl:param name="defaultVariables" select="'test.html'"/>
         <xsl:param name="siteinfo-credits"/>
         <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:if test="$siteinfo-credits/credits/credit[starts-with( $filename, concat(
@role, '.') )]">
-          <xsl:comment> |start siteinfo-credits </xsl:comment>
-          <div id="{$box-location}">
-            <xsl:if test="$top-separator = 'true'">
-              <hr/>
+        <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 )">
+                    <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}" border="0">
+                      <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:for-each 
-              select="$siteinfo-credits/credits/credit[starts-with( $filename, concat( @role,
'.') )]">
-              <xsl:if test="not( position()=1 )">
-                <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}" border="0">
-                  <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>
+          </forrest:part>
+        </forrest:content>
       </xsl:template>
     </xsl:stylesheet>
   </forrest:template>



Mime
View raw message