svn commit: r733410 - in /ofbiz/trunk/specialpurpose/cmssite: data/CmsSiteDemoData.xml template/cms/HtmlHead.ftl template/cms/MainDecorator.ftl widget/ widget/CmssiteScreens.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r733410 - in /ofbiz/trunk/specialpurpose/cmssite: data/CmsSiteDemoData.xml template/cms/HtmlHead.ftl template/cms/MainDecorator.ftl widget/ widget/CmssiteScreens.xml

hansbak-2
Author: hansbak
Date: Sat Jan 10 18:26:26 2009
New Revision: 733410

URL: http://svn.apache.org/viewvc?rev=733410&view=rev
Log:
inserted demo data to show the usage of screen widgets in cmssite

Added:
    ofbiz/trunk/specialpurpose/cmssite/widget/
    ofbiz/trunk/specialpurpose/cmssite/widget/CmssiteScreens.xml   (with props)
Modified:
    ofbiz/trunk/specialpurpose/cmssite/data/CmsSiteDemoData.xml
    ofbiz/trunk/specialpurpose/cmssite/template/cms/HtmlHead.ftl
    ofbiz/trunk/specialpurpose/cmssite/template/cms/MainDecorator.ftl

Modified: ofbiz/trunk/specialpurpose/cmssite/data/CmsSiteDemoData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/cmssite/data/CmsSiteDemoData.xml?rev=733410&r1=733409&r2=733410&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/cmssite/data/CmsSiteDemoData.xml (original)
+++ ofbiz/trunk/specialpurpose/cmssite/data/CmsSiteDemoData.xml Sat Jan 10 18:26:26 2009
@@ -58,6 +58,8 @@
                 <hr/>
                 <div>This is the footer!</div>
             </div>
+            </body>
+            </html>
             ]]></textData>
     </ElectronicText>
     <Content contentId="CMSS_DEMO_FOOTER" contentTypeId="DOCUMENT" contentName="CMS Site Demo Footer" dataResourceId="CMSS_DEMO_FOOTER"/>
@@ -76,6 +78,7 @@
                 <div><a href="/cmssite/cms/CMSS_DEMO_PAGE1">Demo Page 1 - Hard Coded Link</a></div>
                 <div><a href="/cmssite/cms/CMSS_PPOINT/demoPage1">Demo Page 1 - Hard Coded Link using the Sub-Content Pattern</a></div>
                 <div><a href="${thisContent.content.CMSS_DEMO_PAGE1.link}">Demo Page 1 - Dynamic Link</a></div>
+                <div><a href="${thisContent.content.CMSS_DEMO_SCREEN.link}">Demo Page with screen widget and screen decorator</a></div>
             </div>
             ]]></textData>
     </ElectronicText>
@@ -109,6 +112,11 @@
     <Content contentId="CMSS_DEMO_PAGE1_FTR" contentTypeId="DOCUMENT" contentName="CMS Site Demo Page 1_2" dataResourceId="CMSS_DEMO_PAGE1_FTR"/>
     <ContentAssoc contentId="CMSS_DEMO_PAGE1" contentIdTo="CMSS_DEMO_PAGE1_FTR" contentAssocTypeId="SUB_CONTENT" mapKey="footer" fromDate="2001-01-01 00:00:00"/>
 
+    <DataResource dataResourceId="CMSS_DEMO_SCREEN" dataResourceTypeId="URL_RESOURCE" dataTemplateTypeId="SCREEN_COMBINED" objectInfo="component://cmssite/widget/CmssiteScreens.xml#testScreen"/>
+    <Content contentId="CMSS_DEMO_SCREEN" contentTypeId="DOCUMENT" contentName="CMS Site Demo screen/decorator example" dataResourceId="CMSS_DEMO_SCREEN"/>
+    <ContentAssoc contentId="CMSS_PPOINT" contentIdTo="CMSS_DEMO_SCREEN" contentAssocTypeId="SUB_CONTENT" fromDate="2001-01-01 00:00:00"/>
+    
+
     <!--
       CmsSite (WebSite)
        |___(WebSiteContent of type DEFAULT_PAGE)_____> CMSS_DEMO_HOME (Content of type DOCUMENT with decorator CMSS_DEC)

Modified: ofbiz/trunk/specialpurpose/cmssite/template/cms/HtmlHead.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/cmssite/template/cms/HtmlHead.ftl?rev=733410&r1=733409&r2=733410&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/cmssite/template/cms/HtmlHead.ftl (original)
+++ ofbiz/trunk/specialpurpose/cmssite/template/cms/HtmlHead.ftl Sat Jan 10 18:26:26 2009
@@ -16,6 +16,10 @@
 specific language governing permissions and limitations
 under the License.
 -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     <title>${(decoratedContent.subcontent.title.render)?default("CMS Site Generic Title (Set subcontent 'title' on your content!)")}</title>
     <link rel="shortcut icon" href="/images/ofbiz.ico" />    
@@ -30,3 +34,6 @@
     
     <meta name="description" content="${(decoratedContent.subcontent.metaDescription.render)?default("")}"/>
     <meta name="keywords" content="${(decoratedContent.subcontent.metaKeywords.render)?default("")}"/>
+</head>
+<body>
+    
\ No newline at end of file

Modified: ofbiz/trunk/specialpurpose/cmssite/template/cms/MainDecorator.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/cmssite/template/cms/MainDecorator.ftl?rev=733410&r1=733409&r2=733410&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/cmssite/template/cms/MainDecorator.ftl (original)
+++ ofbiz/trunk/specialpurpose/cmssite/template/cms/MainDecorator.ftl Sat Jan 10 18:26:26 2009
@@ -17,18 +17,9 @@
 under the License.
 -->
 
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
 ${(decoratedContent.subcontent.htmlHead)?default((thisContent.subcontent.htmlHead)?if_exists)}
-</head>
-
-<body>
 ${(decoratedContent.subcontent.header)?default((thisContent.subcontent.header)?if_exists)}
 
 ${decoratedContent}
 
 ${(decoratedContent.subcontent.footer)?default((thisContent.subcontent.footer)?if_exists)}
-</body>
-</html>

Added: ofbiz/trunk/specialpurpose/cmssite/widget/CmssiteScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/cmssite/widget/CmssiteScreens.xml?rev=733410&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/cmssite/widget/CmssiteScreens.xml (added)
+++ ofbiz/trunk/specialpurpose/cmssite/widget/CmssiteScreens.xml Sat Jan 10 18:26:26 2009
@@ -0,0 +1,50 @@
+<?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.
+-->
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-screen.xsd">
+
+    <screen name="main-decorator">
+        <section>
+            <widgets>
+                <platform-specific><html>
+                    <html-template location="component://cmssite/template/cms/HtmlHead.ftl"/>
+                </html></platform-specific>
+                <content content-id="CMSS_DEMO_HEADER"/>
+                <decorator-section-include name="body"/>
+                <content content-id="CMSS_DEMO_FOOTER"/>
+            </widgets>
+        </section>
+    </screen>
+
+
+    <screen name="testScreen">
+        <section>
+            <widgets>
+                <decorator-screen name="main-decorator">
+                    <decorator-section name="body">
+                        <label style="h2" text="example with screen decorator and widget"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+
+</screens>
\ No newline at end of file

Propchange: ofbiz/trunk/specialpurpose/cmssite/widget/CmssiteScreens.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/cmssite/widget/CmssiteScreens.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/cmssite/widget/CmssiteScreens.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml