Author: hansbak
Date: Tue Jan 13 18:21:21 2009 New Revision: 734306 URL: http://svn.apache.org/viewvc?rev=734306&view=rev Log: first version of blog backend maintenance screens, to be completed Added: ofbiz/trunk/applications/content/widget/forum/BlogForms.xml (with props) ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml (with props) Modified: ofbiz/trunk/applications/content/config/ContentUiLabels.xml ofbiz/trunk/applications/content/script/org/ofbiz/content/blog/BlogServices.xml ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml ofbiz/trunk/applications/content/servicedef/services.xml ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml ofbiz/trunk/applications/content/widget/content/ContentMenus.xml Modified: ofbiz/trunk/applications/content/config/ContentUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/config/ContentUiLabels.xml?rev=734306&r1=734305&r2=734306&view=diff ============================================================================== --- ofbiz/trunk/applications/content/config/ContentUiLabels.xml (original) +++ ofbiz/trunk/applications/content/config/ContentUiLabels.xml Tue Jan 13 18:21:21 2009 @@ -74,6 +74,21 @@ <value xml:lang="th">à¸à¸¸à¸à¸ªà¸¡à¸à¸±à¸à¸´</value> <value xml:lang="zh">å±æ§</value> </property> + <property key="ContentBlog"> + <value xml:lang="en">Blog</value> + </property> + <property key="ContentBlogActicle"> + <value xml:lang="en">Article</value> + </property> + <property key="ContentBlogActicleList"> + <value xml:lang="en">List of Blog articles</value> + </property> + <property key="ContentBlogList"> + <value xml:lang="en">List of Blogs</value> + </property> + <property key="ContentBlogEdit"> + <value xml:lang="en">Edit a Blog</value> + </property> <property key="ContentCMS"> <value xml:lang="ar">CMS</value> <value xml:lang="de">CMS</value> Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/blog/BlogServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/blog/BlogServices.xml?rev=734306&r1=734305&r2=734306&view=diff ============================================================================== --- ofbiz/trunk/applications/content/script/org/ofbiz/content/blog/BlogServices.xml (original) +++ ofbiz/trunk/applications/content/script/org/ofbiz/content/blog/BlogServices.xml Tue Jan 13 18:21:21 2009 @@ -60,14 +60,13 @@ </then> </if> - <if> + <!--if> <condition> <not> <if-empty field="parameters.uploadedFile"/> </not> </condition> <then> - <!-- create image data --> <set field="createImage.dataResourceTypeId" value="LOCAL_FILE"/> <set field="createImage.dataTemplateTypeId" value="NONE"/> <set field="createImage.mapKey" value="IMAGE"/> @@ -93,7 +92,7 @@ <set field="contentAssocTypeId" value="SUB_CONTENT"/> </if-empty> </then> - </if> + </if--> <if> <condition> @@ -132,18 +131,12 @@ <!-- we should have a primary (at least) contentId --> <if> <condition> - <and> - <not> - <if-empty field="contentId"/> - </not> - <not> - <if-empty field="parameters.summaryData"/> - </not> - </and> + <if-empty field="contentId"/> </condition> <then> <!-- create the summary data --> <set field="createSummary.dataResourceTypeId" value="ELECTRONIC_TEXT"/> + <set field="createSummary.contentPurposeTypeId" value="ARTICLE"/> <set field="createSummary.dataTemplateTypeId" value="NONE"/> <set field="createSummary.mapKey" value="SUMMARY"/> @@ -156,10 +149,12 @@ <set field="createSummary.contentIdFrom" from-field="contentIdFrom"/> <set field="createSummary.partyId" from-field="userLogin.partyId"/> - <call-service service-name="createTextContent" in-map-name="createSummary"/> + <call-service service-name="createTextContent" in-map-name="createSummary"> + <result-to-field result-name="contentId" field="contentId"/> + </call-service> </then> </if> - +<log level="always" message="==========contentId: ${contentId} created"/> <field-to-result field="contentId"/> </simple-method> Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml?rev=734306&r1=734305&r2=734306&view=diff ============================================================================== --- ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml (original) +++ ofbiz/trunk/applications/content/script/org/ofbiz/content/content/ContentServices.xml Tue Jan 13 18:21:21 2009 @@ -75,6 +75,7 @@ <make-value value-field="assoc" entity-name="ContentAssoc"/> <set-nonpk-fields value-field="assoc" map="parameters"/> <set-pk-fields value-field="assoc" map="parameters"/> + <set field="assoc.contentId" from-field="parameters.contentIdFrom" default-value="${parameters.contentId}" /> <now-timestamp field="nowTimestamp"/> @@ -875,7 +876,8 @@ <remove-value value-field="commEventContentAssoc" /> </simple-method> - <simple-method method-name="createContentAndAssoc" short-description="Create content and associate with other content"> + <!-- simply use createContent and the accoc will be created too" the service below +aca will create 2 contentAssocs--> + <!--simple-method method-name="createContentAndAssoc" short-description="Create content and associate with other content"> <set-service-fields service-name="createContent" map="parameters" to-map="contentData"/> <call-service service-name="createContent" in-map-name="contentData"> <result-to-field result-name="contentId" field="newContentId"/> @@ -889,7 +891,7 @@ </call-service> <field-to-result field="newContentId" result-name="contentId"/> </if-not-empty> - </simple-method> + </simple-method--> <!-- retrieve Data resource information --> <simple-method method-name="getDataResource" short-description="get the content and relasted resource information" login-required="false"> Modified: ofbiz/trunk/applications/content/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services.xml?rev=734306&r1=734305&r2=734306&view=diff ============================================================================== --- ofbiz/trunk/applications/content/servicedef/services.xml (original) +++ ofbiz/trunk/applications/content/servicedef/services.xml Tue Jan 13 18:21:21 2009 @@ -308,7 +308,9 @@ </service> <!-- Complex Contentservices --> - <service name="createContentAndAssoc" default-entity-name="Content" engine="simple" + + <!-- simply use createContent and the accoc will be created too" --> + <!--service name="createContentAndAssoc" default-entity-name="Content" engine="simple" location="org/ofbiz/content/content/ContentServices.xml" invoke="createContentAndAssoc" auth="true"> <description>Create a Content with a ContentAssoc</description> <auto-attributes entity-name="Content" include="all" mode="IN" optional="true"> @@ -324,7 +326,7 @@ <attribute mode="INOUT" entity-name="ContentAssoc" name="contentIdTo" optional="true" type="String"/> <attribute mode="INOUT" entity-name="ContentAssoc" name="contentIdFrom" optional="true" type="String"/> <attribute mode="IN" name="contentTypeId" optional="false" type="String"/> - </service> + </service--> <service name="getAssocAndContentAndDataResourceCache" default-entity-name="ContentAssocDataResourceViewFrom" engine="java" location="org.ofbiz.content.content.ContentServicesComplex" 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?rev=734306&r1=734305&r2=734306&view=diff ============================================================================== --- ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml Tue Jan 13 18:21:21 2009 @@ -63,6 +63,117 @@ <response name="error" type="view" value="error"/> </request-map> + <!-- ================ Blog Requests ================= --> + <request-map uri="blogMain"> + <security https="true" auth="true"/> + <response name="success" type="view" value="blogMain"/> + </request-map> + <request-map uri="editBlog"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditBlog"/> + </request-map> + <request-map uri="updateBlog"> + <security https="true" auth="true"/> + <event type="service" invoke="createContent"/> + <response name="success" type="view" value="blogMain"/> + <response name="error" type="view" value="EditBlog"/> + </request-map> + <request-map uri="newBlog"> + <security https="true" auth="true"/> + <event type="service" invoke="createContent"/> + <response name="success" type="view" value="blogMain"/> + <response name="error" type="view" value="EditBlog"/> + </request-map> + <request-map uri="blogContent"> + <security https="true" auth="true"/> + <response name="success" type="view" value="blogContent"/> + </request-map> + <request-map uri="NewArticle"> + <security https="true" auth="true"/> + <response name="success" type="view" value="NewArticle"/> + </request-map> + <request-map uri="createBlogArticle"> + <security https="true" auth="true"/> + <event type="service" invoke="postBlogEntry"/> + <response name="success" type="view" value="blogContent"/> + <response name="error" type="view" value="NewArticle"/> + </request-map> + <request-map uri="ViewArticle"> + <security https="true" auth="true"/> + <response name="success" type="view" value="ViewArticle"/> + </request-map> + <request-map uri="ViewBlogRss"> + <security https="true" auth="true"/> + <event type="rome" invoke="generateBlogRssFeed"/> + <response name="success" type="none"/> + <response name="error" type="view" value="error"/> + </request-map> + <request-map uri="ViewResponse"> + <security https="true" auth="true"/> + <response name="success" type="view" value="ViewResponse"/> + </request-map> + <request-map uri="LatestResponses"> + <security https="true" auth="true"/> + <response name="success" type="view" value="LatestResponses"/> + </request-map> + <request-map uri="EditArticle"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditArticle"/> + </request-map> + <request-map uri="EditBlogImage"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditBlogImage"/> + </request-map> + <request-map uri="EditBlogText"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditBlogText"/> + </request-map> + <request-map uri="RespondBlog"> + <security https="true" auth="true"/> + <response name="success" type="view" value="RespondBlog"/> + </request-map> + <request-map uri="persistBlogSummary"> + <security https="true" auth="true"/> + <event type="service" invoke="persistContentAndAssoc"/> + <response name="success" type="view" value="EditBlog"/> + <response name="error" type="view" value="EditBlog"/> + </request-map> + <request-map uri="persistBlogText"> + <security https="true" auth="true"/> + <event type="service" invoke="persistContentAndAssoc"/> + <response name="success" type="view" value="EditBlog"/> + <response name="error" type="view" value="EditBlog"/> + </request-map> + <request-map uri="persistBlogImage"> + <security https="true" auth="true"/> + <event type="service" invoke="persistContentAndAssoc"/> + <response name="success" type="view" value="EditBlog"/> + <response name="error" type="view" value="EditBlog"/> + </request-map> + <request-map uri="createBlogResponse"> + <security https="true" auth="true"/> + <event type="service" invoke="createTextContent"/> + <response name="success" type="view" value="ViewResponse"/> + <response name="error" type="view" value="ViewResponse"/> + </request-map> + <request-map uri="updateBlogResponse"> + <security https="false" auth="true"/> + <event type="service" invoke="updateTextContent"/> + <response name="success" type="view" value="ViewResponse"/> + <response name="error" type="view" value="ViewResponse"/> + </request-map> + <request-map uri="defaultcontent"> + <security https="true" auth="true"/> + <response name="success" type="view" value="defaultcontent"/> + </request-map> + <request-map uri="showcontenttree"> + <security https="true" auth="true"/> + <response name="success" type="view" value="showcontenttree"/> + </request-map> + <request-map uri="viewcontent"> + <security https="true" auth="true"/> + <response name="success" type="view" value="viewcontent"/> + </request-map> <!-- ================ Forum Requests ================= --> <request-map uri="findForumGroups"> <security https="true" auth="true"/> @@ -1666,6 +1777,19 @@ <view-map name="main" type="screen" page="component://content/widget/CommonScreens.xml#main"/> <view-map name="fonts.fo" type="screenfop" page="component://content/widget/CommonScreens.xml#fonts.fo" content-type="application/pdf" encoding="none"/> + <view-map name="blogMain" page="component://content/widget/forum/BlogScreens.xml#BlogMain" type="screen"/> + <view-map name="blogContent" page="component://content/widget/forum/BlogScreens.xml#BlogContent" type="screen"/> + <view-map name="ViewArticle" page="component://content/widget/forum/BlogScreens.xml#ViewArticle" type="screen"/> + <view-map name="EditBlog" type="screen" page="component://content/widget/forum/BlogScreens.xml#EditBlog"/> + <view-map name="NewArticle" page="component://content/widget/forum/BlogScreens.xml#NewArticle" type="screen"/> + <view-map name="EditArticle" page="component://content/widget/forum/BlogScreens.xml#EditArticle" type="screen"/> + <view-map name="ViewResponse" page="component://content/widget/forum/BlogScreens.xml#BlogMain" type="screen"/> + <view-map name="RespondBlog" type="screen" page="component://ecommerce/widget/blog/BlogScreens.xml#AddBlogResponse"/> + <view-map name="EditBlogText" type="screen" page="component://ecommerce/widget/blog/BlogScreens.xml#EditBlogResponse"/> + <view-map name="EditBlogImage" type="screen" page="component://ecommerce/widget/blog/BlogScreens.xml#EditBlogResponse"/> + <view-map name="EditBlogResponse" type="screen" page="component://ecommerce/widget/blog/BlogScreens.xml#EditBlogResponse"/> + <view-map name="LatestResponses" type="screen" page="component://ecommerce/widget/blog/BlogScreens.xml#LatestResponses"/> + <view-map name="FindForumGroups" page="component://content/widget/forum/ForumScreens.xml#FindForumGroups" type="screen"/> <view-map name="ForumGroupRoles" page="component://content/widget/forum/ForumScreens.xml#ForumGroupRoles" type="screen"/> <view-map name="ForumGroupPurposes" page="component://content/widget/forum/ForumScreens.xml#ForumGroupPurposes" type="screen"/> Modified: ofbiz/trunk/applications/content/widget/content/ContentMenus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/content/ContentMenus.xml?rev=734306&r1=734305&r2=734306&view=diff ============================================================================== --- ofbiz/trunk/applications/content/widget/content/ContentMenus.xml (original) +++ ofbiz/trunk/applications/content/widget/content/ContentMenus.xml Tue Jan 13 18:21:21 2009 @@ -23,6 +23,7 @@ <menu-item name="websites" title="${uiLabelMap.ContentWebSites}"><link target="FindWebSite"/></menu-item> <menu-item name="survey" title="${uiLabelMap.ContentSurvey}"><link target="FindSurvey"/></menu-item> <menu-item name="Forum" title="${uiLabelMap.ContentForum}"><link target="findForumGroups"/></menu-item> + <menu-item name="Blog" title="${uiLabelMap.ContentBlog}"><link target="blogMain"/></menu-item> <menu-item name="Content" title="${uiLabelMap.ContentContent}"><link target="findContent"/></menu-item> <menu-item name="DataResource" title="${uiLabelMap.ContentDataResource}"><link target="findDataResource"/></menu-item> <menu-item name="ContentSetupMenu" title="${uiLabelMap.ContentContentSetup}"><link target="ContentSetupMenu"/></menu-item> @@ -132,4 +133,20 @@ <link target="WebSiteCms?webSiteId=${parameters.webSiteId}"/> </menu-item> </menu> + <menu name="blogSub" menu-container-style="button-bar button-style-2" default-menu-item-name="content" default-permission-operation="HAS_AUTHOR_ROLE|CONTENT_ADMIN" + default-permission-entity-action="_ADMIN" default-associated-content-id="${userLogin.userLoginId}" selected-menuitem-context-field-name="currentMenuItemName" + title="" type="simple"> + + <menu-item name="NewBlog" title="${uiLabelMap.CommonCreateNew}"> + <link target="editBlog"/> + </menu-item> + </menu> + <menu name="blogArtSub" menu-container-style="button-bar button-style-2" default-menu-item-name="content" default-permission-operation="HAS_AUTHOR_ROLE|CONTENT_ADMIN" + default-permission-entity-action="_ADMIN" default-associated-content-id="${userLogin.userLoginId}" selected-menuitem-context-field-name="currentMenuItemName" + title="" type="simple"> + + <menu-item name="NewBlog" title="${uiLabelMap.CommonCreateNew}"> + <link target="NewArticle?blogContentId=${parameters.blogContentId}"/> + </menu-item> + </menu> </menus> Added: ofbiz/trunk/applications/content/widget/forum/BlogForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/forum/BlogForms.xml?rev=734306&view=auto ============================================================================== --- ofbiz/trunk/applications/content/widget/forum/BlogForms.xml (added) +++ ofbiz/trunk/applications/content/widget/forum/BlogForms.xml Tue Jan 13 18:21:21 2009 @@ -0,0 +1,63 @@ +<?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. +--> + +<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> + <form name="ListBlogs" type="list" list-name="blogs" separate-columns="true" paginate-target="blogMain" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + <field name="contentId"><hidden/></field> + <field name="contentName" widget-style="tabletext"> + <hyperlink target="editBlog?blogContentId=${contentId}" description="${contentName} [${contentId}]"/> + </field> + <field name="description"><display/></field> + <field name="statusId"><display-entity entity-name="StatusItem"></display-entity></field> + <field name="localeString"><display-entity entity-name="CountryCode" key-field-name="countryCode" description="${countryName}[${countryCode}]"></display-entity></field> + <field name="contentTypeId"><display-entity entity-name="ContentType"></display-entity></field> + <field name="lastModifiedDate"><display type="date"/></field> + <field name="lastModifiedByUserLogin"><display/></field> + <field name="articles"><hyperlink target="blogContent?blogContentId=${contentId}" description="${uiLabelMap.ContentBlogActicleList}"/></field> + </form> + + <form name="BlogContent" type="list" list-name="blogContent" separate-columns="true" + odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> + <field name="contentId"><hidden/></field> + <field name="contentName" widget-style="tabletext"> + <hyperlink target="EditArticle?articleContentId=${contentId}&blogContentId=${parameters.blogContentId}" description="${contentName} [${contentId}]"/> + </field> + <field name="description"><display/></field> + <field name="statusId"><display-entity entity-name="StatusItem"></display-entity></field> + <field name="localeString"><display-entity entity-name="CountryCode" key-field-name="countryCode" description="${countryName}[${countryCode}]"></display-entity></field> + <field name="contentTypeId"><display-entity entity-name="ContentType"></display-entity></field> + </form> + + <form name="EditBlog" type="single" target="updateBlog" title="" default-map-name="content" + header-row-style="header-row" default-table-style="basic-table"> + <alt-target use-when="content==null" target="newBlog"/> + <field name="contentId"><hidden/></field> + <field name="contentTypeId" use-when="content==null"><hidden value="WEB_SITE_PUB_PT"/></field> + <field name="contentIdFrom" use-when="content==null"><hidden value="BLOGROOT"/></field> + <field name="contentAssocTypeId"><hidden value="SUB_CONTENT"/></field> + <field name="contentName" title="${uiLabelMap.BlogName}"><text size="30" maxlength="60"/></field> + <field name="description" title="${uiLabelMap.BlogDescription}"><text size="30" maxlength="60"/></field> + <field name="submitButton" title="${uiLabelMap.CommonSubmit}"><submit button-type="button"/></field> + </form> + + +</forms> Propchange: ofbiz/trunk/applications/content/widget/forum/BlogForms.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/content/widget/forum/BlogForms.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/content/widget/forum/BlogForms.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml?rev=734306&view=auto ============================================================================== --- ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml (added) +++ ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml Tue Jan 13 18:21:21 2009 @@ -0,0 +1,289 @@ +<?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://ofbiz.apache.org/dtds/widget-screen.xsd"> + + <screen name="commonBlogDecorator"> + <section> + <actions> + <set field="headerItem" value="Blog"/> + <property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/> + <set field="pageTitle" value="${uiLabelMap.${titleProperty}}"/> + </actions> + <widgets> + <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <section> + <condition> + <if-has-permission permission="CONTENTMGR" action="_VIEW"/> + </condition> + <widgets> + <container style="h1"><label text="${pageTitle}"/></container> + <decorator-section-include name="body"/> + </widgets> + <fail-widgets> + <label style="h3">You do not have permission to view this page. ("CONTENTMGR_VIEW" or "CONTENTMGR_ADMIN" needed)</label> + </fail-widgets> + </section> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + + <screen name="BlogMain"> + <section> + <actions> + <set field="headerItem" value="Blog"/> + <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-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-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-list> + </condition-list> + <order-by field-name="contentName"/> + </entity-condition> + </actions> + <widgets> + <decorator-screen name="commonBlogDecorator"> + <decorator-section name="body"> + <include-menu name="blogSub" location="component://content/widget/content/ContentMenus.xml"/> + <screenlet title="${uiLabelMap.ContentBlogList}" navigation-form-name="ListBlogs"> + <include-form name="ListBlogs" location="component://content/widget/forum/BlogForms.xml"/> + </screenlet> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + <screen name="EditBlog"> + <section> + <actions> + <set field="contentId" from-field="parameters.blogContentId"/> + <entity-one entity-name="Content" value-name="content"/> + </actions> + <widgets> + <decorator-screen name="commonBlogDecorator"> + <decorator-section name="body"> + <screenlet title="${uiLabelMap.ContentBlogEdit}"> + <include-form name="EditBlog" location="component://content/widget/forum/BlogForms.xml"/> + </screenlet> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + + <screen name="BlogContent"> + <section> + <actions> + <set field="headerItem" value="Blog"/> + <entity-condition entity-name="ContentAssocViewTo" use-cache="false" list-name="blogContent"> + <condition-list combine="and"> + <condition-expr field-name="contentIdStart" operator="equals" env-name="parameters.blogContentId"/> + <condition-expr field-name="caContentAssocTypeId" operator="equals" value="PUBLISH_LINK"/> + <condition-expr field-name="caThruDate" operator="equals" value=""/> + </condition-list> + <order-by field-name="caFromDate DESC"/> + </entity-condition> + </actions> + <widgets> + <decorator-screen name="commonBlogDecorator"> + <decorator-section name="body"> + <include-menu name="blogArtSub" location="component://content/widget/content/ContentMenus.xml"/> + <screenlet title="${uiLabelMap.ContentBlogActicleList}"> + <include-form name="BlogContent" location="component://content/widget/forum/BlogForms.xml"/> + </screenlet> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> + + <screen name="NewArticle"> + <section> + <actions> + <set field="blogContentId" from-field="parameters.blogContentId"/> + + <set field="crPerm.ownerContentId" from-field="parameters.blogContentId"/> + <set field="crPerm.contentOperationId" value="CONTENT_CREATE"/> + <set field="crPerm.contentPurposeTypeId" value="ARTICLE"/> + </actions> + <widgets> + <section> + <condition> + <if-service-permission service-name="genericContentPermission" main-action="CREATE" context-map="crPerm"/> + </condition> + <widgets> + <decorator-screen name="commonBlogDecorator"> + <decorator-section name="body"> + <include-form name="CreateArticle" location="component://ecommerce/widget/blog/BlogForms.xml"/> + </decorator-section> + </decorator-screen> + </widgets> + <fail-widgets> + <label text="Permissions failed."></label> + </fail-widgets> + </section> + </widgets> + </section> + </screen> + + <screen name="EditArticle"> + <section> + <actions> + <set field="blogContentId" from-field="parameters.blogContentId"/> + + <set field="upPerm.contentId" from-field="parameters.blogContentId"/> + <set field="upPerm.contentOperationId" value="CONTENT_UPDATE"/> + <set field="upPerm.contentPurposeTypeId" value="ARTICLE"/> + </actions> + <widgets> + <section> + <condition> + <if-service-permission service-name="genericContentPermission" main-action="UPDATE" context-map="upPerm"/> + </condition> + <actions> + <set field="contentId" from-field="parameters.articleContentId"/> + + <entity-one entity-name="Content" value-name="content"> + <field-map env-name="contentId" field-name="contentId"/> + </entity-one> + + <set field="content.contentId" from-field="content.contentId" default-value="${parameters.contentId}"/> + <set field="content.ownerContentId" from-field="content.ownerContentId" default-value="${parameters.blogContentId}"/> + <set field="content.contentTypeId" value="DOCUMENT"/> + <set field="thisContentId" from-field="content.contentId"/> + + <!-- see if the main text is directly attached to the article (no template --> + <entity-one entity-name="ElectronicText" value-name="mainText" use-cache="true"> + <field-map env-name="content.dataResourceId" field-name="dataResourceId"/> + </entity-one> + + <!-- get the summary sub-content --> + <set field="summaryMapKey" value="SUMMARY"/> + <service service-name="getSubContent" result-map-name="result" auto-field-map="false"> + <field-map field-name="contentId" env-name="content.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> + + <!-- get the image sub-content --> + <set field="imageMapKey" value="IMAGE"/> + <service service-name="getSubContent" result-map-name="imageResult" auto-field-map="false"> + <field-map field-name="contentId" env-name="content.contentId"/> + <field-map field-name="mapKey" env-name="imageMapKey"/> + </service> + <set field="imageContent" from-field="imageResult.view" type="Object"/> + + <!-- the final main text if it doesn't already exist --> + <set field="mainMapKey" value="MAIN"/> + <service service-name="getSubContent" result-map-name="textResult" auto-field-map="false"> + <field-map field-name="contentId" env-name="content.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="mainText" use-cache="true"> + <field-map env-name="textResult.view.dataResourceId" field-name="dataResourceId"/> + </entity-one> + </actions> + <widgets> + <decorator-screen name="commonBlogDecorator"> + <decorator-section name="body"> + <include-form name="EditArticle" location="component://ecommerce/widget/blog/BlogForms.xml"/> + </decorator-section> + </decorator-screen> + </widgets> + <fail-widgets> + <label text="Permissions failed."></label> + </fail-widgets> + </section> + </widgets> + </section> + </screen> + <screen name="ViewArticle"> + <section> + <actions> + <set field="articleContentId" from-field="parameters.articleContentId"/> + <set field="ownerContentId" from-field="parameters.ownerContentId"/> + <set field="blogContentId" from-field="parameters.blogContentId"/> + <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}"/> + + <!-- for permission service --> + <set field="upPerm.contentOperationId" value="CONTENT_UPDATE"/> + <set field="upPerm.contentPurposeTypeId" value="ARTICLE"/> + <set field="upPerm.ownerContentId" from-field="ownerContentId"/> + <set field="upPerm.contentId" from-field="articleContentId"/> + </actions> + <widgets> + <decorator-screen name="commonBlogDecorator"> + <decorator-section name="body"> + <label text="<p/>"/> + <container style="bloghr"> + <container style="leftjustify"> + <label text="${content.contentName}: ${content.description}" style="blogtitle"/> + </container> + <section> + <condition> + <if-service-permission service-name="genericContentPermission" main-action="UPDATE" context-map="upPerm"/> + </condition> + <widgets> + <container style="rightjustify"> + <link text="Edit" target="EditArticle?contentId=${articleContentId}&blogContentId=${blogContentId}" style="buttontext"/> + </container> + </widgets> + </section> + </container> + <container style="blogcontentwrapper"> + <container style="resposetext"> + <label text="Posted: ${content.createdDate}" style="responsetext"/> + <label text="<p/>"/> + </container> + <content content-id="${articleContentId}"/> + </container> + + <label text="<p/>"/> + <include-screen name="BlogResponses"/> + <label text="<p/>"/> + <!-- + <link text="Latest" target="LatestResponses?ownerContentId=${webPubPt}" /> + --> + <include-screen name="AddBlogResponse"/> + <label text="<p/>"/> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </screen> +</screens> \ No newline at end of file Propchange: ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml |
Free forum by Nabble | Edit this page |