svn commit: r510691 - in /ofbiz/trunk/applications/content: webapp/content/WEB-INF/ webapp/content/WEB-INF/actions/website/ webapp/content/website/ widget/

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

svn commit: r510691 - in /ofbiz/trunk/applications/content: webapp/content/WEB-INF/ webapp/content/WEB-INF/actions/website/ webapp/content/website/ widget/

jaz-3
Author: jaz
Date: Thu Feb 22 14:20:19 2007
New Revision: 510691

URL: http://svn.apache.org/viewvc?view=rev&rev=510691
Log:
added dojo based WebSite CMS admin sreens; very rough pass

Added:
    ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.bsh   (with props)
    ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSContent.ftl   (with props)
    ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSEditor.ftl   (with props)
    ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSNav.ftl   (with props)
    ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSPathAlias.ftl   (with props)
Modified:
    ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml
    ofbiz/trunk/applications/content/webapp/content/website/WebSiteForms.xml
    ofbiz/trunk/applications/content/webapp/content/website/WebSiteTabBar.ftl
    ofbiz/trunk/applications/content/widget/WebSiteScreens.xml

Added: ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.bsh?view=auto&rev=510691
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.bsh (added)
+++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.bsh Thu Feb 22 14:20:19 2007
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+import org.ofbiz.base.util.*;
+import org.ofbiz.entity.*;
+import org.ofbiz.entity.util.*;
+
+Map lookupMap = UtilMisc.toMap("webSiteId", webSiteId, "webSiteContentTypeId", "PUBLISH_POINT");
+
+List webSiteContents = delegator.findByAnd("WebSiteContent", lookupMap, UtilMisc.toList("-fromDate"));
+webSiteContents = EntityUtil.filterByDate(webSiteContents);
+webSiteContent = EntityUtil.getFirst(webSiteContents);
+content = webSiteContent.getRelatedOne("Content");
+contentRoot = content.getString("contentId");
+
+publishPoint = delegator.findByPrimaryKey("WebSitePublishPoint", UtilMisc.toMap("contentId", contentRoot));
+
+context.put("contentRoot", contentRoot);
+context.put("content", content);
+context.put("publishPoint", publishPoint);
+
+// get all subsite content for the publish point
+List subsites = delegator.findByAnd("ContentAssoc", UtilMisc.toMap("contentId", contentRoot, "contentAssocTypeId", "SUBSITE"));
+context.put("subsites", subsites);
\ No newline at end of file

Propchange: ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.bsh
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.bsh
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml?view=diff&rev=510691&r1=510690&r2=510691
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml Thu Feb 22 14:20:19 2007
@@ -26,6 +26,7 @@
     
     <handler name="java" type="request" class="org.ofbiz.webapp.event.JavaEventHandler"/>
     <handler name="soap" type="request" class="org.ofbiz.webapp.event.SOAPEventHandler"/>
+    <handler name="json" type="request" class="org.ofbiz.webapp.event.JSONServiceEventHandler"/>
     <handler name="service" type="request" class="org.ofbiz.webapp.event.ServiceEventHandler"/>
     <handler name="service-multi" type="request" class="org.ofbiz.webapp.event.ServiceMultiEventHandler"/>
     <handler name="simple" type="request" class="org.ofbiz.webapp.event.SimpleEventHandler"/>
@@ -71,6 +72,7 @@
 
     <!-- Request Mappings -->
     <request-map uri="view"><security https="false" auth="false"/><response name="success" type="view" value="main"/></request-map>
+    <request-map uri="views"><security https="true" auth="false"/><response name="success" type="view" value="main"/></request-map>
     
     <request-map uri="chain">
         <event type="java" path="org.ofbiz.webapp.event.TestEvent" invoke="test"/>
@@ -221,15 +223,39 @@
         <response name="success" type="view" value="EditWebSite"/>
         <response name="error" type="view" value="EditWebSite"/>
     </request-map>
-    
+
+    <!-- ================ WebSite Content Requests ================= -->
+    <request-map uri="ListWebSiteContent">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="WebSiteContent"/>
+    </request-map>
+    <request-map uri="CreateWebSiteContent">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createWebSiteContent"/>
+        <response name="success" type="view" value="WebSiteContent"/>
+        <response name="error" type="view" value="WebSiteContent"/>
+    </request-map>
+    <request-map uri="UpdateWebSiteContent">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateWebSiteContent"/>
+        <response name="success" type="view" value="WebSiteContent"/>
+        <response name="error" type="view" value="WebSiteContent"/>
+    </request-map>
+    <request-map uri="RemoveWebSiteContent">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="removeWebSiteContent"/>
+        <response name="success" type="view" value="WebSiteContent"/>
+        <response name="error" type="view" value="WebSiteContent"/>
+    </request-map>
+
     <!-- ================ WebSite Parties Requests ================= -->
     <request-map uri="EditWebSiteParties">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditWebSiteParties"/>
     </request-map>
-    <request-map uri="addWebSiteRole">
+    <request-map uri="createWebSiteRole">
         <security https="true" auth="true"/>
-        <event type="service" path="" invoke="addWebSiteRole"/>
+        <event type="service" path="" invoke="createWebSiteRole"/>
         <response name="success" type="view" value="EditWebSiteParties"/>
         <response name="error" type="view" value="EditWebSiteParties"/>
     </request-map>
@@ -246,6 +272,42 @@
         <response name="error" type="view" value="EditWebSiteParties"/>
     </request-map>
 
+    <!-- ================ WebSite CMS Requests ================= -->
+    <request-map uri="WebSiteCms">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="WebSiteCMS"/>
+    </request-map>
+    <request-map uri="createTextContentCms">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createTextContent"/>
+        <response name="success" type="request-redirect" value="WebSiteCms"/>
+        <response name="error" type="view" value="WebSiteCMS"/>
+    </request-map>
+    <request-map uri="updateTextContentCms">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateTextContent"/>
+        <response name="success" type="request-redirect" value="WebSiteCms"/>
+        <response name="error" type="view" value="WebSiteCMS"/>
+    </request-map>
+    <request-map uri="updateTextContentCms">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateTextContent"/>
+        <response name="success" type="request-redirect" value="WebSiteCms"/>
+        <response name="error" type="view" value="WebSiteCMS"/>
+    </request-map>
+    <request-map uri="createWebSitePathAliasJson">
+        <security https="true" auth="true"/>
+        <event type="json" invoke="createWebSitePathAlias"/>
+        <response name="success" type="none"/>
+        <response name="error" type="none"/>
+    </request-map>
+    <request-map uri="removeWebSitePathAliasJson">
+        <security https="true" auth="true"/>
+        <event type="json" invoke="removeWebSitePathAlias"/>
+        <response name="success" type="none"/>
+        <response name="error" type="none"/>
+    </request-map>
+
     <!-- ================ ContentType Requests ================= -->
     <request-map uri="EditContentType">
         <security auth="true" https="true"/>
@@ -683,21 +745,11 @@
         <response name="success" type="view" value="EditContent"/>
         <response name="error" type="view" value="AddContent"/>
     </request-map>
-    <!--request-map uri="AddContent">
-        <security auth="true" https="true"/>
-        <response name="success" type="view" value="AddContent"/>
-    </request-map-->
     <request-map uri="editContent">
         <security auth="true" https="true"/>
-        <!--
-        <event invoke="org/ofbiz/content/mruadd.bsh" path="" type="bsf" />
-        <event invoke="org/ofbiz/content/clearCurrentContent.bsh" path="" type="bsf" />
-        <response name="success" type="request" value="gotoContentP2"/>
-        -->
         <response name="success" type="view" value="EditContent"/>
     </request-map>
 
-
     <!-- Content Assoc requests -->
     <request-map uri="EditContentAssoc">
         <security auth="true" https="true"/>
@@ -1577,6 +1629,12 @@
     
     <view-map name="FindWebSite" page="component://content/widget/WebSiteScreens.xml#FindWebSite" type="screen"/>
     <view-map name="EditWebSite" page="component://content/widget/WebSiteScreens.xml#EditWebSite" type="screen"/>
+    <view-map name="WebSiteContent" page="component://content/widget/WebSiteScreens.xml#WebSiteContent" type="screen"/>
+    <view-map name="WebSiteCMS" page="component://content/widget/WebSiteScreens.xml#WebSiteCMS" type="screen"/>
+    <view-map name="WebSiteCMSContent" page="component://content/widget/WebSiteScreens.xml#WebSiteCMSContent" type="screen"/>
+    <view-map name="WebSiteCMSEditor" page="component://content/widget/WebSiteScreens.xml#WebSiteCMSEditor" type="screen"/>
+    <view-map name="WebSiteCMSPathAlias" page="component://content/widget/WebSiteScreens.xml#WebSiteCMSPathAlias" type="screen"/>
+    <view-map name="WebSiteCMSNav" page="component://content/widget/WebSiteScreens.xml#WebSiteCMSNav" type="screen"/>
     <view-map name="EditWebSiteParties" page="component://content/widget/WebSiteScreens.xml#EditWebSiteParties" type="screen"/>
     
     <view-map name="EditContentPurpose" page="component://content/widget/content/ContentScreens.xml#EditContentPurpose" type="screen"/>

Added: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSContent.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSContent.ftl?view=auto&rev=510691
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSContent.ftl (added)
+++ ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSContent.ftl Thu Feb 22 14:20:19 2007
@@ -0,0 +1,147 @@
+<#--
+  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.
+  -->
+
+<#if (!contentRoot?has_content)>
+    <#assign contentRoot = parameters.contentRoot/>
+</#if>
+<#assign formAction = "/createTextContentCms"/>
+<#if (content?has_content)>
+    <#assign formAction = "/updateTextContentCms"/>
+</#if>
+
+<!-- cms menu bar -->
+<div id="cmsmenu" style="margin-bottom: 8px;">
+    <#if (content?has_content)>
+        <a href="javascript:void(0);" onclick="javascript:callEditor();" class="tabButton">New Content</a>
+        <a href="javascript:void(0);" onclick="javascript:callEditor(true, '${content.contentId}');" class="tabButton">New SubContent</a>
+        <a href="javascript:void(0);" onclick="javascript:callPathAlias('${content.contentId}');" class="tabButton">New PathAlias</a>
+    </#if>
+</div>
+
+<#if (!content?has_content)>
+    <div class="tabletext" style="margin-bottom: 8px;">
+        New <b>${contentAssocTypeId?default("SUBSITE")}</b> attached to Content: ${contentIdFrom?default(contentRoot)}</b>
+    </div>
+</#if>
+
+<form name="cmsform" method="post" action="<@ofbizUrl>${formAction}</@ofbizUrl>" style="margin: 0;">
+    <#if (content?has_content)>
+        <input type="hidden" name="dataResourceId" value="${dataText.dataResourceId}"/>        
+        <input type="hidden" name="mimeTypeId" value="${content.mimeTypeId?default(mimeTypeId)}"/>
+        <input type="hidden" name="contentId" value="${content.contentId}"/>
+
+        <#list requestParameters.keySet() as paramName>
+            <#if (paramName == 'contentIdFrom' || paramName == 'contentAssocTypeId' || paramName == 'fromDate')>
+                <input type="hidden" name="${paramName}" value="${requestParameters.get(paramName)}"/>
+            </#if>
+        </#list>
+    <#else>
+        <input type="hidden" name="contentAssocTypeId" value="${contentAssocTypeId?default('SUBSITE')}"/>
+        <input type="hidden" name="ownerContentId" value="${contentIdFrom?default(contentRoot)}"/>
+        <input type="hidden" name="contentIdFrom" value="${contentIdFrom?default(contentRoot)}"/>
+        <input type="hidden" name="mimeTypeId" value="${mimeTypeId}"/>
+    </#if>
+    <input type="hidden" name="webSiteId" value="${webSiteId}"/>
+              
+    <table>
+      <#if (content?has_content)>
+        <tr>
+            <td><div class="tableheadtext">Content ID</div></td>
+            <td><div class="tabletext">${content.contentId}</div></td>
+        </tr>
+      </#if>
+      <tr>
+        <td><div class="tableheadtext">Name</div></td>
+        <td>
+            <input type="text" name="contentName" class="inputBox" value="${(content.contentName)?if_exists}" size="40"/>
+        </td>
+      </tr>
+      <tr>
+        <td><div class="tableheadtext">Description</div></td>
+        <td>
+            <textarea name="description" class="inputBox" cols="40" rows="6">${(content.description)?if_exists}</textarea>
+        </td>
+      </tr>
+      <tr>
+        <td><div class="tableheadtext">Key</div></td>
+        <td>
+            <input type="text" name="mapKey" class="inputBox" value="${(assoc.mapKey)?if_exists}" size="40"/>
+        </td>
+      </tr>
+      <tr>
+        <td><div class="tableheadtext">Data Type</div></td>
+        <td>
+            <select name="dataTemplateTypeId" class="selectBox">
+                <#if (dataResource?has_content)>
+                    <#if (dataResource.dataTemplateTypeId?has_content)>
+                        <#assign thisType = dataResource.getRelatedOne("DataTemplateType")?if_exists/>
+                        <option type="${thisType.dataTemplateTypeId}">${thisType.description}</option>
+                        <option type="${thisType.dataTemplateTypeId}">----</option>
+                    </#if>
+                </#if>
+                <#list templateTypes as type>
+                    <option value="${type.dataTemplateTypeId}">${type.description}</option>
+                </#list>
+            </select>
+        </td>
+      </tr>
+      <tr>
+        <td><div class="tableheadtext">Template</div></td>
+        <td>
+            <select name="templateDataResourceId" class="selectBox">
+                <#if (content?has_content)>
+                    <#if (content.templateDataResourceId?has_content && content.templateDataResourceId != "NONE")>
+                        <#assign template = content.getRelatedOne("TemplateDataResource")/>
+                        <option value="${template.dataResourceId}">${template.dataResourceName}</option>
+                        <option value="${template.dataResourceId}">----</option>
+                    </#if>
+                </#if>
+                <option value="">None</option>
+                <#list templates as template>
+                    <option value="${template.dataResourceId}">${template.dataResourceName}</option>                  
+                </#list>
+            </select>
+        </td>
+      </tr>
+      <tr>
+        <td><div class="tableheadtext">Status</div></td>
+        <td>
+            <select name="statusId" class="selectBox">
+                <#if (content?has_content)>
+                    <#if (content.statusId?has_content)>
+                        <#assign statusItem = content.getRelatedOne("StatusItem")/>
+                        <option value="${statusItem.statusId}">${statusItem.description}</option>
+                        <option value="${statusItem.statusId}">----</option>
+                    </#if>
+                </#if>
+                <#list statuses as status>
+                    <option value="${status.statusId}">${status.description}</option>
+                </#list>
+            </select>
+        </td>
+      </tr>
+      <tr>
+        <td colspan="2">
+          <textarea id="cmsdata" name="textData" class="inputBox" cols="40" rows="6" style="display: none;">
+            <#if (dataText?has_content)>
+                ${dataText.textData}
+            </#if>
+          </textarea>
+    </table>
+</form>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSContent.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSContent.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSContent.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSEditor.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSEditor.ftl?view=auto&rev=510691
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSEditor.ftl (added)
+++ ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSEditor.ftl Thu Feb 22 14:20:19 2007
@@ -0,0 +1,84 @@
+<#--
+  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.
+  -->
+
+<script type="text/javascript">    
+    function cmsSave() {
+        var editor = dojo.widget.byId("w_editor");
+        if (editor) {
+            var cmsdata = dojo.byId("cmsdata");
+            cmsdata.value = editor.getEditorContent();
+        } else {
+            alert("Cannot locate editor widget!");
+        }
+
+        // submit the form
+        var form = document.cmsform;
+        if (form != null) {
+        /*
+            var url = form.action;
+            var bindArgs = {
+                url: url,
+                method: "POST",
+                mimetype: "text/json",
+                formNode: form,
+                error: function(type, data, evt) {
+                    alert("An error occurred.");
+                },
+                load: function(type, data, evt) {
+                    alert("Form Submitted");
+                    window.location = window.location;
+                }
+            };
+         */
+
+            //alert("Calling -> " + url);
+            //dojo.io.bind(bindArgs);
+
+            form.submit();
+            return false;
+        } else {
+            alert("Cannot find the cmsform!");
+        }
+    }
+</script>
+
+<div class="left">&nbsp;</div>
+<div id="editorcontainer" class="nocolumns">
+    <table>
+      <tr>
+        <td align="right" colspan="2">
+            <div id="cmseditor" style="margin: 0; border: 1px solid black;">
+                <#--
+                <div id="cmseditor" dojoType="Editor2" minHeight="300px" style="border: 1px solid black;">
+                    ${(dataText.textData)?if_exists}
+                </div>
+                -->
+            </div>
+        </td>
+      </tr>
+      <tr><td colspan="2">&nbsp;</td></tr>
+      <tr>
+        <td align="center" colspan="2">
+            <a href="javascript:void(0);" onclick="javascript:cmsSave();" class="buttontext">Save</a>
+        </td>
+      </tr>
+    </table>
+</div>
+
+<#--<textarea id="raw" cols="80" rows="40">${(dataText.textData)?if_exists}</textarea>-->
\ No newline at end of file

Propchange: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSEditor.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSEditor.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSEditor.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSNav.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSNav.ftl?view=auto&rev=510691
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSNav.ftl (added)
+++ ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSNav.ftl Thu Feb 22 14:20:19 2007
@@ -0,0 +1,248 @@
+<#--
+  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.
+  -->
+
+<script type="text/javascript">
+    //var djConfig = {
+    //    isDebug: false
+    //};
+    
+    dojo.require("dojo.widget.*");
+    dojo.require("dojo.event.*");
+    dojo.require("dojo.io.*");
+
+    var treeSelected = false;
+    var contentRoot = '${contentRoot}';
+ var webSiteId = '${webSiteId}';        
+    var editorUrl = '<@ofbizUrl>/views/WebSiteCMSContent</@ofbizUrl>';
+    var aliasUrl = '<@ofbizUrl>/views/WebSiteCMSPathAlias</@ofbizUrl>';
+        
+    dojo.addOnLoad(function() {
+ dojo.event.topic.subscribe("webCmsNodeSelected",
+ function(message) {
+    treeSelected = true;
+                callEditor(false, message.node.widgetId, message.node.object);
+ }
+ );
+
+ var cmsdata = dojo.byId("cmsdata");
+ createEditor(cmsdata.value);
+        //alert("On load called!");
+ });
+
+    function createEditor(text) {
+        var currentEditor = dojo.widget.byId("w_editor");
+        if (currentEditor) {
+            currentEditor.destroy(true);          
+        }
+
+        // display parent div
+        dojo.html.show("editorcontainer");
+        
+        // get the editor tag
+        var editorNode = dojo.byId("cmseditor");        
+
+        if (text) {
+            editorNode.innerHTML = text;
+        }
+
+        // create the widget
+        dojo.widget.createWidget("Editor2", { id: 'w_editor', minHeight: '300px',
+                htmlEditing: true }, editorNode);
+    }
+
+    function callPathAlias(contentId) {
+        var ctx = new Array();
+        ctx['contentId'] = contentId;
+        ctx['webSiteId'] = webSiteId;
+
+        // deselect the tree
+        var tree = dojo.widget.byId("webCmsTreeSelector");
+        if (tree && treeSelected) {
+            tree.deselect();
+            treeSelected = false;
+        }
+
+        // destroy the editor
+        var editor = dojo.widget.byId("w_editor");
+        if (editor) {
+            editor.destroy(true);
+        }
+        dojo.html.hide("editorcontainer");
+
+        // get the alias screen
+        var bindArgs = {
+            url: aliasUrl,
+            method: 'POST',
+            mimetype: 'text/html',
+            content: ctx,
+            error: function(type, data, evt) {
+                alert("An error occured loading content! : " + data);
+            },
+            load: function(type, data, evt) {
+                var innerPage = dojo.byId('cmscontent');
+                innerPage.innerHTML = data;                
+            }
+        };
+        dojo.io.bind(bindArgs);
+    }
+
+ function callEditor(sub, contentId, objstr) {
+    var ctx = new Array();
+    if (objstr != null && objstr.length > 0) {
+        var obj = objstr.split("|");
+            ctx['contentIdFrom'] = obj[0];
+            ctx['contentAssocTypeId'] = obj[1];
+            ctx['fromDate'] = obj[2];
+        }
+        
+        ctx['contentRoot'] = contentRoot;
+        ctx['webSiteId'] = webSiteId;
+
+        if (sub && contentId) {
+            ctx['contentIdFrom'] = contentId;
+            ctx['contentAssocTypeId'] = 'SUB_CONTENT';
+
+            // deselect the tree
+            var tree = dojo.widget.byId("webCmsTreeSelector");
+            tree.deselect();
+        } else {
+            if (contentId != null && contentId.length > 0) {
+                ctx['contentId'] = contentId;
+            } else {
+                // deselect the tree
+                var tree = dojo.widget.byId("webCmsTreeSelector");
+                if (tree && treeSelected) {
+                    tree.deselect();
+                    treeSelected = false;
+                }
+            }
+        }
+
+        var bindArgs = {
+            url: editorUrl,
+            method: 'POST',
+            mimetype: 'text/html',
+            content: ctx,
+            error: function(type, data, evt) {
+                alert("An error occured loading editor! : " + data);
+            },
+            load: function(type, data, evt) {
+                var editPage = dojo.byId('cmscontent');
+                editPage.innerHTML = data;
+
+                //dojo.byId("raw").value = data;
+
+                // make sure the editor is displayed
+                //dojo.html.show("editorcontainer");
+
+                // load the data
+                var cmsdata = dojo.byId("cmsdata");
+
+                // create the editor
+                createEditor(cmsdata.value);                                
+            }
+        };
+        dojo.io.bind(bindArgs);        
+    }
+
+    function pathSave(contentId) {
+        //dojo.html.hide("submit");
+        
+        var form = document.cmspathform;
+        if (form != null) {
+            var url = form.action;
+            var bindArgs = {
+                url: url,
+                method: "POST",
+                mimetype: "text/json",
+                formNode: form,
+                error: function(type, data, evt) {
+                    alert("An error occurred.");
+                },
+                load: function(type, data, evt) {
+                    callPathAlias(contentId);
+                }
+            };
+            dojo.io.bind(bindArgs);
+        }
+    }
+
+    function pathRemove(websiteId, pathAlias, contentId) {
+        var remAliasUrl = '<@ofbizUrl>/removeWebSitePathAliasJson</@ofbizUrl>';
+        var ctx = new Array();
+
+        ctx['pathAlias'] = pathAlias;
+        ctx['webSiteId'] = webSiteId;
+
+        // get the alias screen
+        var bindArgs = {
+            url: remAliasUrl,
+            method: 'POST',
+            mimetype: 'text/html',
+            content: ctx,
+            error: function(type, data, evt) {
+                alert("An error occured! : " + data);
+            },
+            load: function(type, data, evt) {
+                callPathAlias(contentId);
+            }
+        };
+        dojo.io.bind(bindArgs);
+    }    
+</script>
+
+<#-- looping macro -->
+<#macro fillTree assocList>
+  <#if (assocList?has_content)>
+    <#list assocList as assoc>
+        <#assign thisContent = assoc.getRelatedOne("ToContent")/>
+        <div dojoType="TreeNode" title="${thisContent.contentName?default(assoc.contentIdTo)}" widgetId="${assoc.contentIdTo}"
+                object="${assoc.contentId}|${assoc.contentAssocTypeId}|${assoc.fromDate}">
+            <#assign assocs = thisContent.getRelated("FromContentAssoc")?if_exists/>
+            <#if (assocs?has_content)>
+                <@fillTree assocList = assocs/>
+            </#if>
+        </div>
+    </#list>
+  </#if>
+</#macro>
+
+<div class="tableheadtext">
+    Website Content
+    <#-- &nbsp;<a href="javascript:void(0);" onclick="javascript:callEditor();" class="buttontext">New Content</a>  -->
+</div>
+<dojo:TreeSelector widgetId="webCmsTreeSelector" eventNames="select:webCmsNodeSelected"></dojo:TreeSelector>
+<div dojoType="Tree" widgetId="webCmsTree" selector="webCmsTreeSelector" toggler="fade" toggleDuration="500">
+    <#if (subsites?has_content)>
+        <@fillTree assocList = subsites/>
+    </#if>
+    
+    <#--
+    <#list subsites as subsite>
+        <#assign thisContent = subsite.getRelatedOne("ToContent")/>
+        <div dojoType="TreeNode" title="${thisContent.contentName?default(subsite.contentIdTo)}" widgetId="${subsite.contentIdTo}"
+                object="${subsite.contentId}|${subsite.contentAssocTypeId}|${subsite.fromDate}">
+            <#assign assocs = thisContent.getRelated("ContentAssoc")?if_exists/>
+            <#if (assocs?has_content)>
+
+            </#if>
+        </div>
+    </#list>
+    -->
+</div>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSNav.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSNav.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSNav.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSPathAlias.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSPathAlias.ftl?view=auto&rev=510691
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSPathAlias.ftl (added)
+++ ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSPathAlias.ftl Thu Feb 22 14:20:19 2007
@@ -0,0 +1,85 @@
+<#--
+  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.
+  -->
+
+<#if (content?has_content)>
+    <div class="tabletext" style="margin-bottom: 8px;">
+        New <b>PathAlias</b> attached from WebSite: <b>${webSite.webSiteId}</b> to Content: <b>${content.contentId}</b></b>
+    </div>
+</#if>
+
+<table>
+  <tr><td>
+    <table border="1" cellpadding="2" cellspacing="0" class="calendarTable">
+      <tr>
+        <td><div class="tableheadtext">Web Site ID</div></td>
+        <td><div class="tableheadtext">Path Alias</div></td>
+        <td><div class="tableheadtext">Alias To</div></td>
+        <td><div class="tableheadtext">Content ID</div></td>
+        <td><div class="tableheadtext">Map Key</div></td>
+        <td>&nbsp;</td>
+      </tr>
+      <#if (aliases?has_content)>
+        <#list aliases as alias>
+            <tr>
+              <td><div class="tabletext">${alias.webSiteId}</div></td>
+              <td><div class="tabletext">${alias.pathAlias}</div></td>
+              <td><div class="tabletext">${alias.aliasTo?default("N/A")}</div></td>
+              <td><div class="tabletext">${alias.contentId?default("N/A")}</div></td>
+              <td><div class="tabletext">${alias.mapKey?default("N/A")}</div></td>
+              <td><a href="javascript:void(0);" onclick="javascript:pathRemove('${webSiteId}', '${alias.pathAlias}', '${contentId}');" class="buttontext">Remove</a></td>
+            </tr>
+        </#list>
+      <#else>
+        <tr>
+          <td colspan="5"><div class="tabletext">No aliases currently defined.</div></td>
+        </tr>
+      </#if>
+    </table>
+  </td></tr>
+
+  <tr><td>
+    <form name="cmspathform" method="post" action="<@ofbizUrl>/createWebSitePathAliasJson</@ofbizUrl>" style="margin: 0;">
+        <table>
+            <tr><td colspan="2">&nbsp;</td></tr>
+            <tr>
+                <td><div class="tableheadtext">Web Site</div></td>
+                <td><div class="tabletext">${webSite.siteName?default(webSite.webSiteId)}</div></td>
+                <input type="hidden" name="webSiteId" value="${webSiteId}"/>
+            </tr>
+            <tr>
+                <td><div class="tableheadtext">Content</div></td>
+                <td><div class="tabletext">${content.contentName?default(content.contentId)}</div></td>
+                <input type="hidden" name="contentId" value="${contentId}"/>
+            </tr>
+            <tr><td colspan="2">&nbsp;</td></tr>
+            <tr>
+                <td><div class="tableheadtext">Path Alias</div></td>
+                <td><input type="text" class="inputBox" name="pathAlias" value=""></td>
+            </tr>
+            <tr>
+                <td><div class="tableheadtext">Map Key</div></td>
+                <td><input type="text" class="inputBox" name="mapKey" value=""></td>
+            </tr>
+            <tr>
+                <td colspan="2" align="center"><input id="submit" type="button" onclick="javascript:pathSave('${contentId}');" class="smallSubmit" value="Create"/></td>
+            </tr>
+        </table>
+    </form>
+  </td></tr>
+</table>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSPathAlias.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSPathAlias.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/content/webapp/content/website/WebSiteCMSPathAlias.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/content/webapp/content/website/WebSiteForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/website/WebSiteForms.xml?view=diff&rev=510691&r1=510690&r2=510691
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/website/WebSiteForms.xml (original)
+++ ofbiz/trunk/applications/content/webapp/content/website/WebSiteForms.xml Thu Feb 22 14:20:19 2007
@@ -20,7 +20,9 @@
 
 <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-form.xsd">
-    <form name="EditWebSite" type="single"
+
+    <!-- WebSite Forms -->
+    <form name="EditWebSite" type="single"
         target="updateWebSite" title="" default-map-name="webSite"
         default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
         
@@ -49,10 +51,72 @@
 
         <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
-    <form name="AddWebSiteRole" type="single"
-        target="addWebSiteRole" title=""
+    <form name="ListWebSites" default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="tabletext"
+        target="" title="" type="list" list-name="webSites" paginate-target="FindWebSite" paginate="true">
+        <field name="webSiteId" title="${uiLabelMap.CommonId}" widget-style="buttontext">
+            <hyperlink description="${webSiteId}" target="EditWebSite?webSiteId=${webSiteId}" also-hidden="false"/>
+        </field>
+        <field name="siteName" title="${uiLabelMap.CommonName}"><display/></field>
+    </form>
+
+    <!-- WebSite Content Forms -->
+    <form name="ListWebSiteContent" type="list" list-name="webSiteContent" target="UpdateWebSiteContent" paginate-target="ListWebSiteContent" paginate="true">
+        <auto-fields-service service-name="updateWebSiteRole"/>
+        <field name="sequenceNum"><hidden/></field>
+        <field name="roleTypeId"><hidden/></field>
+        <field name="partyId"><hidden/></field>
+        
+        <field name="webSiteId" title="WebSite ID"><display also-hidden="true"/></field>
+        <!--
+        <field name="contentId" title="Content ID" widget-style="linktext">
+            <hyperlink description="${contentId}" target="EditContent?contentId=${contentId}" also-hidden="true"/>
+        </field>
+        -->
+        <field name="contentId" title="Content">                                        
+            <display-entity entity-name="Content" description="${contentName}" key-field-name="contentId">
+                <sub-hyperlink target="EditContent?contentId=${contentId}" description=" [${contentId}]" link-style="linktext"/>
+            </display-entity>
+
+        </field>
+        <field name="webSiteContentTypeId" title="Type">
+            <display-entity entity-name="WebSiteContentType"/>            
+        </field>
+        <field name="fromDate" title="From Date"><display/></field>
+
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+        <field name="deleteLink" title="" widget-style="buttontext">
+            <hyperlink target="RemoveWebSiteContent?webSiteId=${webSiteId}&amp;contentId=${contentId}&amp;webSiteContentTypeId=${webSiteContentTypeId}&amp;fromDate=${fromDate}"
+                description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
+        </field>
+        <sort-order>
+            <sort-field name="webSiteId"/>
+            <sort-field name="contentId"/>
+            <sort-field name="webSiteContentTypeId"/>
+            <sort-field name="fromDate"/>
+            <sort-field name="thruDate"/>
+            <sort-field name="submitButton"/>
+            <sort-field name="deleteLink"/>
+        </sort-order>
+    </form>
+    <form name="CreateWebSiteContent" type="single" target="CreateWebSiteContent" title="" default-map-name="webSite"
+            default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
+        <auto-fields-service service-name="createWebSiteContent"/>
+        <field name="webSiteId" map-name="webSite"><display also-hidden="true"/></field>
+        <field name="webSiteContentTypeId" widget-style="selectBox">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="WebSiteContentType" description="${description}">
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
+
+    <!-- WebSite Role Forms -->
+    <form name="CreateWebSiteRole" type="single"
+        target="createWebSiteRole" title=""
         default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
-        <auto-fields-service service-name="addWebSiteRole"/>
+        <auto-fields-service service-name="createWebSiteRole"/>
         <field name="webSiteId" map-name="webSite"><hidden/></field>
         <field name="roleTypeId" widget-style="selectBox">
             <drop-down no-current-selected-key="_NA_">
@@ -83,12 +147,5 @@
             <hyperlink target="removeWebSiteRole?webSiteId=${webSiteRole.webSiteId}&amp;partyId=${webSiteRole.partyId}&amp;roleTypeId=${webSiteRole.roleTypeId}&amp;fromDate=${webSiteRole.fromDate}"
                 description="[Delete]" also-hidden="false"/>
         </field>
-    </form>
-    <form name="ListWebSites" default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="tabletext"
-        target="" title="" type="list" list-name="webSites" paginate-target="FindWebSite" paginate="true">
-        <field name="webSiteId" title="${uiLabelMap.CommonId}" widget-style="buttontext">
-            <hyperlink description="${webSiteId}" target="EditWebSite?webSiteId=${webSiteId}" also-hidden="false"/>
-        </field>
-        <field name="siteName" title="${uiLabelMap.CommonName}"><display/></field>
     </form>
 </forms>

Modified: ofbiz/trunk/applications/content/webapp/content/website/WebSiteTabBar.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/website/WebSiteTabBar.ftl?view=diff&rev=510691&r1=510690&r2=510691
==============================================================================
--- ofbiz/trunk/applications/content/webapp/content/website/WebSiteTabBar.ftl (original)
+++ ofbiz/trunk/applications/content/webapp/content/website/WebSiteTabBar.ftl Thu Feb 22 14:20:19 2007
@@ -23,7 +23,9 @@
 <#if webSite?has_content>
     <div class='tabContainer'>
         <a href="<@ofbizUrl>EditWebSite?webSiteId=${webSite.webSiteId}</@ofbizUrl>" class="${selectedClassMap.EditWebSite?default(unselectedClassName)}">${uiLabelMap.ContentWebSite}</a>
-        <a href="<@ofbizUrl>EditWebSiteParties?webSiteId=${webSite.webSiteId}</@ofbizUrl>" class="${selectedClassMap.EditWebSiteParties?default(unselectedClassName)}">${uiLabelMap.PartyParties}</a>
+        <a href="<@ofbizUrl>ListWebSiteContent?webSiteId=${webSite.webSiteId}</@ofbizUrl>" class="${selectedClassMap.ListWebSiteContent?default(unselectedClassName)}">Content</a>
+        <a href="<@ofbizUrl>EditWebSiteParties?webSiteId=${webSite.webSiteId}</@ofbizUrl>" class="${selectedClassMap.EditWebSiteParties?default(unselectedClassName)}">${uiLabelMap.PartyParties}</a>
+         <a href="<@ofbizUrl>WebSiteCms?webSiteId=${webSite.webSiteId}</@ofbizUrl>" class="${selectedClassMap.WebSiteCMS?default(unselectedClassName)}">CMS</a>
     </div>
     <div><span class="head1">${uiLabelMap.ContentWebSite}&nbsp;</span><span class="head2"><#if (webSite.siteName)?has_content>"${webSite.siteName}"</#if> [${uiLabelMap.CommonId}:${webSite.webSiteId}]</span></div>
 </#if>

Modified: ofbiz/trunk/applications/content/widget/WebSiteScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/WebSiteScreens.xml?view=diff&rev=510691&r1=510690&r2=510691
==============================================================================
--- ofbiz/trunk/applications/content/widget/WebSiteScreens.xml (original)
+++ ofbiz/trunk/applications/content/widget/WebSiteScreens.xml Thu Feb 22 14:20:19 2007
@@ -52,6 +52,7 @@
             </widgets>
         </section>
     </screen>
+
     <screen name="CommonWebSiteDecorator">
         <section>
             <actions>
@@ -66,7 +67,7 @@
                             </condition>
                             <widgets>
                                 <platform-specific><html><html-template location="component://content/webapp/content/website/WebSiteTabBar.ftl"/></html></platform-specific>
-                                <container><link  text="${uiLabelMap.CommonCreateNew} ${uiLabelMap.ContentWebSite}" target="EditWebSite" style="buttontext"/></container>
+                                <container style="widget-container"><link  text="${uiLabelMap.CommonCreateNew} ${uiLabelMap.ContentWebSite}" target="EditWebSite" style="buttontext"/></container>
                                 
                                 <decorator-section-include name="body"/>
                             </widgets>
@@ -79,6 +80,7 @@
             </widgets>
         </section>
     </screen>
+
     <screen name="EditWebSite">
         <section>
             <actions>
@@ -102,24 +104,32 @@
             </widgets>
         </section>
     </screen>
-    <screen name="EditWebSiteParties">
+    
+    <screen name="WebSiteContent">
         <section>
             <actions>
-                <set field="titleProperty" value="PageTitleEditWebSiteParties"/>
-                <set field="tabButtonItem" value="EditWebSiteParties"/>
-                <set field="labelTitleProperty" value="PageTitleEditWebSiteParties"/>
+                <set field="titleProperty" value="PageTitleEditWebSiteContent"/>
+                <set field="tabButtonItem" value="ListWebSiteContent"/>
+                <set field="labelTitleProperty" value="PageTitleEditWebSiteContent"/>
                 <set field="webSiteId" from-field="parameters.webSiteId"/>
                 <entity-one entity-name="WebSite" value-name="webSite"/>
-                <script location="component://content/webapp/content/WEB-INF/actions/website/EditWebSiteParties.bsh"/>
+
+                <set field="webSiteContentTypeId" value="PUBLISH_POINT"/>
+                <entity-and entity-name="WebSiteContent" list-name="webSiteContent">
+                    <field-map field-name="webSiteContentTypeId" env-name="webSiteContentTypeId"/>
+                    <field-map field-name="webSiteId" env-name="webSiteId"/>
+                </entity-and>                
             </actions>
             <widgets>
                 <decorator-screen name="CommonWebSiteDecorator">
                     <decorator-section name="body">
                         <section>
                             <widgets>
-                                <container><label style="head1">${uiLabelMap.PageTitleEditWebSiteParties}</label></container>
-                                <include-form name="UpdateWebSiteRole" location="component://content/webapp/content/website/WebSiteForms.xml"/>
-                                <include-form name="AddWebSiteRole" location="component://content/webapp/content/website/WebSiteForms.xml"/>
+                                <container style="widget-container">
+                                    <label style="head1">WebSite Content</label>
+                                    <include-form name="ListWebSiteContent" location="component://content/webapp/content/website/WebSiteForms.xml"/>
+                                </container>
+                                <include-form name="CreateWebSiteContent" location="component://content/webapp/content/website/WebSiteForms.xml"/>
                             </widgets>
                         </section>
                     </decorator-section>
@@ -127,223 +137,173 @@
             </widgets>
         </section>
     </screen>
-<!--    
-    <screen name="CommonSurveyDecorator">
+    
+    <screen name="EditWebSiteParties">
         <section>
             <actions>
-                <set field="headerItem" value="survey"/>
-                <set field="surveyId" from-field="parameters.surveyId"/>
-                <entity-one entity-name="Survey" value-name="survey"/>
+                <set field="titleProperty" value="PageTitleEditWebSiteParties"/>
+                <set field="tabButtonItem" value="EditWebSiteParties"/>
+                <set field="labelTitleProperty" value="PageTitleEditWebSiteParties"/>
+                <set field="webSiteId" from-field="parameters.webSiteId"/>
+                <entity-one entity-name="WebSite" value-name="webSite"/>
+                <script location="component://content/webapp/content/WEB-INF/actions/website/EditWebSiteParties.bsh"/>
             </actions>
             <widgets>
-                <decorator-screen name="mainContentDecorator" location="component://content/widget/CommonScreens.xml">
+                <decorator-screen name="CommonWebSiteDecorator">
                     <decorator-section name="body">
                         <section>
-                            <condition>
-                                <if-has-permission permission="CONTENTMGR" action="_VIEW"/>
-                            </condition>
                             <widgets>
-                                <section>
-                                    <condition><not><if-empty field-name="surveyId"/></not></condition>
-                                    <widgets>
-                                        <include-menu name="SurveyTabBar" location="component://content/widget/SurveyMenus.xml"/>
-                                        <container><link  text="${uiLabelMap.SurveyCreate}" target="EditSurvey" style="buttontext"/></container>
-                                    </widgets>
-                                </section>
-                                
-                                <decorator-section-include name="body"/>
+                                <container style="widget-container">
+                                    <label style="head1">${uiLabelMap.PageTitleEditWebSiteParties}</label>
+                                    <include-form name="UpdateWebSiteRole" location="component://content/webapp/content/website/WebSiteForms.xml"/>
+                                </container>
+                                <include-form name="CreateWebSiteRole" location="component://content/webapp/content/website/WebSiteForms.xml"/>
                             </widgets>
-                            <fail-widgets>
-                                <label style="head3">${uiLabelMap.WorkEffortViewPermissionError}</label>
-                            </fail-widgets>
                         </section>
                     </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>
     </screen>
-    <screen name="EditSurvey">
+
+    <screen name="WebSiteCMS">
         <section>
             <actions>
-                <set field="titleProperty" value="PageTitleEditSurvey"/>
-                <set field="tabButtonItem" value="Survey"/>
-                <set field="labelTitleProperty" value="PageTitleEditSurvey"/>
+                <set field="layoutSettings.javaScripts[+0]" value="/images/dojo/dojo.js" global="true"/>
+                <set field="titleProperty" value="PageTitleEditWebSiteCMS"/>
+                <set field="tabButtonItem" value="WebSiteCMS"/>
+                <set field="labelTitleProperty" value="PageTitleEditWebSiteCMS"/>
+                <set field="webSiteId" from-field="parameters.webSiteId"/>
+                <entity-one entity-name="WebSite" value-name="webSite"/>
 
-                <set field="surveyId" from-field="parameters.surveyId"/>
-                <entity-one entity-name="Survey" value-name="survey"/>
+                <script location="component://content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.bsh"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonSurveyDecorator">
+                <decorator-screen name="CommonWebSiteDecorator">
                     <decorator-section name="body">
                         <section>
-                            <condition>
-                                <if-empty field-name="survey"/>
-                            </condition>
-                            <widgets>
-                                <container><label style="head1">${uiLabelMap.PageTitleCreateSurvey}</label></container>
-                                <include-form name="EditSurvey" location="component://content/webapp/content/survey/SurveyForms.xml"/>
+                            <widgets>                                                                
+                                <container id="cmsnav" style="left-border">
+                                    <include-screen name="WebSiteCMSNav"/>
+                                </container>
+                                <container id="cmsmain" style="nocolumns">
+                                    <container id="cmscontent">
+                                        <include-screen name="WebSiteCMSContent"/>
+                                    </container>
+                                    <include-screen name="WebSiteCMSEditor"/>                                    
+                                </container>                                                                
                             </widgets>
-                            <fail-widgets>
-                                <container><label style="head1">${uiLabelMap.PageTitleEditSurvey}, ${uiLabelMap.SurveySurveyId}: ${surveyId}</label></container>
-                                <include-form name="EditSurvey" location="component://content/webapp/content/survey/SurveyForms.xml"/>
-                            </fail-widgets>
                         </section>
                     </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>
     </screen>
-    <screen name="EditSurveyMultiResps">
-        <section>
-            <actions>
-                <set field="titleProperty" value="PageTitleEditSurveyMultiResps"/>
-                <set field="tabButtonItem" value="SurveyMultiResps"/>
-                <set field="labelTitleProperty" value="PageTitleEditSurveyMultiResps"/>
-                
-                <set field="surveyId" from-field="parameters.surveyId"/>
-                <entity-one entity-name="Survey" value-name="survey"/>
-                <entity-condition entity-name="SurveyMultiResp" list-name="surveyMultiRespList">
-                    <condition-expr field-name="surveyId" env-name="surveyId"/>
-                    <order-by field-name="surveyMultiRespId"/>
-                </entity-condition>
-            </actions>
-            <widgets>
-                <decorator-screen name="CommonSurveyDecorator">
-                    <decorator-section name="body">
-                        <container><label style="head1">${uiLabelMap.PageTitleEditSurveyMultiResps}, ${uiLabelMap.SurveySurveyId}: ${surveyId}</label></container>
-                        <iterate-section entry-name="surveyMultiResp" list-name="surveyMultiRespList">
-                            <section>
-                                <widgets>
-                                    <container><label style="head2">${uiLabelMap.SurveyEditSurveyMultiResp}</label></container>
-                                    <include-form name="EditSurveyMultiResp" location="component://content/webapp/content/survey/SurveyForms.xml"/>
-                                    <include-form name="ListSurveyMultiRespColumns" location="component://content/webapp/content/survey/SurveyForms.xml"/>
-                                    <container><label style="tableheadtext">${uiLabelMap.SurveyAddSurveyMultiRespColumn}</label></container>
-                                    <include-form name="AddSurveyMultiRespColumn" location="component://content/webapp/content/survey/SurveyForms.xml"/>
-                                </widgets>
-                            </section>
-                        </iterate-section>
-                        <container><label style="head2">${uiLabelMap.SurveyAddSurveyMultiResp}</label></container>
-                        <include-form name="AddSurveyMultiResp" location="component://content/webapp/content/survey/SurveyForms.xml"/>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="FindSurveyResponse">
-        <section>
-            <actions>
-                <set field="titleProperty" value="PageTitleFindSurveyResponse"/>
-                <set field="tabButtonItem" value="FindSurveyResponse"/>
-                <set field="labelTitleProperty" value="PageTitleFindSurveyResponse"/>
 
-                <set field="queryString" from-field="result.queryString"/>
-                <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
-                <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
-                
-                <set field="surveyId" from-field="parameters.surveyId"/>
-                <entity-one entity-name="Survey" value-name="survey"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="CommonSurveyDecorator">
-                    <decorator-section name="body">
-                        <container><link  text="${uiLabelMap.SurveyCreateResponse}" target="EditSurveyResponse?surveyId=${surveyId}" style="buttontext"/></container>
-                        <container><label style="head1">${uiLabelMap.PageTitleFindSurveyResponse}, ${uiLabelMap.SurveySurveyId}: ${surveyId}</label></container>
-                        <include-form name="FindSurveyResponse" location="component://content/webapp/content/survey/SurveyForms.xml"/>
-                        <include-form name="ListFindSurveyResponse" location="component://content/webapp/content/survey/SurveyForms.xml"/>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-    <screen name="ViewSurveyResponses">
+    <screen name="WebSiteCMSNav">
         <section>
-            <actions>
-                <set field="titleProperty" value="PageTitleViewSurveyResponses"/>
-                <set field="tabButtonItem" value="SurveyResponses"/>
-                <set field="labelTitleProperty" value="PageTitleViewSurveyResponses"/>
-                
-                <set field="surveyId" from-field="parameters.surveyId"/>
-                <entity-one entity-name="Survey" value-name="survey"/>
-                
-                <script location="component://content/webapp/content/WEB-INF/actions/survey/ViewSurveyResponses.bsh"/>
+            <actions>                                                                
+                <set field="webSiteId" from-field="parameters.webSiteId"/>
+                <entity-one entity-name="WebSite" value-name="webSite"/>
+
+                <script location="component://content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.bsh"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonSurveyDecorator">
-                    <decorator-section name="body">
-                        <container><link  text="${uiLabelMap.SurveyCreateResponse}" target="EditSurveyResponse?surveyId=${surveyId}" style="buttontext"/></container>
-                        <c