You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/02/14 00:27:04 UTC

svn commit: r507302 [2/2] - in /ofbiz/trunk/applications/ecommerce: webapp/ecommerce/blog/ webapp/ecommerce/images/ widget/blog/

Modified: ofbiz/trunk/applications/ecommerce/widget/blog/BlogScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/blog/BlogScreens.xml?view=diff&rev=507302&r1=507301&r2=507302
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/blog/BlogScreens.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/blog/BlogScreens.xml Tue Feb 13 15:27:03 2007
@@ -1,165 +1,194 @@
 <?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.
--->
+  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">
+         xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-screen.xsd">
 
     <screen name="CommonBlog">
         <section>
             <actions>
-                <set field="currentMenuItemName"
-                    from-field="currentMenuItemName" default-value="all"
-                    from-scope="user" />
-                <set field="leftbarScreenName" value="leftbar" />
-                <set field="rightbarScreenName" value="rightbar" />
-                <set field="leftbarScreenLocation"
-                    value="component://ecommerce/widget/CommonScreens.xml" />
-                <set field="rightbarScreenLocation"
-                    value="component://ecommerce/widget/CommonScreens.xml" />
+                <set field="currentMenuItemName" from-field="currentMenuItemName" default-value="all" from-scope="user"/>
+                <set field="leftbarScreenName" value="leftbar"/>
+                <set field="rightbarScreenName" value="rightbar"/>
+                <set field="leftbarScreenLocation" value="component://ecommerce/widget/CommonScreens.xml"/>
+                <set field="rightbarScreenLocation" value="component://ecommerce/widget/CommonScreens.xml"/>
+
             </actions>
             <widgets>
-                <decorator-screen name="main-decorator"
-                    location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <container style="bloghr">
-                            <label text="Blogs: " style="blogtitle" />
-                            <!-- 
-                                <container style="appbarleft">
-                                <include-menu name="blogmenu" location="component://ecommerce/widget/blog/BlogMenus.xml" />
-                                </container>
-                            -->
+                        <container style="blogs">                            
+                            <include-screen name="CommonBlogTitle"/>
+                            <decorator-section-include name="body"/>
                         </container>
-                        <decorator-section-include name="body" />
                     </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>
     </screen>
 
+    <screen name="CommonBlogTitle">
+        <section>
+            <condition>
+                <not>
+                    <if-empty field-name="parameters.caContentId"/>
+                </not>
+            </condition>
+            <actions>
+                <entity-one entity-name="Content" value-name="caContent">
+                    <field-map field-name="contentId" env-name="parameters.caContentId"/>
+                </entity-one>
+            </actions>
+            <widgets>
+                <container style="bloghr">
+                    <label text="${caContent.contentName} - ${caContent.description}" style="blogtitle"/>
+                </container>
+            </widgets>
+            <fail-widgets>
+                <include-screen name="CommonOwnerTitle"/>
+            </fail-widgets>
+        </section>
+    </screen>
+    <screen name="CommonOwnerTitle">
+        <section>
+            <condition>
+                <not>
+                    <if-empty field-name="parameters.ownerContentId"/>
+                </not>
+            </condition>
+            <actions>
+                <entity-one entity-name="Content" value-name="ownerContent">
+                    <field-map field-name="contentId" env-name="parameters.ownerContentId"/>
+                </entity-one>
+            </actions>
+            <widgets>
+                <container style="bloghr">
+                    <label text="${ownerContent.contentName} - ${ownerContent.description}" style="blogtitle"/>
+                </container>
+            </widgets>
+            <fail-widgets>
+                <include-screen name="CommonArticleTitle"/>
+            </fail-widgets>
+        </section>
+    </screen>
+    <screen name="CommonArticleTitle">
+        <section>
+            <condition>
+                <not>
+                    <if-empty field-name="parameters.articleContentId"/>
+                </not>
+            </condition>
+            <actions>
+                <entity-one entity-name="Content" value-name="articleContent">
+                    <field-map field-name="contentId" env-name="parameters.articleContentId"/>
+                </entity-one>
+            </actions>
+            <widgets>
+                <container style="bloghr">
+                    <label text="${articleContent.contentName} - ${articleContent.description}" style="blogtitle"/>
+                </container>
+            </widgets>            
+        </section>
+    </screen>
+
     <screen name="MainBlog">
         <section>
             <actions>
-                <set field="MainColumnStyle" value="center" />
-                <property-to-field property="blog.view.size"
-                    field="blogViewSize" resource="blog" default="10"/>
-                <set field="caContentId"
-                    from-field="parameters.caContentId" />
-                <entity-condition entity-name="ContentAssocViewTo"
-                    use-cache="false" list-name="blogList">
+                <set field="MainColumnStyle" value="nocolumns"/>
+                <property-to-field property="blog.view.size" field="blogViewSize" resource="blog" default="10"/>
+                <set field="caContentId" from-field="parameters.caContentId"/>
+                <entity-condition entity-name="ContentAssocViewTo" use-cache="false" list-name="blogList">
                     <condition-list combine="and">
-                        <condition-expr field-name="contentIdStart"
-                            operator="equals" env-name="caContentId" />
-                        <condition-expr
-                            field-name="caContentAssocTypeId" operator="equals"
-                            value="PUBLISH_LINK" />
-                        <condition-expr field-name="caThruDate"
-                            operator="equals" value="" />
-                        <condition-expr field-name="statusId"
-                            operator="equals" value="BLOG_PUBLISHED" />
+                        <condition-expr field-name="contentIdStart" operator="equals" env-name="caContentId"/>
+                        <condition-expr field-name="caContentAssocTypeId" operator="equals" value="PUBLISH_LINK"/>
+                        <condition-expr field-name="caThruDate" operator="equals" value=""/>
+                        <condition-expr field-name="statusId" operator="equals" value="BLOG_PUBLISHED"/>
                     </condition-list>
-                    <order-by field-name="caFromDate DESC" />
+                    <order-by field-name="caFromDate DESC"/>
                 </entity-condition>
-                <set field="viewIndex"
-                    from-field="requestParameters.VIEW_INDEX" type="Integer" />
+                <set field="viewIndex" from-field="requestParameters.VIEW_INDEX" type="Integer"/>
             </actions>
             <widgets>
                 <section>
                     <!-- if viewer has update permission, show all blogs, even those that were preview only -->
                     <condition>
-                        <if-entity-permission entity-id="${caContentId}"
-                            entity-name="Content" target-operation="CONTENT_CREATE" />
+                        <if-entity-permission entity-id="${caContentId}" entity-name="Content" target-operation="CONTENT_CREATE"/>
                     </condition>
                     <actions>
-                        <service
-                            service-name="getOwnedOrPublishedBlogEntries"
-                            result-map-name="result">
-                            <field-map field-name="contentId"
-                                env-name="caContentId" />
-                            <field-map field-name="userLogin"
-                                env-name="userLogin" />
+                        <service service-name="getOwnedOrPublishedBlogEntries" result-map-name="result">
+                            <field-map field-name="contentId" env-name="caContentId"/>
+                            <field-map field-name="userLogin" env-name="userLogin"/>
                         </service>
-                        <set field="blogList"
-                            from-field="result.blogList" default-value="${blogList}" />
+                        <set field="blogList" from-field="result.blogList" default-value="${blogList}"/>
                     </actions>
-                    <widgets />
-
-
+                    <widgets/>
                 </section>
                 <decorator-screen name="CommonBlog">
                     <decorator-section name="body">
                         <section>
                             <condition>
-                                <if-entity-permission
-                                    entity-id="${caContentId}" entity-name="Content"
-                                    target-operation="CONTENT_CREATE" />
+                                <or>
+                                    <if-has-permission permission="CONTENTMGR" action="CREATE"/>
+                                    <if-entity-permission entity-id="${caContentId}" entity-name="Content" target-operation="CONTENT_CREATE"/>
+                                </or>                                
                             </condition>
                             <widgets>
-                                <link text="Add New"
-                                    target="EditBlog?caContentId=${caContentId}&amp;ownerContentId=${parameters.ownerContentId}"
-                                    style="tabButton" url-mode="inter-app" />
+                                <link text="Add New" target="EditBlog?caContentId=${caContentId}&amp;ownerContentId=${parameters.ownerContentId}" style="buttontext" url-mode="inter-app"/>
                             </widgets>
                         </section>
-                        <iterate-section list-name="blogList"
-                            entry-name="blog" view-size="${blogViewSize}" paginate="true"
-                            paginate-target="MainBlog?caContentId=${parameters.caContentId}&amp;ownerContentId=${parameters.ownerContentId}">
+                        <iterate-section list-name="blogList" entry-name="blog" view-size="${blogViewSize}" paginate="true" paginate-target="MainBlog?caContentId=${parameters.caContentId}&amp;ownerContentId=${parameters.ownerContentId}">
                             <section name="firstBlog">
                                 <condition>
-                                    <if-compare field-name="itemIndex"
-                                        operator="equals" type="Integer" value="0" />
+                                    <if-compare field-name="itemIndex" operator="equals" type="Integer" value="0"/>
                                 </condition>
                                 <widgets>
                                     <container style="blogwrapper">
-                                        <include-menu name="view_edit"
-                                            location="component://ecommerce/widget/blog/BlogMenus.xml" />
-                                        <label
-                                            text="${blog.contentName}" style="blogheader" />
+                                        <include-menu name="view_edit" location="component://ecommerce/widget/blog/BlogMenus.xml"/>
+                                        <label text="&lt;p/&gt;"/>
+                                        <link text="${blog.contentName} [${blog.contentId}]" target="ViewBlog?articleContentId=${blog.contentId}&amp;caContentId=${blog.contentIdStart}&amp;caContentIdTo=${blog.caContentIdTo}&amp;contentId=${blog.contentId}&amp;caContentAssocTypeId=${blog.caContentAssocTypeId}&amp;caFromDate=${blog.caFromDate}&amp;drDataResourceId=${blog.dataResourceId}" style="blogheader" url-mode="inter-app"/>
                                         <!--
-                                            <link  text="Latest" target="LatestResponses?ownerContentId=${blog.ownerContentId}" />
+                                            <link text="Latest" target="LatestResponses?ownerContentId=${blog.ownerContentId}" />
                                         -->
-                                        <label text="&lt;br/&gt;" />
+                                        <label text="&lt;br/&gt;"/>
                                         <container style="blogtext">
-                                            <sub-content
-                                                map-key="SUMMARY" content-id="${blog.contentId}" />
+                                            <sub-content map-key="SUMMARY" content-id="${blog.contentId}"/>
                                         </container>
                                     </container>
                                 </widgets>
                             </section>
                             <section name="allOtherBlogs">
                                 <condition>
-                                    <if-compare field-name="itemIndex"
-                                        operator="greater" type="Integer" value="0" />
+                                    <if-compare field-name="itemIndex" operator="greater" type="Integer" value="0"/>
                                 </condition>
                                 <widgets>
                                     <container style="blogwrapper">
-                                        <include-menu name="view_edit"
-                                            location="component://ecommerce/widget/blog/BlogMenus.xml" />
-                                        <label
-                                            text="${blog.contentName}[${blog.contentId}]"
-                                            style="blogheader" />
+                                        <include-menu name="view_edit" location="component://ecommerce/widget/blog/BlogMenus.xml"/>
+                                        <label text="&lt;p/&gt;"/>
+                                        <!--<label text="${blog.contentName} [${blog.contentId}]" style="blogheader"/>-->
+                                        <link text="${blog.contentName} [${blog.contentId}]" target="ViewBlog?articleContentId=${blog.contentId}&amp;caContentId=${blog.contentIdStart}&amp;caContentIdTo=${blog.caContentIdTo}&amp;contentId=${blog.contentId}&amp;caContentAssocTypeId=${blog.caContentAssocTypeId}&amp;caFromDate=${blog.caFromDate}&amp;drDataResourceId=${blog.dataResourceId}" style="blogheader" url-mode="inter-app"/>
                                         <!--
-                                            <link  text="Latest" target="LatestResponses?ownerContentId=${blog.ownerContentId}" />
+                                            <link text="Latest" target="LatestResponses?ownerContentId=${blog.ownerContentId}" />
                                         -->
-                                        <label text="&lt;br/&gt;" />
+                                        <label text="&lt;br/&gt;"/>
                                         <container style="blogtext">
-                                            <label
-                                                text="${blog.description}" style="blogtext" />
+                                            <label text="${blog.description}" style="blogtext"/>
                                         </container>
                                     </container>
                                 </widgets>
@@ -176,126 +205,85 @@
         <section>
             <condition>
                 <or>
-                    <if-has-permission permission="CONTENTMGR"
-                        action="CREATE" />
-                    <if-entity-permission
-                        entity-id="${parameters.caContentId}" entity-name="Content"
-                        target-operation="CONTENT_CREATE" />
+                    <if-has-permission permission="CONTENTMGR" action="CREATE"/>
+                    <if-entity-permission entity-id="${parameters.caContentId}" entity-name="Content" target-operation="CONTENT_CREATE"/>
                 </or>
             </condition>
             <actions>
-                <set field="contentId"
-                    from-field="parameters.contentId" />
-                <entity-one entity-name="ContentAssocDataResourceViewTo"
-                    value-name="view">
-                    <field-map env-name="parameters.caContentId"
-                        field-name="contentIdStart" />
-                    <field-map env-name="parameters.caContentId"
-                        field-name="caContentId" />
-                    <field-map env-name="parameters.caContentIdTo"
-                        field-name="caContentIdTo" />
-                    <field-map env-name="parameters.contentId"
-                        field-name="contentId" />
-                    <field-map env-name="parameters.caFromDate"
-                        field-name="caFromDate" />
-                    <field-map
-                        env-name="parameters.caContentAssocTypeId"
-                        field-name="caContentAssocTypeId" />
-                    <field-map env-name="parameters.drDataResourceId"
-                        field-name="drDataResourceId" />
-                </entity-one>
-                <set field="view.contentId" from-field="view.contentId"
-                    default-value="${parameters.contentId}" />
-                <set field="view.caContentId"
-                    from-field="view.caContentId"
-                    default-value="${parameters.caContentId}" />
-                <set field="view.ownerContentId"
-                    from-field="view.ownerContentId"
-                    default-value="${parameters.caContentId}" />
-                <set field="view.contentTypeId" value="DOCUMENT" />
-                <set field="view.drDataResourceTypeId"
-                    value="ELECTRONIC_TEXT" />
-                <set field="view.caContentAssocTypeId"
-                    value="PUBLISH_LINK" />
-                <set field="thisContentId" from-field="view.contentId" />
-                <set field="drMimeTypeId"
-                    from-field="view.drMimeTypeId" />
-                <set field="drDataTemplateTypeId"
-                    from-field="view.drDataTemplateTypeId" />
-                <entity-one entity-name="ElectronicText"
-                    value-name="electronicText" use-cache="true">
-                    <field-map env-name="parameters.drDataResourceId"
-                        field-name="dataResourceId" />
-                </entity-one>
-                <set field="summaryMapKey" value="SUMMARY" />
-                <service service-name="getSubContent"
-                    result-map-name="result" auto-field-map="false">
-                    <field-map field-name="contentId"
-                        env-name="view.contentId" />
-                    <field-map field-name="mapKey"
-                        env-name="summaryMapKey" />
+                <set field="contentId" from-field="parameters.contentId"/>
+
+                <entity-one entity-name="ContentAssocDataResourceViewTo" value-name="view">
+                    <field-map env-name="parameters.caContentId" field-name="contentIdStart"/>
+                    <field-map env-name="parameters.caContentId" field-name="caContentId"/>
+                    <field-map env-name="parameters.caContentIdTo" field-name="caContentIdTo"/>
+                    <field-map env-name="parameters.contentId" field-name="contentId"/>
+                    <field-map env-name="parameters.caFromDate" field-name="caFromDate"/>
+                    <field-map env-name="parameters.caContentAssocTypeId" field-name="caContentAssocTypeId"/>
+                    <field-map env-name="parameters.drDataResourceId" field-name="drDataResourceId"/>
+                </entity-one>
+
+                <set field="view.contentId" from-field="view.contentId" default-value="${parameters.contentId}"/>
+                <set field="view.caContentId" from-field="view.caContentId" default-value="${parameters.caContentId}"/>
+                <set field="view.ownerContentId" from-field="view.ownerContentId" default-value="${parameters.caContentId}"/>
+                <set field="view.contentTypeId" value="DOCUMENT"/>
+                <set field="view.drDataResourceTypeId" value="ELECTRONIC_TEXT"/>
+                <set field="view.caContentAssocTypeId" value="PUBLISH_LINK"/>
+                <set field="thisContentId" from-field="view.contentId"/>
+                <set field="drMimeTypeId" from-field="view.drMimeTypeId"/>
+                <set field="drDataTemplateTypeId" from-field="view.drDataTemplateTypeId"/>
+
+                <entity-one entity-name="ElectronicText" value-name="electronicText" use-cache="true">
+                    <field-map env-name="parameters.drDataResourceId" field-name="dataResourceId"/>
+                </entity-one>
+                <set field="summaryMapKey" value="SUMMARY"/>
+                <service service-name="getSubContent" result-map-name="result" auto-field-map="false">
+                    <field-map field-name="contentId" env-name="view.contentId"/>
+                    <field-map field-name="mapKey" env-name="summaryMapKey"/>
                 </service>
-                <entity-one entity-name="ElectronicText"
-                    value-name="summaryText" use-cache="false">
-                    <field-map field-name="dataResourceId"
-                        env-name="result.view.dataResourceId" />
+                <entity-one entity-name="ElectronicText" value-name="summaryText" use-cache="false">
+                    <field-map field-name="dataResourceId" env-name="result.view.dataResourceId"/>
                 </entity-one>
 
-                <set field="imageMapKey" value="IMAGE" />
-                <service service-name="getSubContent"
-                    result-map-name="imageResult" auto-field-map="false">
-                    <field-map field-name="contentId"
-                        env-name="view.contentId" />
-                    <field-map field-name="mapKey"
-                        env-name="imageMapKey" />
+                <set field="imageMapKey" value="IMAGE"/>
+                <service service-name="getSubContent" result-map-name="imageResult" auto-field-map="false">
+                    <field-map field-name="contentId" env-name="view.contentId"/>
+                    <field-map field-name="mapKey" env-name="imageMapKey"/>
                 </service>
-                <set field="imageContent" from-field="imageResult.view"
-                    type="Object" />
+                <set field="imageContent" from-field="imageResult.view" type="Object"/>
+
 
-                <set field="mainMapKey" value="MAIN" />
-                <service service-name="getSubContent"
-                    result-map-name="textResult" auto-field-map="false">
-                    <field-map field-name="contentId"
-                        env-name="view.contentId" />
-                    <field-map field-name="mapKey"
-                        env-name="mainMapKey" />
+                <set field="mainMapKey" value="MAIN"/>
+                <service service-name="getSubContent" result-map-name="textResult" auto-field-map="false">
+                    <field-map field-name="contentId" env-name="view.contentId"/>
+                    <field-map field-name="mapKey" env-name="mainMapKey"/>
                 </service>
-                <set field="textContent" from-field="textResult.view"
-                    type="Object" />
-                <entity-one entity-name="ElectronicText"
-                    value-name="textElectronicText" use-cache="true">
-                    <field-map env-name="textResult.view.dataResourceId"
-                        field-name="dataResourceId" />
+                <set field="textContent" from-field="textResult.view" type="Object"/>
+                <entity-one entity-name="ElectronicText" value-name="textElectronicText" use-cache="true">
+                    <field-map env-name="textResult.view.dataResourceId" field-name="dataResourceId"/>
                 </entity-one>
 
-                <set field="view.contentTypeId" value="DOCUMENT" />
-                <set field="view.caContentAssocTypeId"
-                    value="PUBLISH_LINK" />
-                <set field="view.drDataResourceTypeId"
-                    value="ELECTRONIC_TEXT" />
+                <set field="view.contentTypeId" value="DOCUMENT"/>
+                <set field="view.caContentAssocTypeId" value="PUBLISH_LINK"/>
+                <set field="view.drDataResourceTypeId" value="ELECTRONIC_TEXT"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonBlog">
                     <decorator-section name="body">
-                        <include-form name="EditBlogAll"
-                            location="component://ecommerce/widget/blog/BlogForms.xml" />
+                        <include-form name="EditBlogAll" location="component://ecommerce/widget/blog/BlogForms.xml"/>
                         <platform-specific>
                             <html>
-                                <html-template
-                                    location="component://ecommerce/widget/blog/textimage.ftl" />
+                                <html-template location="component://ecommerce/webapp/ecommerce/blog/TextImage.ftl"/>
                             </html>
                         </platform-specific>
-                        <include-form name="editFormSubmit"
-                            location="component://ecommerce/widget/blog/BlogForms.xml" />
-                        <include-form name="editFormEnd"
-                            location="component://ecommerce/widget/blog/BlogForms.xml" />
-                        <label text="&lt;hr/&gt;" />
-                        <content content-id="${thisContentId}" />
+                        <include-form name="editFormSubmit" location="component://ecommerce/widget/blog/BlogForms.xml"/>
+                        <include-form name="editFormEnd" location="component://ecommerce/widget/blog/BlogForms.xml"/>
+                        <label text="&lt;hr/&gt;"/>
+                        <content content-id="${thisContentId}"/>
                     </decorator-section>
                 </decorator-screen>
             </widgets>
             <fail-widgets>
-                 <label text="Permissions failed."></label>
+                <label text="Permissions failed."></label>
             </fail-widgets>
         </section>
     </screen>
@@ -303,262 +291,213 @@
     <screen name="ViewBlog">
         <section>
             <actions>
-                <set field="articleContentId"
-                    from-field="parameters.articleContentId" />
-                <set field="ownerContentId"
-                    from-field="parameters.contentId" />
-                <entity-one entity-name="Content" value-name="content"
-                    use-cache="true">
-                    <field-map field-name="contentId"
-                        env-name="articleContentId" />
-                </entity-one>
-                <set field="enableEdit" value="false" />
-                <property-to-field property="root.publish.point.blog"
-                    field="webPutPt" resource="blog" />
-                <set field="rsp.contentName"
-                    value="RE:${content.contentName}" />
+                <set field="articleContentId" from-field="parameters.articleContentId"/>
+                <set field="ownerContentId" from-field="parameters.contentId"/>
+                <entity-one entity-name="Content" value-name="content" use-cache="true">
+                    <field-map field-name="contentId" env-name="articleContentId"/>
+                </entity-one>
+                <set field="enableEdit" value="false"/>
+                <property-to-field property="root.publish.point.blog" field="webPutPt" resource="blog"/>
+                <set field="rsp.contentName" value="RE:${content.contentName}"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonBlog">
                     <decorator-section name="body">
-                        <label text="&lt;p/&gt;" />
+                        <label text="&lt;p/&gt;"/>
                         <container style="bloghr">
-                            <label text="${content.contentName}"
-                                style="blogtitle" />
-                        </container>
-                        <container style="blogcontentwrapper">
-                            <content content-id="${articleContentId}" />
-                        </container>
-
-                        <section>
-                            <condition>
-                                <if-entity-permission
-                                    entity-id="${articleContentId}" entity-name="Content"
-                                    target-operation="CONTENT_UPDATE" />
-                            </condition>
-                            <widgets>
-                                <link text="Edit"
-                                    target="EditBlog?caContentId=${parameters.caContentId}&amp;caContentIdTo=${parameters.caContentIdTo}&amp;contentId=${parameters.contentId}&amp;caContentAssocTypeId=${parameters.caContentAssocTypeId}&amp;caFromDate=${parameters.caFromDate}&amp;drDataResourceId=${parameters.drDataResourceId}"
-                                    style="tabButton" url-mode="inter-app" />
-                            </widgets>
-                        </section>
-
-                        <label text="&lt;p/&gt;" />
-                        <include-screen name="BlogResponses" />
-                        <label text="&lt;p/&gt;" />
-                        <!--
-                            <link  text="Latest" target="LatestResponses?ownerContentId=${webPubPt}" />
-                        -->
-
-                        <container style="bloghr">
-                            <label text="Respond to this blog: "
-                                style="blogtitle" />
+                            <label text="${content.contentName}: ${content.description}" style="blogtitle"/>
                             <section>
-                                <!-- if viewer has update permission, show all blogs, even those that were preview only -->
                                 <condition>
-                                    <and>
-                                        <if-compare
-                                            field-name="content.statusId" operator="equals"
-                                            value="BLOG_PUBLISHED" />
-                                       <if-entity-permission
-                                            entity-id="${parameters.caContentId}" entity-name="Content"
-                                            target-operation="HAS_USER_ROLE" />
-                                   </and>
+                                    <or>
+                                        <if-has-permission permission="CONTENTMGR" action="UPDATE"/>
+                                        <if-entity-permission entity-id="${content.contentId}" entity-name="Content" target-operation="CONTENT_UPDATE"/>
+                                    </or>
                                 </condition>
-                                <actions>
-                                </actions>
                                 <widgets>
-                                    <include-screen name="AddBlogResponse" />
+                                    <container style="rightjustify">
+                                        <link text="Edit" target="EditBlog?caContentId=${parameters.caContentId}&amp;caContentIdTo=${parameters.caContentIdTo}&amp;contentId=${parameters.contentId}&amp;caContentAssocTypeId=${parameters.caContentAssocTypeId}&amp;caFromDate=${parameters.caFromDate}&amp;drDataResourceId=${parameters.drDataResourceId}" style="buttontext"/>                                                                                
+                                    </container>
                                 </widgets>
-                                <fail-widgets>
-                                    <label
-                                        text="You must be logged in in order to post comments." />
-                                </fail-widgets>
                             </section>
                         </container>
+                        <container style="blogcontentwrapper">
+                            <content content-id="${articleContentId}"/>
+                        </container>
+                        
+                        <label text="&lt;p/&gt;"/>
+                        <include-screen name="BlogResponses"/>
+                        <label text="&lt;p/&gt;"/>
+                        <!--
+                            <link text="Latest" target="LatestResponses?ownerContentId=${webPubPt}" />
+                        -->
+                        <include-screen name="AddBlogResponse"/>
+                        <label text="&lt;p/&gt;"/>                                                
                     </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>
     </screen>
+
     <screen name="ViewResponse">
         <section>
             <actions>
-                <set field="caContentId"
-                    from-field="parameters.contentId" />
-                <set field="responseContentId"
-                    from-field="parameters.contentId" />
-                <set field="articleContentId"
-                    from-field="parameters.articleContentId" />
-                <set field="ownerContentId"
-                    from-field="parameters.ownerContentId" />
-                <entity-one entity-name="Content" value-name="content"
-                    use-cache="true">
-                    <field-map field-name="contentId"
-                        env-name="caContentId" />
-                </entity-one>
-                <set field="trail" from-field="articleContentId" />
-                <set field="enableEdit" value="false" />
-                <property-to-field property="root.publish.point.blog"
-                    field="webPubPt" resource="blog" />
-                <set field="rsp.contentName"
-                    value="${content.contentName}" />
+                <set field="caContentId" from-field="parameters.contentId"/>
+                <set field="responseContentId" from-field="parameters.contentId"/>
+                <set field="articleContentId" from-field="parameters.articleContentId"/>
+                <set field="ownerContentId" from-field="parameters.ownerContentId"/>
+                <entity-one entity-name="Content" value-name="content" use-cache="true">
+                    <field-map field-name="contentId" env-name="caContentId"/>
+                </entity-one>
+                
+                <set field="trail" from-field="articleContentId"/>
+                <set field="enableEdit" value="false"/>
+                <property-to-field property="root.publish.point.blog" field="webPubPt" resource="blog"/>
+                <set field="rsp.contentName" value="${content.contentName}"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonBlog">
                     <decorator-section name="body">
-                        <label text="&lt;p/&gt;" />
+                        <label text="&lt;p/&gt;"/>
                         <container style="bloghr">
-                            <label text="${content.contentName}"
-                                style="blogtitle" />
+                            <label text="${content.contentName}: ${content.description}" style="blogtitle"/>
+                            <section>
+                                <condition>
+                                    <if-entity-permission entity-id="${content.contentId}" entity-name="Content" target-operation="CONTENT_UPDATE"/>
+                                </condition>
+                                <widgets>
+                                    <container style="rightjustify">
+                                        <section>
+                                            <condition>
+                                                <if-compare field-name="parameters.edit" operator="not-equals" value="Y"/>
+                                            </condition>
+                                            <widgets>
+                                                <link text="Edit" target="ViewResponse?contentId=${content.contentId}&amp;ownerContentId=${content.ownerContentId}&amp;articleContentId=${articleContentId}&amp;edit=Y" style="buttontext"/>
+                                            </widgets>
+                                            <fail-widgets>
+                                                <link text="View" target="ViewResponse?contentId=${content.contentId}&amp;ownerContentId=${content.ownerContentId}&amp;articleContentId=${articleContentId}&amp;edit=N" style="buttontext"/>
+                                            </fail-widgets>
+                                        </section>
+                                    </container>
+                                </widgets>
+                            </section>                                                                
                         </container>
                         <container style="blogcontentwrapper">
-                            <content content-id="${caContentId}" />
+                            <content content-id="${caContentId}"/>
                         </container>
-                        <label text="&lt;p/&gt;" />
+                        <label text="&lt;p/&gt;"/>
 
-                        <section>
-                            <condition>
-                                <if-compare
-                                    field-name="content.statusId" operator="equals"
-                                    value="BLOG_PUBLISHED" />
-                            </condition>
-                            <widgets>
-                                <container style="bloghr">
-                                    <label
-                                        text="Respond to this response: " style="blogtitle" />
-                                </container>
-                                <include-screen name="AddBlogResponse" />
-                            </widgets>
-                        </section>
+                        <include-screen name="AddBlogResponse"/>
+                        <label text="&lt;p/&gt;"/>
+                        
+                        <container style="bloghr">
+                            <label text="Thread: " style="blogtitle"/>
+                        </container>
+                        <include-tree name="ResponseTree" location="component://ecommerce/widget/blog/BlogTrees.xml"/>
+                        <label text="&lt;p/&gt;"/>
 
                         <section>
                             <condition>
-                                <if-compare
-                                    field-name="content.statusId" operator="equals"
-                                    value="BLOG_DRAFT" />
+                                <or>
+                                    <if-compare field-name="content.statusId" operator="equals" value="BLOG_DRAFT"/>
+                                    <and>
+                                        <if-entity-permission entity-id="${content.contentId}" entity-name="Content" target-operation="CONTENT_UPDATE"/>
+                                        <if-compare field-name="parameters.edit" operator="equals" value="Y"/>
+                                    </and>
+                                </or>
+
                             </condition>
                             <widgets>
                                 <container style="bloghr">
-                                    <label text="Edit this response: "
-                                        style="blogtitle" />
+                                    <label text="Edit this comment: " style="blogtitle"/>
                                 </container>
-                                <include-screen name="EditBlogResponse" />
+                                <include-screen name="EditBlogResponse"/>
                             </widgets>
                         </section>
-
-                        <label text="&lt;p/&gt;" />
-                        <container style="bloghr">
-                            <label text="Response tree: "
-                                style="blogtitle" />
-                        </container>
-                        <include-tree name="ResponseTree"
-                            location="component://ecommerce/widget/blog/BlogTrees.xml" />
                     </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>
     </screen>
+
     <screen name="BlogContent">
         <section>
             <condition>
                 <not>
-                    <if-empty field-name="contentId" />
+                    <if-empty field-name="contentId"/>
                 </not>
             </condition>
-            <actions />
+            <actions/>
 
             <widgets>
-                <content content-id="${contentId}" />
+                <content content-id="${contentId}"/>
             </widgets>
         </section>
     </screen>
+
     <screen name="AdminBlog">
         <section>
-            <actions />
+            <actions/>
 
             <widgets>
                 <decorator-screen name="CommonBlog">
                     <decorator-section name="body">
-                        <include-form name="findBlogContent"
-                            location="component://ecommerce/widget/blog/BlogForms.xml" />
-                        <include-form name="listFindBlogContent"
-                            location="component://ecommerce/widget/blog/BlogForms.xml" />
+                        <include-form name="findBlogContent" location="component://ecommerce/widget/blog/BlogForms.xml"/>
+                        <include-form name="listFindBlogContent" location="component://ecommerce/widget/blog/BlogForms.xml"/>
                     </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>
     </screen>
+
     <screen name="BlogResponses">
         <section>
             <actions>
-                <entity-condition entity-name="ContentAssocViewTo"
-                    use-cache="true" list-name="responseList">
+                <entity-condition entity-name="ContentAssocViewTo" use-cache="true" list-name="responseList">
                     <condition-list combine="and">
-                        <condition-expr field-name="caContentId"
-                            operator="equals" value="${articleContentId}" />
-                        <condition-expr
-                            field-name="caContentAssocTypeId" operator="equals"
-                            value="RESPONSE" />
-                        <condition-expr field-name="caThruDate"
-                            operator="equals" value="" />
+                        <condition-expr field-name="caContentId" operator="equals" value="${articleContentId}"/>
+                        <condition-expr field-name="caContentAssocTypeId" operator="equals" value="RESPONSE"/>
+                        <condition-expr field-name="caThruDate" operator="equals" value=""/>
                     </condition-list>
-                    <order-by field-name="caFromDate DESC" />
+                    <order-by field-name="caFromDate DESC"/>
                 </entity-condition>
-                <set field="viewIndex"
-                    from-field="requestParameters.VIEW_INDEX" type="Integer" />
-
+                <set field="viewIndex" from-field="requestParameters.VIEW_INDEX" type="Integer"/>
             </actions>
             <widgets>
                 <container style="bloghr">
-                    <label text="Top-level responses: "
-                        style="blogtitle" />
+                    <label text="Comments: " style="blogtitle"/>
                 </container>
-                <iterate-section list-name="responseList"
-                    entry-name="rsp" view-size="10">
-                    <section name="Blog Responses">
-                        <actions>
-                            <!--
-                                <set field="currentNodeTrailPiped" value="${articleContentId}|${rsp.contentId}" />
-                            -->
-                        </actions>
+                <iterate-section list-name="responseList" entry-name="rsp" view-size="10">
+                    <section name="Blog Responses">                        
                         <widgets>
-                            <include-screen name="responseTreeLine" />
+                            <include-screen name="responseTreeLine"/>
                         </widgets>
                     </section>
                 </iterate-section>
             </widgets>
         </section>
     </screen>
+
     <screen name="LatestResponses">
         <section>
             <actions>
-                <entity-condition
-                    entity-name="ContentAssocDataResourceViewFrom" use-cache="false"
-                    list-name="responseList">
+                <entity-condition entity-name="ContentAssocDataResourceViewFrom" use-cache="false" list-name="responseList">
                     <condition-list combine="and">
-                        <condition-expr field-name="ownerContentId"
-                            operator="equals" value="${parameters.ownerContentId}" />
-                        <condition-expr
-                            field-name="caContentAssocTypeId" operator="equals"
-                            value="RESPONSE" />
-                        <condition-expr field-name="caThruDate"
-                            operator="equals" value="" />
+                        <condition-expr field-name="ownerContentId" operator="equals" value="${parameters.ownerContentId}"/>
+                        <condition-expr field-name="caContentAssocTypeId" operator="equals" value="RESPONSE"/>
+                        <condition-expr field-name="caThruDate" operator="equals" value=""/>
                     </condition-list>
-                    <order-by field-name="caFromDate DESC" />
+                    <order-by field-name="caFromDate DESC"/>
                 </entity-condition>
 
             </actions>
             <widgets>
                 <decorator-screen name="CommonBlog">
                     <decorator-section name="body">
-                        <label text="Latest Responses" />
-                        <iterate-section list-name="responseList"
-                            entry-name="rsp">
+                        <label text="Latest Responses"/>
+                        <iterate-section list-name="responseList" entry-name="rsp">
                             <section name="Blog Responses">
                                 <widgets>
-                                    <include-screen
-                                        name="responseTreeLine" />
+                                    <include-screen name="responseTreeLine"/>                                            
                                 </widgets>
                             </section>
                         </iterate-section>
@@ -567,45 +506,34 @@
             </widgets>
         </section>
     </screen>
+
     <screen name="responseTreeLine">
         <section>
             <widgets>
                 <section>
                     <condition>
-                        <if-compare-field field-name="responseContentId"
-                            operator="not-equals" to-field-name="rsp.contentId" />
+                        <if-compare-field field-name="responseContentId" operator="not-equals" to-field-name="rsp.contentId"/>
                     </condition>
                     <widgets>
                         <container>
-                            <label
-                                text="${rsp.contentName}[${rsp.contentId}]"
-                                style="responseheader" />
-                            <link text="View"
-                                target="ViewResponse?contentId=${rsp.contentId}&amp;ownerContentId=${rsp.ownerContentId}&amp;articleContentId=${articleContentId}"
-                                style="tabButton" />
+                            <link text="${rsp.contentName}[${rsp.contentId}]" target="ViewResponse?contentId=${rsp.contentId}&amp;ownerContentId=${rsp.ownerContentId}&amp;articleContentId=${articleContentId}" style="responseheader"/>
+                            <link text="View" target="ViewResponse?contentId=${rsp.contentId}&amp;ownerContentId=${rsp.ownerContentId}&amp;articleContentId=${articleContentId}" style="buttontext"/>
                             <container style="responsetext">
-                                <label text="${rsp.description}"
-                                    style="responsetext" />
+                                <label text="${rsp.description}" style="responsetext"/>
                             </container>
                         </container>
                     </widgets>
                 </section>
                 <section>
                     <condition>
-                        <if-compare-field field-name="responseContentId"
-                            operator="equals" to-field-name="rsp.contentId" />
+                        <if-compare-field field-name="responseContentId" operator="equals" to-field-name="rsp.contentId"/>
                     </condition>
                     <widgets>
                         <container style="responseSelected">
-                            <label
-                                text="${rsp.contentName}[${rsp.contentId}]"
-                                style="responseheader" />
-                            <link text="View"
-                                target="ViewResponse?contentId=${rsp.contentId}&amp;ownerContentId=${rsp.ownerContentId}&amp;articleContentId=${articleContentId}"
-                                style="tabButton" />
+                            <link text="${rsp.contentName}[${rsp.contentId}]" target="ViewResponse?contentId=${rsp.contentId}&amp;ownerContentId=${rsp.ownerContentId}&amp;articleContentId=${articleContentId}" style="responseheader"/>
+                            <link text="View" target="ViewResponse?contentId=${rsp.contentId}&amp;ownerContentId=${rsp.ownerContentId}&amp;articleContentId=${articleContentId}" style="buttontext"/>
                             <container style="responsetext">
-                                <label text="${rsp.description}"
-                                    style="responsetext" />
+                                <label text="${rsp.description}" style="responsetext"/>
                             </container>
                         </container>
                     </widgets>
@@ -613,121 +541,121 @@
             </widgets>
         </section>
     </screen>
+
     <screen name="blogTreeLine">
         <section>
             <widgets>
                 <container>
-                    <label text="${rsp.contentName}[${rsp.contentId}]"
-                        style="responseheader" />
-                    <link text="View Blog Article"
-                        target="ViewBlog?articleContentId=${articleContentId}&amp;ownerContentId=${rsp.ownerContentId}"
-                        style="tabButton" />
+                    <link text="${rsp.contentName}[${rsp.contentId}]" target="ViewBlog?articleContentId=${articleContentId}&amp;ownerContentId=${rsp.ownerContentId}" style="responseheader"/>
+                    <link text="View Blog Article" target="ViewBlog?articleContentId=${articleContentId}&amp;ownerContentId=${rsp.ownerContentId}" style="buttontext"/>
                     <container style="responsetext">
-                        <label text="${rsp.description}"
-                            style="responsetext" />
+                        <label text="${rsp.description}" style="responsetext"/>
                     </container>
                 </container>
             </widgets>
         </section>
     </screen>
+
     <screen name="AddBlogResponse">
+
         <section>
-        <!-- 
-            <condition>
-                <if-entity-permission entity-id="${ownerContentId}"
-                    entity-name="Content" target-operation="HAS_USER_ROLE" />
-            </condition>
-         -->
             <actions>
-                <set field="rsp.contentTypeId" value="DOCUMENT" />
-                <set field="rsp.caContentAssocTypeId" value="RESPONSE" />
-                <set field="rsp.drDataResourceTypeId"
-                    value="ELECTRONIC_TEXT" />
-                <set field="rsp.articleContentId"
-                    from-field="articleContentId" />
-                <set field="rsp.caContentId"
-                    from-field="parameters.contentId" />
-                <set field="rsp.ownerContentId"
-                    from-field="ownerContentId" />
-                <set field="useRequestParameters" value="false"
-                    type="Boolean" />
+                <set field="rsp.contentTypeId" value="DOCUMENT"/>
+                <set field="rsp.caContentAssocTypeId" value="RESPONSE"/>
+                <set field="rsp.drDataResourceTypeId" value="ELECTRONIC_TEXT"/>
+                <set field="rsp.articleContentId" from-field="articleContentId"/>
+                <set field="rsp.caContentId" from-field="parameters.contentId"/>
+                <set field="rsp.ownerContentId" from-field="ownerContentId"/>
+                <set field="useRequestParameters" value="false" type="Boolean"/>
             </actions>
-            <widgets>
-                <include-form name="AddBlogResponse"
-                    location="component://ecommerce/widget/blog/BlogForms.xml" />
+            <widgets>                
+                <container style="bloghr">
+                    <label text="Add Comment: " style="blogtitle"/>
+                    <section>
+                        <condition>
+                            <and>
+                                <if-compare field-name="content.statusId" operator="equals" value="BLOG_PUBLISHED"/>
+                                <if-entity-permission entity-id="${parameters.caContentId}" entity-name="Content" target-operation="HAS_USER_ROLE"/>
+                            </and>
+                        </condition>
+
+                        <actions>
+                            <set field="displayForm" value="Y"/>
+                        </actions>
+                        <widgets/>
+                        <fail-widgets>
+                            <label text="&amp;nbsp;You must be logged in in order to post comments."/>
+                        </fail-widgets>
+                    </section>
+                </container>
+                <section>
+                    <condition>
+                        <if-compare field-name="displayForm" operator="equals" value="Y"/>
+                    </condition>
+                    <widgets>
+                        <container style="blogcontentwrapper clearnone">
+                            <include-form name="AddBlogResponse" location="component://ecommerce/widget/blog/BlogForms.xml"/>
+                        </container>
+                    </widgets>
+                </section>
             </widgets>
-            <fail-widgets>
-                <label
-                    text="You must be logged in in order to post comments." />
-            </fail-widgets>
         </section>
     </screen>
+
     <screen name="EditBlogResponse">
         <section>
             <condition>
-                <if-entity-permission entity-id="${ownerContentId}"
-                    entity-name="Content" target-operation="HAS_USER_ROLE" />
+                <if-entity-permission entity-id="${ownerContentId}" entity-name="Content" target-operation="HAS_USER_ROLE"/>
             </condition>
             <actions>
-                <set field="rsp.articleContentId"
-                    from-field="articleContentId" />
-                <entity-one entity-name="DataResource"
-                    value-name="dataResource" use-cache="false">
-                    <field-map field-name="dataResourceId"
-                        env-name="content.dataResourceId" />
-                </entity-one>
-                <entity-one entity-name="ElectronicText"
-                    value-name="electronicText" use-cache="false">
-                    <field-map field-name="dataResourceId"
-                        env-name="content.dataResourceId" />
+                <set field="rsp.articleContentId" from-field="articleContentId"/>
+                <entity-one entity-name="DataResource" value-name="dataResource" use-cache="false">
+                    <field-map field-name="dataResourceId" env-name="content.dataResourceId"/>
+                </entity-one>
+                <entity-one entity-name="ElectronicText" value-name="electronicText" use-cache="false">
+                    <field-map field-name="dataResourceId" env-name="content.dataResourceId"/>
                 </entity-one>
             </actions>
             <widgets>
-                <include-form name="EditBlogResponse"
-                    location="component://ecommerce/widget/blog/BlogForms.xml" />
+                <container style="blogcontentwrapper clearnone">
+                    <include-form name="EditBlogResponse" location="component://ecommerce/widget/blog/BlogForms.xml"/>
+                </container>
             </widgets>
             <fail-widgets>
-                <label
-                    text="You must be logged in in order to post comments." />
+                <label text="&amp;nbsp;You must be logged in in order to post comments."/>
             </fail-widgets>
         </section>
     </screen>
+
     <!-- Column Included Screens -->
     <screen name="blogs">
         <section>
             <actions>
-                <entity-condition entity-name="ContentAssocViewTo"
-                    list-name="blogs" use-cache="true">
+                <entity-condition entity-name="ContentAssocViewTo" list-name="blogs" use-cache="true">                                  
                     <condition-list combine="and">
-                        <condition-expr field-name="contentIdStart"
-                            operator="equals" value="BLOGROOT" />
+                        <condition-expr field-name="contentIdStart" operator="equals" value="BLOGROOT"/>
                         <condition-list combine="or">
-                            <condition-expr field-name="caFromDate"
-                                operator="equals" env-name="null" />
-                            <condition-expr field-name="caFromDate"
-                                operator="less-equals" env-name="nowTimestamp" />
+                            <condition-expr field-name="caFromDate" operator="equals" env-name="null"/>
+                            <condition-expr field-name="caFromDate" operator="less-equals" env-name="nowTimestamp"/>
                         </condition-list>
                         <condition-list combine="or">
-                            <condition-expr field-name="caThruDate"
-                                operator="equals" env-name="null" />
-                            <condition-expr field-name="caThruDate"
-                                operator="greater-equals" env-name="nowTimestamp" />
+                            <condition-expr field-name="caThruDate" operator="equals" env-name="null"/>
+                            <condition-expr field-name="caThruDate" operator="greater-equals" env-name="nowTimestamp"/>
                         </condition-list>
                     </condition-list>
-                    <order-by field-name="contentName" />
+                    <order-by field-name="contentName"/>
                 </entity-condition>
             </actions>
             <widgets>
                 <platform-specific>
                     <html>
-                        <html-template
-                            location="component://ecommerce/webapp/ecommerce/blog/blogs.ftl" />
+                        <html-template location="component://ecommerce/webapp/ecommerce/blog/blogs.ftl"/>
+
                     </html>
                 </platform-specific>
             </widgets>
         </section>
     </screen>
-
 </screens>
 
 

Modified: ofbiz/trunk/applications/ecommerce/widget/blog/BlogTemplates.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/blog/BlogTemplates.xml?view=diff&rev=507302&r1=507301&r2=507302
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/blog/BlogTemplates.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/blog/BlogTemplates.xml Tue Feb 13 15:27:03 2007
@@ -1,65 +1,53 @@
 <?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="ContentOnly">
-  <section>
-    <widgets>
-      <sub-content content-id="${contentId}" map-key="MAIN" 
-        enable-edit-name="enableEdit"
-        edit-request="EditBlogText?contentContentId=${parameters.contentContentId}&amp;contentContentIdTo=${parameters.contentContentIdTo}&amp;contentDataResourceId=${parameters.contentDataResourceId}&amp;contentContentAssocTypeId=${parameters.contentContentAssocTypeId}&amp;contentFromDate=${parameters.contentFromDate}"/>
-    </widgets>
-  </section>
-</screen>
-
-<screen name="FloatLeft">
-  <section>
-    <widgets>
-      <container style="floatleft">
-            <sub-content content-id="${contentId}" map-key="IMAGE" 
-        enable-edit-name="enableEdit"
-        edit-request="EditBlogImage?contentContentId=${parameters.contentContentId}&amp;contentContentIdTo=${parameters.contentContentIdTo}&amp;contentDataResourceId=${parameters.contentDataResourceId}&amp;contentContentAssocTypeId=${parameters.contentContentAssocTypeId}&amp;contentFromDate=${parameters.contentFromDate}"/>
-      </container>
-      <sub-content content-id="${contentId}" map-key="MAIN" 
-        enable-edit-name="enableEdit"
-        edit-request="EditBlogText?contentContentId=${parameters.contentContentId}&amp;contentContentIdTo=${parameters.contentContentIdTo}&amp;contentDataResourceId=${parameters.contentDataResourceId}&amp;contentContentAssocTypeId=${parameters.contentContentAssocTypeId}&amp;contentFromDate=${parameters.contentFromDate}"/>
-    </widgets>
-  </section>
-</screen>
-
-<screen name="TopCenter">
-  <section>
-    <widgets>
-      <container style="topcentered">
-        <sub-content content-id="${contentId}" map-key="IMAGE" 
-        enable-edit-name="enableEdit"
-        edit-request="EditBlogImage?contentContentId=${parameters.contentContentId}&amp;contentContentIdTo=${parameters.contentContentIdTo}&amp;contentDataResourceId=${parameters.contentDataResourceId}&amp;contentContentAssocTypeId=${parameters.contentContentAssocTypeId}&amp;contentFromDate=${parameters.contentFromDate}"/>
-      </container>
-      <label text="&lt;p/&gt;"/>
-      <label text="&lt;br/&gt;"/>
-      <sub-content content-id="${contentId}" map-key="MAIN" 
-        enable-edit-name="enableEdit"
-        edit-request="EditBlogText?contentContentId=${parameters.contentContentId}&amp;contentContentIdTo=${parameters.contentContentIdTo}&amp;contentDataResourceId=${parameters.contentDataResourceId}&amp;contentContentAssocTypeId=${parameters.contentContentAssocTypeId}&amp;contentFromDate=${parameters.contentFromDate}"/>
-    </widgets>
-  </section>
-</screen>
+  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="ContentOnly">
+        <section>
+            <widgets>
+                <sub-content content-id="${contentId}" map-key="MAIN" enable-edit-name="enableEdit" edit-request="EditBlogText?contentContentId=${parameters.contentContentId}&amp;contentContentIdTo=${parameters.contentContentIdTo}&amp;contentDataResourceId=${parameters.contentDataResourceId}&amp;contentContentAssocTypeId=${parameters.contentContentAssocTypeId}&amp;contentFromDate=${parameters.contentFromDate}"/>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="FloatLeft">
+        <section>
+            <widgets>
+                <container style="floatleft">
+                    <sub-content content-id="${contentId}" map-key="IMAGE" enable-edit-name="enableEdit" edit-request="EditBlogImage?contentContentId=${parameters.contentContentId}&amp;contentContentIdTo=${parameters.contentContentIdTo}&amp;contentDataResourceId=${parameters.contentDataResourceId}&amp;contentContentAssocTypeId=${parameters.contentContentAssocTypeId}&amp;contentFromDate=${parameters.contentFromDate}"/>
+                </container>
+                <sub-content content-id="${contentId}" map-key="MAIN" enable-edit-name="enableEdit" edit-request="EditBlogText?contentContentId=${parameters.contentContentId}&amp;contentContentIdTo=${parameters.contentContentIdTo}&amp;contentDataResourceId=${parameters.contentDataResourceId}&amp;contentContentAssocTypeId=${parameters.contentContentAssocTypeId}&amp;contentFromDate=${parameters.contentFromDate}"/>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="TopCenter">
+        <section>
+            <widgets>
+                <container style="topcentered">
+                    <sub-content content-id="${contentId}" map-key="IMAGE" enable-edit-name="enableEdit" edit-request="EditBlogImage?contentContentId=${parameters.contentContentId}&amp;contentContentIdTo=${parameters.contentContentIdTo}&amp;contentDataResourceId=${parameters.contentDataResourceId}&amp;contentContentAssocTypeId=${parameters.contentContentAssocTypeId}&amp;contentFromDate=${parameters.contentFromDate}"/>
+                </container>
+                <label text="&lt;p/&gt;"/>
+                <label text="&lt;br/&gt;"/>
+                <sub-content content-id="${contentId}" map-key="MAIN" enable-edit-name="enableEdit" edit-request="EditBlogText?contentContentId=${parameters.contentContentId}&amp;contentContentIdTo=${parameters.contentContentIdTo}&amp;contentDataResourceId=${parameters.contentDataResourceId}&amp;contentContentAssocTypeId=${parameters.contentContentAssocTypeId}&amp;contentFromDate=${parameters.contentFromDate}"/>
+            </widgets>
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/trunk/applications/ecommerce/widget/blog/BlogTrees.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/blog/BlogTrees.xml?view=diff&rev=507302&r1=507301&r2=507302
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/blog/BlogTrees.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/blog/BlogTrees.xml Tue Feb 13 15:27:03 2007
@@ -1,55 +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.
--->
-<trees xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-        xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-tree.xsd">
-    <tree name="ResponseTree" root-node-name="node-root" 
-        default-render-style="simple" default-wrap-style="responseTreeWrapper">
+  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.
+  -->
+
+<trees xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-tree.xsd">    
+    <tree name="ResponseTree" root-node-name="node-root" default-render-style="simple" default-wrap-style="responseTreeWrapper">
         <node name="node-root" entry-name="rsp">
-            <entity-one entity-name="Content"  use-cache="false" value-name="rsp">
+            <entity-one entity-name="Content" use-cache="false" value-name="rsp">
                 <field-map field-name="contentId" env-name="rootEntityId"/>
             </entity-one>
-            <include-screen name="blogTreeLine"
-                location="component://ecommerce/widget/blog/BlogScreens.xml" />
+            <include-screen name="blogTreeLine" location="component://ecommerce/widget/blog/BlogScreens.xml"/>
             <sub-node node-name="node-body">
-                <entity-condition entity-name="ContentAssocViewTo" use-cache="false" >
-                
-                    <order-by field-name="caFromDate DESC"/>
-                   <condition-list combine="and">
-                        <condition-expr field-name="caContentId" operator="equals" env-name="rootEntityId" />
-                        <condition-expr field-name="caContentAssocTypeId" operator="equals" value="RESPONSE" />
+                <entity-condition entity-name="ContentAssocViewTo" use-cache="false">
+                    <condition-list combine="and">
+                        <condition-expr field-name="caContentId" operator="equals" env-name="rootEntityId"/>
+                        <condition-expr field-name="caContentAssocTypeId" operator="equals" value="RESPONSE"/>
                         <condition-expr field-name="caThruDate" operator="equals" value=""/>
-                   </condition-list> 
+                    </condition-list>
+                    <order-by field-name="caFromDate DESC"/>
                 </entity-condition>
             </sub-node>
         </node>
         <node name="node-body" entry-name="rsp">
-            <include-screen name="responseTreeLine" 
-                location="component://ecommerce/widget/blog/BlogScreens.xml" />
+            <include-screen name="responseTreeLine" location="component://ecommerce/widget/blog/BlogScreens.xml"/>
             <sub-node node-name="node-body">
-                <entity-condition entity-name="ContentAssocViewTo" use-cache="true" >
-                    <order-by field-name="caFromDate DESC"/>
-                   <condition-list combine="and">
-                        <condition-expr field-name="caContentId" operator="equals" env-name="rsp.contentId" />
-                        <condition-expr field-name="caContentAssocTypeId" operator="equals" value="RESPONSE" />
+                <entity-condition entity-name="ContentAssocViewTo" use-cache="true">
+                    <condition-list combine="and">
+                        <condition-expr field-name="caContentId" operator="equals" env-name="rsp.contentId"/>
+                        <condition-expr field-name="caContentAssocTypeId" operator="equals" value="RESPONSE"/>
                         <condition-expr field-name="caThruDate" operator="equals" value=""/>
-                   </condition-list> 
+                    </condition-list>
+                    <order-by field-name="caFromDate DESC"/>
                 </entity-condition>
             </sub-node>
         </node>