|
|
Choosing A Webhost: |
svn commit: r521332 - in /lenya/trunk/src: modules/news/ modules/news/confi: msg#00028cms.lenya.cvs
Author: andreas Date: Thu Mar 22 09:37:59 2007 New Revision: 521332 URL: http://svn.apache.org/viewvc?view=rev&rev=521332 Log: Added news module based on collection module. Added: lenya/trunk/src/modules/news/ lenya/trunk/src/modules/news/config/ lenya/trunk/src/modules/news/config/cocoon-xconf/ lenya/trunk/src/modules/news/config/cocoon-xconf/resourcetype-news.xconf lenya/trunk/src/modules/news/config/menu.xsp lenya/trunk/src/modules/news/menus.xmap lenya/trunk/src/modules/news/module.xml lenya/trunk/src/modules/news/resources/ lenya/trunk/src/modules/news/resources/i18n/ lenya/trunk/src/modules/news/resources/i18n/cmsui.xml lenya/trunk/src/modules/news/resources/i18n/cmsui_de.xml lenya/trunk/src/modules/news/resources/icons/ lenya/trunk/src/modules/news/resources/icons/news.gif (with props) lenya/trunk/src/modules/news/sitemap.xmap lenya/trunk/src/modules/news/xslt/ lenya/trunk/src/modules/news/xslt/collection2include.xsl lenya/trunk/src/modules/news/xslt/collection2xhtml.xsl lenya/trunk/src/pubs/default/example-content/news/ lenya/trunk/src/pubs/default/example-content/news/index_de lenya/trunk/src/pubs/default/example-content/news/index_de.meta lenya/trunk/src/pubs/default/example-content/news/index_en lenya/trunk/src/pubs/default/example-content/news/index_en.meta lenya/trunk/src/pubs/default/example-content/news/installed/ lenya/trunk/src/pubs/default/example-content/news/installed/index_de lenya/trunk/src/pubs/default/example-content/news/installed/index_de.meta lenya/trunk/src/pubs/default/example-content/news/installed/index_en lenya/trunk/src/pubs/default/example-content/news/installed/index_en.meta lenya/trunk/src/pubs/default/resources/shared/css/news.css Modified: lenya/trunk/src/pubs/default/config/publication.xconf lenya/trunk/src/pubs/default/example-content/sitetree.xml lenya/trunk/src/pubs/default/modules/homepage/sitemap.xmap lenya/trunk/src/pubs/default/modules/homepage/xslt/homepage2xhtml.xsl lenya/trunk/src/pubs/default/resources/shared/css/page.xml Added: lenya/trunk/src/modules/news/config/cocoon-xconf/resourcetype-news.xconf URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/config/cocoon-xconf/resourcetype-news.xconf?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/modules/news/config/cocoon-xconf/resourcetype-news.xconf (added) +++ lenya/trunk/src/modules/news/config/cocoon-xconf/resourcetype-news.xconf Thu Mar 22 09:37:59 2007 @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> + +<!-- $Id: doctypes.xconf 164635 2005-04-25 20:01:43Z tschlabach $ --> + +<xconf xpath="/cocoon/resource-types" unless="/cocoon/resource-types/component-instance[@name = 'news']"> + + <component-instance name="news" + logger="lenya.resourcetypes.news" + class="org.apache.lenya.cms.publication.ResourceTypeImpl"> + + <!-- Default time in seconds until the resource-type has expired --> + <expires seconds="3600" /> + + <sample-name>fallback://lenya/modules/collection/samples/children.xml</sample-name> + <format name="xhtml" uri="cocoon://modules/news/xhtml.xml"/> + <format name="include" uri="cocoon://modules/news/include.xml"/> + + </component-instance> + +</xconf> Added: lenya/trunk/src/modules/news/config/menu.xsp URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/config/menu.xsp?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/modules/news/config/menu.xsp (added) +++ lenya/trunk/src/modules/news/config/menu.xsp Thu Mar 22 09:37:59 2007 @@ -0,0 +1,47 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> + +<!-- $Id: generic.xsp 155806 2005-03-01 17:55:42Z andreas $ --> + +<xsp:page + language="java" + xmlns:xsp="http://apache.org/xsp" + xmlns:xsp-request="http://apache.org/xsp/request/2.0" + xmlns:input="http://apache.org/cocoon/xsp/input/1.0" + xmlns:i18n="http://apache.org/cocoon/i18n/2.1" + xmlns:wf="http://apache.org/cocoon/lenya/workflow/1.0" + xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0" + xmlns="http://apache.org/cocoon/lenya/menubar/1.0" +> + + <menu> + <menus> + <menu i18n:attr="name" name="File"> + <block areas="site authoring"> + <item uc:usecase="sitemanagement.create" href="?doctype=news&sample=Children"> + <i18n:translate> + <i18n:text>New Document</i18n:text> + <i18n:param>News</i18n:param> + </i18n:translate> + </item> + </block> + </menu> + </menus> + </menu> + +</xsp:page> Added: lenya/trunk/src/modules/news/menus.xmap URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/menus.xmap?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/modules/news/menus.xmap (added) +++ lenya/trunk/src/modules/news/menus.xmap Thu Mar 22 09:37:59 2007 @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> + +<!-- $Id: menus.xmap 178738 2005-05-27 03:42:09Z gregor $ --> + +<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> + + <map:pipelines> + + <map:pipeline> + + <map:match pattern="**"> + <map:generate type="serverpages" src="fallback://lenya/modules/news/config/menu.xsp"/> + <map:serialize type="xml"/> + </map:match> + + </map:pipeline> + + </map:pipelines> +</map:sitemap> Added: lenya/trunk/src/modules/news/module.xml URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/module.xml?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/modules/news/module.xml (added) +++ lenya/trunk/src/modules/news/module.xml Thu Mar 22 09:37:59 2007 @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> + +<!-- $Id: publication.xml 374687 2006-02-03 15:24:55Z michi $ --> + +<module xmlns="http://apache.org/lenya/module/1.0"> + <id>org.apache.lenya.modules.news</id> + <depends module="org.apache.lenya.modules.collection"/> + <package>org.apache.lenya.modules</package> + <version>0.1-dev</version> + <name>News</name> + <lenya-version>@lenya.version@</lenya-version> + <description>News feed</description> +</module> \ No newline at end of file Added: lenya/trunk/src/modules/news/resources/i18n/cmsui.xml URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/resources/i18n/cmsui.xml?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/modules/news/resources/i18n/cmsui.xml (added) +++ lenya/trunk/src/modules/news/resources/i18n/cmsui.xml Thu Mar 22 09:37:59 2007 @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> + +<!-- $Id: cmsui.xml 447395 2006-09-18 13:01:33Z andreas $ --> + +<catalogue xml:lang="en" xmlns:xhtml="http://www.w3.org/1999/xhtml"> + + <message key="new-news-message-hint">To add a new news message, choose 'File' -> 'New XHTML Document'.</message> + +</catalogue> Added: lenya/trunk/src/modules/news/resources/i18n/cmsui_de.xml URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/resources/i18n/cmsui_de.xml?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/modules/news/resources/i18n/cmsui_de.xml (added) +++ lenya/trunk/src/modules/news/resources/i18n/cmsui_de.xml Thu Mar 22 09:37:59 2007 @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> + +<!-- $Id: cmsui.xml 447395 2006-09-18 13:01:33Z andreas $ --> + +<catalogue xml:lang="de" xmlns:xhtml="http://www.w3.org/1999/xhtml"> + + <message key="new-news-message-hint"> + Um eine neue News-Meldung zu erstellen, + wählen Sie 'Datei' -> 'Neues News-Dokument'. + </message> + +</catalogue> Added: lenya/trunk/src/modules/news/resources/icons/news.gif URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/resources/icons/news.gif?view=auto&rev=521332 ============================================================================== Binary file - no diff available. Propchange: lenya/trunk/src/modules/news/resources/icons/news.gif ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: lenya/trunk/src/modules/news/sitemap.xmap URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/sitemap.xmap?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/modules/news/sitemap.xmap (added) +++ lenya/trunk/src/modules/news/sitemap.xmap Thu Mar 22 09:37:59 2007 @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> + +<!-- $Id: doctypes.xmap 179488 2005-06-02 02:29:39Z gregor $ --> + +<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> + +<!-- =========================== Components ================================ --> + + <map:components> + + <map:serializers default="xhtml"> + <map:serializer name="xml-get" src="org.apache.cocoon.serialization.XMLSerializer" mime-type="text/xml"> + <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public> + <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system> + <encoding>UTF-8</encoding> + </map:serializer> + </map:serializers> + + </map:components> + + <map:pipelines> + + <map:pipeline> + + <!-- parametrized doctype matcher --> + <!-- pattern="{rendertype}" --> + <map:match pattern="*.xml"> + <map:generate src="cocoon:/{1}.xml/{page-envelope:publication-id}/{page-envelope:area}/{page-envelope:document-uuid}/{page-envelope:document-language}"/> + <map:serialize type="xml"/> + </map:match> + + <map:match pattern="*.xml/*/*/*/*"> + <map:generate src="lenya-document:{4},pub={2},area={3},lang={5}{link:rev}"/> + <map:transform src="fallback://lenya/modules/collection/xslt/collection2cinclude.xsl"> + <map:parameter name="uuid" value="{4}"/> + </map:transform> + <map:transform type="cinclude"/> + <map:transform src="fallback://lenya/modules/news/xslt/collection2{1}.xsl"> + <map:parameter name="rendertype" value="{request-param:rendertype}"/> + <map:parameter name="language" value="{5}"/> + <map:parameter name="title" value=""/> + <map:parameter name="area" value="{3}"/> + </map:transform> + <map:serialize type="xml"/> + </map:match> + + <map:match pattern="icon/*/*/*/*"> + <map:read src="fallback://lenya/modules/news/resources/icons/news.gif"/> + </map:match> + + </map:pipeline> + + </map:pipelines> +</map:sitemap> Added: lenya/trunk/src/modules/news/xslt/collection2include.xsl URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/xslt/collection2include.xsl?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/modules/news/xslt/collection2include.xsl (added) +++ lenya/trunk/src/modules/news/xslt/collection2include.xsl Thu Mar 22 09:37:59 2007 @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> + +<!-- $Id: xhtml2xhtml.xsl 201776 2005-06-25 18:25:26Z gregor $ --> + +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:xhtml="http://www.w3.org/1999/xhtml" + xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:col="http://apache.org/cocoon/lenya/collection/1.0" + xmlns:meta="http://apache.org/cocoon/lenya/metadata/1.0" + xmlns:i18n="http://apache.org/cocoon/i18n/2.1" + exclude-result-prefixes="xhtml lenya col meta dc i18n" + > + + <xsl:import href="fallback://lenya/modules/news/xslt/collection2xhtml.xsl"/> + + <xsl:param name="rendertype" select="''"/> + <xsl:param name="nodeid"/> + <xsl:param name="language"/> + + + <xsl:template match="/col:collection"> + <xsl:variable name="title" select="meta:metadata/dc:elements/dc:title"/> + <div id="news"> + <h1><xsl:value-of select="$title"/></h1> + <xsl:apply-templates select="col:document"> + <xsl:sort order="descending" select="meta:metadata/dc:elements/dc:date"/> + </xsl:apply-templates> + </div> + </xsl:template> + + +</xsl:stylesheet> Added: lenya/trunk/src/modules/news/xslt/collection2xhtml.xsl URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/xslt/collection2xhtml.xsl?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/modules/news/xslt/collection2xhtml.xsl (added) +++ lenya/trunk/src/modules/news/xslt/collection2xhtml.xsl Thu Mar 22 09:37:59 2007 @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> + +<!-- $Id: xhtml2xhtml.xsl 201776 2005-06-25 18:25:26Z gregor $ --> + +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:xhtml="http://www.w3.org/1999/xhtml" + xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:col="http://apache.org/cocoon/lenya/collection/1.0" + xmlns:meta="http://apache.org/cocoon/lenya/metadata/1.0" + xmlns:i18n="http://apache.org/cocoon/i18n/2.1" + exclude-result-prefixes="xhtml lenya col meta dc i18n" + > + + <xsl:include href="fallback://lenya/modules/xhtml/xslt/helper-object.xsl"/> + + <xsl:param name="rendertype" select="''"/> + <xsl:param name="nodeid"/> + <xsl:param name="language"/> + <xsl:param name="area"/> + + + <xsl:template match="/col:collection"> + <xsl:variable name="title" select="meta:metadata/dc:elements/dc:title"/> + <html> + <body> + <div id="body"> + <h1><xsl:value-of select="$title"/></h1> + + <xsl:if test="$area = 'authoring'"> + <p style="color: #999999;"> + <i18n:text>new-news-message-hint</i18n:text> + </p> + </xsl:if> + + <xsl:apply-templates select="col:document"> + <xsl:sort order="descending" select="meta:metadata/dc:elements/dc:date"/> + </xsl:apply-templates> + </div> + </body> + </html> + </xsl:template> + + + <xsl:template match="col:document"> + <xsl:variable name="date" select="meta:metadata/dc:elements/dc:date"/> + <xsl:variable name="title" select="meta:metadata/dc:elements/dc:title"/> + <h2> + <div class="newsDate"> + <i18n:date-time src-pattern="yyyy-MM-dd hh:mm:ss" locale="{$language}" value="{$date}" /> + </div> + <a href="lenya-document:{@uuid}" style="text-decoration: none"><xsl:value-of select="$title"/></a> + </h2> + <xsl:apply-templates select="xhtml:html/xhtml:body/xhtml:p[1]"/> + </xsl:template> + + + <xsl:template match="@*|node()"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> + </xsl:template> + + +</xsl:stylesheet> Modified: lenya/trunk/src/pubs/default/config/publication.xconf URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/config/publication.xconf?view=diff&rev=521332&r1=521331&r2=521332 ============================================================================== --- lenya/trunk/src/pubs/default/config/publication.xconf (original) +++ lenya/trunk/src/pubs/default/config/publication.xconf Thu Mar 22 09:37:59 2007 @@ -42,6 +42,7 @@ <resource-type name="opendocument" workflow="fallback://config/workflow/workflow.xml"/> <resource-type name="resource" workflow="fallback://config/workflow/workflow.xml"/> <resource-type name="usecase" workflow="fallback://config/workflow/workflow.xml"/> + <resource-type name="news" workflow="fallback://config/workflow/workflow.xml"/> <!-- NOTE: Modules need to be listed because of the menu and i18n --> <module name="editors"/> @@ -61,6 +62,7 @@ <module name="development"/> <module name="languageselector"/> <module name="administration"/> + <module name="news"/> <!-- TODO: The goal is to have a blog module ;-) --> <!-- <module name="blog"/> Added: lenya/trunk/src/pubs/default/example-content/news/index_de URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/example-content/news/index_de?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/pubs/default/example-content/news/index_de (added) +++ lenya/trunk/src/pubs/default/example-content/news/index_de Thu Mar 22 09:37:59 2007 @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<collection xmlns="http://apache.org/cocoon/lenya/collection/1.0" type="children"/> Added: lenya/trunk/src/pubs/default/example-content/news/index_de.meta URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/example-content/news/index_de.meta?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/pubs/default/example-content/news/index_de.meta (added) +++ lenya/trunk/src/pubs/default/example-content/news/index_de.meta Thu Mar 22 09:37:59 2007 @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> +<!-- $Id: index_en.meta 473861 2006-11-12 03:51:14Z gregor $ --> +<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"> +<lenya:meta> +<lenya:internal> +<lenya:resourceType>news</lenya:resourceType> +<lenya:contentType>xml</lenya:contentType> +</lenya:internal> +<lenya:dc> + <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">News</dc:title> + <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator> + <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">News</dc:subject> + <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">A news page</dc:description> + <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher> + <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2007-03-22 15:53:25</dc:date> + <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">de</dc:language> + <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">All rights reserved</dc:rights> +</lenya:dc> +</lenya:meta> +</lenya:document> \ No newline at end of file Added: lenya/trunk/src/pubs/default/example-content/news/index_en URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/example-content/news/index_en?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/pubs/default/example-content/news/index_en (added) +++ lenya/trunk/src/pubs/default/example-content/news/index_en Thu Mar 22 09:37:59 2007 @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<collection xmlns="http://apache.org/cocoon/lenya/collection/1.0" type="children"/> Added: lenya/trunk/src/pubs/default/example-content/news/index_en.meta URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/example-content/news/index_en.meta?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/pubs/default/example-content/news/index_en.meta (added) +++ lenya/trunk/src/pubs/default/example-content/news/index_en.meta Thu Mar 22 09:37:59 2007 @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> +<!-- $Id: index_en.meta 473861 2006-11-12 03:51:14Z gregor $ --> +<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"> +<lenya:meta> +<lenya:internal> +<lenya:resourceType>news</lenya:resourceType> +<lenya:contentType>xml</lenya:contentType> +</lenya:internal> +<lenya:dc> + <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">News</dc:title> + <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator> + <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">News</dc:subject> + <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">A news page</dc:description> + <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher> + <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2007-03-22 15:53:25</dc:date> + <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">en</dc:language> + <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">All rights reserved</dc:rights> +</lenya:dc> +</lenya:meta> +</lenya:document> \ No newline at end of file Added: lenya/trunk/src/pubs/default/example-content/news/installed/index_de URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/example-content/news/installed/index_de?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/pubs/default/example-content/news/installed/index_de (added) +++ lenya/trunk/src/pubs/default/example-content/news/installed/index_de Thu Mar 22 09:37:59 2007 @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<html xmlns="http://www.w3.org/1999/xhtml" +xmlns:xhtml="http://www.w3.org/1999/xhtml" +xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> + +<!-- $Id: index_en 473861 2006-11-12 03:51:14Z gregor $ --> + <head> + <title>Lenya erfolgreich installiert</title> + </head> + <body> + + <h1>Lenya erfolgreich installiert</h1> + + <p>Herzlichen Glückwunsch, Sie haben Lenya erfolgreich installiert und den Beispiel-Inhalt importiert!</p> + + <p>Dieser Text wird nicht auf der News-Ãbersicht erscheinen, da dort nur der erste Absatz dargestellt wird.</p> + + </body> +</html> Added: lenya/trunk/src/pubs/default/example-content/news/installed/index_de.meta URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/example-content/news/installed/index_de.meta?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/pubs/default/example-content/news/installed/index_de.meta (added) +++ lenya/trunk/src/pubs/default/example-content/news/installed/index_de.meta Thu Mar 22 09:37:59 2007 @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> +<!-- $Id: index_en.meta 473861 2006-11-12 03:51:14Z gregor $ --> +<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"> +<lenya:meta> +<lenya:internal> +<lenya:resourceType>xhtml</lenya:resourceType> +<lenya:contentType>xml</lenya:contentType> +</lenya:internal> +<lenya:dc> + <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya erfolgreich installiert</dc:title> + <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator> + <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya erfolgreich installiert</dc:subject> + <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">A news message.</dc:description> + <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher> + <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2007-03-22 15:54:35</dc:date> + <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">de</dc:language> + <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">All rights reserved</dc:rights> +</lenya:dc> +</lenya:meta> +</lenya:document> \ No newline at end of file Added: lenya/trunk/src/pubs/default/example-content/news/installed/index_en URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/example-content/news/installed/index_en?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/pubs/default/example-content/news/installed/index_en (added) +++ lenya/trunk/src/pubs/default/example-content/news/installed/index_en Thu Mar 22 09:37:59 2007 @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<html xmlns="http://www.w3.org/1999/xhtml" +xmlns:xhtml="http://www.w3.org/1999/xhtml" +xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> + +<!-- $Id: index_en 473861 2006-11-12 03:51:14Z gregor $ --> + <head> + <title>Lenya Successfully Installed</title> + </head> + <body> + + <h1>Lenya Successfully Installed</h1> + + <p>Congratulations, you have successfully installed Lenya and imported the example content!</p> + + <p>This text will not appear in the news overview, since only the first paragraph is displayed there.</p> + + </body> +</html> Added: lenya/trunk/src/pubs/default/example-content/news/installed/index_en.meta URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/example-content/news/installed/index_en.meta?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/pubs/default/example-content/news/installed/index_en.meta (added) +++ lenya/trunk/src/pubs/default/example-content/news/installed/index_en.meta Thu Mar 22 09:37:59 2007 @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. +--> +<!-- $Id: index_en.meta 473861 2006-11-12 03:51:14Z gregor $ --> +<lenya:document xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"> +<lenya:meta> +<lenya:internal> +<lenya:resourceType>xhtml</lenya:resourceType> +<lenya:contentType>xml</lenya:contentType> +</lenya:internal> +<lenya:dc> + <dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Successfully Installed</dc:title> + <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Development Team</dc:creator> + <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">Lenya Successfully Installed</dc:subject> + <dc:description xmlns:dc="http://purl.org/dc/elements/1.1/">A news message.</dc:description> + <dc:publisher xmlns:dc="http://purl.org/dc/elements/1.1/">Apache Software Foundation</dc:publisher> + <dc:contributor xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">2007-03-22 15:54:35</dc:date> + <dc:type xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:format xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:source xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">en</dc:language> + <dc:relation xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:coverage xmlns:dc="http://purl.org/dc/elements/1.1/"/> + <dc:rights xmlns:dc="http://purl.org/dc/elements/1.1/">All rights reserved</dc:rights> +</lenya:dc> +</lenya:meta> +</lenya:document> \ No newline at end of file Modified: lenya/trunk/src/pubs/default/example-content/sitetree.xml URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/example-content/sitetree.xml?view=diff&rev=521332&r1=521331&r2=521332 ============================================================================== --- lenya/trunk/src/pubs/default/example-content/sitetree.xml (original) +++ lenya/trunk/src/pubs/default/example-content/sitetree.xml Thu Mar 22 09:37:59 2007 @@ -63,4 +63,13 @@ <label xml:lang="en">Search</label> </node> + <node id="news" visibleinnav="true"> + <label xml:lang="en">News</label> + <label xml:lang="de">News</label> + <node id="installed" visibleinnav="false"> + <label xml:lang="en">Lenya installed</label> + <label xml:lang="de">Lenya installiert</label> + </node> + </node> + </site> Modified: lenya/trunk/src/pubs/default/modules/homepage/sitemap.xmap URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/modules/homepage/sitemap.xmap?view=diff&rev=521332&r1=521331&r2=521332 ============================================================================== --- lenya/trunk/src/pubs/default/modules/homepage/sitemap.xmap (original) +++ lenya/trunk/src/pubs/default/modules/homepage/sitemap.xmap Thu Mar 22 09:37:59 2007 @@ -37,6 +37,18 @@ <map:serialize type="xml"/> </map:match> </map:match> + + <map:match pattern="news_*.xml"> + <map:select type="resource-exists"> + <map:when test="site:/{1}/news?format=include"> + <map:generate src="site:/{1}/news?format=include"/> + </map:when> + <map:otherwise> + <map:generate src="fallback://lenya/content/util/empty.xml"/> + </map:otherwise> + </map:select> + <map:serialize type="xml"/> + </map:match> <!-- parametrized doctype matcher --> <!-- pattern="{rendertype}" --> @@ -49,6 +61,7 @@ <map:parameter name="pubId" value="{page-envelope:publication-id}"/> <map:parameter name="contextPath" value="{request:contextPath}"/> </map:transform> + <map:transform type="cinclude"/> <map:serialize type="xml"/> </map:match> Modified: lenya/trunk/src/pubs/default/modules/homepage/xslt/homepage2xhtml.xsl URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/modules/homepage/xslt/homepage2xhtml.xsl?view=diff&rev=521332&r1=521331&r2=521332 ============================================================================== --- lenya/trunk/src/pubs/default/modules/homepage/xslt/homepage2xhtml.xsl (original) +++ lenya/trunk/src/pubs/default/modules/homepage/xslt/homepage2xhtml.xsl Thu Mar 22 09:37:59 2007 @@ -20,13 +20,16 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml" - xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" + xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" + xmlns:ci="http://apache.org/cocoon/include/1.0" > <xsl:import href="fallback://lenya/modules/xhtml/xslt/xhtml2xhtml.xsl"/> <xsl:param name="pubId"/> <xsl:param name="contextPath"/> + <xsl:param name="language"/> + <xsl:param name="newsPath"/> <xsl:template match="/xhtml:html"> <xsl:copy-of select="lenya:meta"/> @@ -39,6 +42,7 @@ <xsl:if test="$rendertype = 'edit'"> <xsl:attribute name="bxe_xpath">/xhtml:html/xhtml:body</xsl:attribute> </xsl:if> + <ci:include src="cocoon:/news_{$language}.xml"/> <xsl:apply-templates select="xhtml:body/node()"/> </div> </body> Added: lenya/trunk/src/pubs/default/resources/shared/css/news.css URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/resources/shared/css/news.css?view=auto&rev=521332 ============================================================================== --- lenya/trunk/src/pubs/default/resources/shared/css/news.css (added) +++ lenya/trunk/src/pubs/default/resources/shared/css/news.css Thu Mar 22 09:37:59 2007 @@ -0,0 +1,46 @@ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You 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. +*/ + +div.newsDate { + font-size: small; + font-weight: normal; + float: right +} + + +div#news { + clear: both; + float: right; + width: 30%; + border: solid 1px #BB9999; + margin: 0px 10px 10px 10px; + background-color: #FFEEEE; +} + +div#news h1 { + font-size: medium; + margin: 0; + padding: 0; +} + +div#news h2 { + font-size: small; + margin-top: 10px; +} + +div#news h2 div { +} \ No newline at end of file Modified: lenya/trunk/src/pubs/default/resources/shared/css/page.xml URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/resources/shared/css/page.xml?view=diff&rev=521332&r1=521331&r2=521332 ============================================================================== --- lenya/trunk/src/pubs/default/resources/shared/css/page.xml (original) +++ lenya/trunk/src/pubs/default/resources/shared/css/page.xml Thu Mar 22 09:37:59 2007 @@ -19,6 +19,8 @@ /* page */ +@import url("news.css"); + #page { padding: 0px; margin: 0px;
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |