Author: cdupoirieux
Date: Mon Jan 16 08:13:52 2006
New Revision: 369506
URL: http://svn.apache.org/viewcvs?rev=369506&view=rev
Log:
siteinfo-copyright.ft migration (FOR-787)
Added:
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-copyright.ft
- copied, changed from r369411,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-copyright.ft
Modified:
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/pelt.fv
Copied:
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-copyright.ft
(from r369411,
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-copyright.ft)
URL:
http://svn.apache.org/viewcvs/forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-copyright.ft?p2=forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-copyright.ft&p1=forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-copyright.ft&r1=369411&r2=369506&rev=369506&view=diff
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/html/siteinfo-copyright.ft
(original)
+++
forrest/trunk/main/template-sites/v3/src/documentation/resources/themes/common/html/siteinfo-copyright.ft
Mon Jan 16 08:13:52 2006
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright 2002-2005 The Apache Software Foundation or its licensors,
+ Copyright 2002-2006 The Apache Software Foundation or its licensors,
as applicable.
Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,56 +15,60 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<forrest:contract xmlns:forrest="http://apache.org/forrest/templates/1.0"
- name="siteinfo-copyright" type="nugget">
+<forrest:contract xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="siteinfo-copyright">
+
<description>
- <p><strong>siteinfo-copyright</strong> <br/>The following properties are
+ <p><strong>siteinfo-copyright</strong> <br/>The following properties are
used to construct a copyright statement.</p>
</description>
+
<usage><![CDATA[<forrest:contract name="siteinfo-copyright">
- <forrest:properties contract="siteinfo-copyright">
- <forrest:property name="siteinfo-copyright">
- <copyright>
- <year [inception="[true|false]"]>2005</year>
- <vendor>The Acme Software Foundation.</vendor>
- [<copyright-link>http://...</copyright-link>]
- [<msg>All rights reserved.</msg>]
- </copyright>
- </forrest:property>
- </forrest:properties>
+ <forrest:property name="siteinfo-copyright">
+ <copyright>
+ <year [inception="[true|false]"]>2005</year>
+ <vendor>The Acme Software Foundation.</vendor>
+ [<copyright-link>http://...</copyright-link>]
+ [<msg>All rights reserved.</msg>]
+ </copyright>
+ </forrest:property>
</forrest:contract>]]></usage>
- <forrest:template xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
- xmlns:forrest="http://apache.org/forrest/templates/1.0" format="html"
- name="siteinfo-copyright" inputFormat="xsl" body="true" head="false">
- <xsl:stylesheet version="1.1"
- xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+
+ <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="siteinfo-copyright" inputFormat="xsl">
+ <xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:java="http://xml.apache.org/xslt/java"
exclude-result-prefixes="java">
- <xsl:template name="siteinfo-copyright-body">
- <xsl:param name="siteinfo-copyright"/>
- Copyright ©
- <xsl:text> </xsl:text>
- <xsl:value-of select="$siteinfo-copyright/copyright/year"/>
- <xsl:call-template name="current-year">
- <xsl:with-param name="copyrightyear"
select="$siteinfo-copyright/copyright/year"/>
- </xsl:call-template>
- <xsl:text> </xsl:text>
- <xsl:choose>
- <xsl:when test="$siteinfo-copyright/copyright/copyright-link">
- <a>
- <xsl:attribute name="href">
- <xsl:value-of
select="$siteinfo-copyright/copyright/copyright-link"/>
- </xsl:attribute>
- <xsl:value-of select="$siteinfo-copyright/copyright/vendor"/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$siteinfo-copyright/copyright/vendor"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text> </xsl:text>
- <xsl:value-of select="$siteinfo-copyright/copyright/msg"/>
+ <xsl:param name="siteinfo-copyright"/>
+
+ <xsl:template match="/">
+ <forrest:content>
+ <forrest:part>
+ Copyright ©
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$siteinfo-copyright/copyright/year"/>
+ <xsl:call-template name="current-year">
+ <xsl:with-param name="copyrightyear"
select="$siteinfo-copyright/copyright/year"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:choose>
+ <xsl:when test="$siteinfo-copyright/copyright/copyright-link">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of
select="$siteinfo-copyright/copyright/copyright-link"/>
+ </xsl:attribute>
+ <xsl:value-of select="$siteinfo-copyright/copyright/vendor"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$siteinfo-copyright/copyright/vendor"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$siteinfo-copyright/copyright/msg"/>
+ </forrest:part>
+ </forrest:content>
</xsl:template>
<xsl:template name="current-year">
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=369506&r1=369505&r2=369506&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 08:13:52 2006
@@ -390,21 +390,17 @@
<forrest:hook class="lastmodified">
<forrest:contract name="siteinfo-last-published"/>
</forrest:hook>
- <!--
<forrest:hook class="copyright">
<forrest:contract name="siteinfo-copyright">
- <forrest:properties contract="siteinfo-copyright">
- <forrest:property name="siteinfo-copyright">
- <copyright>
- <year>2005</year>
- <vendor>The Acme Software Foundation.</vendor>
- </copyright>
- </forrest:property>
- </forrest:properties>
+ <forrest:property name="siteinfo-copyright">
+ <copyright>
+ <year inception="true">2002</year>
+ <vendor>The Apache Software Foundation.</vendor>
+
<copyright-link>http://www.apache.org/licenses/</copyright-link>
+ </copyright>
+ </forrest:property>
</forrest:contract>
</forrest:hook>
- -->
-
<forrest:contract name="siteinfo-compliance-links"/>
<forrest:contract name="siteinfo-credits">
<forrest:property name="box-location">credit</forrest:property>
@@ -418,13 +414,11 @@
<width>88</width>
<height>31</height>
</credit>
- <!-- FIXME - Problem chaining two hooks with the same name
(FOR-788)...
<credit role="accueil">
<name>Built with Cocoon</name>
<url>http://cocoon.apache.org/</url>
<image>http://forrest.apache.org/images/built-with-cocoon.gif</image>
</credit>
- -->
</credits>
</forrest:property>
</forrest:contract>