You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2009/01/21 07:20:54 UTC
svn commit: r736237 - in /ofbiz/trunk/applications/content:
script/org/ofbiz/content/blog/BlogServices.xml servicedef/services.xml
widget/content/ContentMenus.xml widget/forum/BlogForms.xml
widget/forum/BlogScreens.xml
Author: hansbak
Date: Tue Jan 20 22:20:53 2009
New Revision: 736237
URL: http://svn.apache.org/viewvc?rev=736237&view=rev
Log:
some more updates to the blog backoffice maintenance, now fairly complete although responses still missing
Modified:
ofbiz/trunk/applications/content/script/org/ofbiz/content/blog/BlogServices.xml
ofbiz/trunk/applications/content/servicedef/services.xml
ofbiz/trunk/applications/content/widget/content/ContentMenus.xml
ofbiz/trunk/applications/content/widget/forum/BlogForms.xml
ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml
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=736237&r1=736236&r2=736237&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 20 22:20:53 2009
@@ -143,6 +143,12 @@
<set-service-fields service-name="updateContent" map="parameters" to-map="updContent"/>
<set field="updContent.dataResourceId" from-field="parameters.templateDataResourceId"/>
<call-service service-name="updateContent" in-map-name="updContent"/>
+ <if-compare-field field="parameters.statusId" operator="not-equals" to-field="statusId">
+ <if-not-empty field="imageContent">
+ <set field="imageContent.status.Id" from-field="parameters.statusId"/>
+ <store-value value-field="imageContent"/>
+ </if-not-empty>
+ </if-compare-field>
</then>
</if>
@@ -219,26 +225,27 @@
<condition-list combine="and">
<condition-expr field-name="contentIdStart" operator="equals" from-field="parameters.contentId"/>
<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>
+ <filter-list-by-date list="unfilteredList" to-list="blogItems"/>
<set field="blogList[]"/>
- <iterate entry="view" list="unfilteredList">
- <set-service-fields service-name="genericContentPermission" map="view" to-map="mapIn"/>
+ <iterate entry="blogItem" list="blogItems">
+ <set-service-fields service-name="genericContentPermission" map="blogItem" to-map="mapIn"/>
+ <set field="mapIn.ownerContentId" from-field="parameters.contentId"/>
<set field="mapIn.mainAction" value="VIEW"/>
<call-service service-name="genericContentPermission" in-map-name="mapIn">
<result-to-field result-name="hasPermission" field="hasPermission"/>
</call-service>
<if-compare operator="equals" field="hasPermission" value="true" type="Boolean">
- <set field="blogList[]" from-field="view"/>
+ <set field="blogList[]" from-field="blogItem"/>
<else>
<set field="mapIn.mainAction" value="UPDATE"/>
<call-service service-name="genericContentPermission" in-map-name="mapIn">
<result-to-field result-name="hasPermission" field="hasPermission"/>
</call-service>
<if-compare operator="equals" field="hasPermission" value="true" type="Boolean">
- <set field="blogList[]" from-field="view"/>
+ <set field="blogList[]" from-field="blogItem"/>
</if-compare>
</else>
</if-compare>
@@ -271,10 +278,14 @@
<field-to-result field="content.contentName" result-name="contentName"/>
<field-to-result field="content.description" result-name="description"/>
<field-to-result field="content.statusId" result-name="statusId"/>
- <field-to-result field="content.dataResourceId" result-name="templateDataResourceId"/>
+ <if-not-empty field="imageContent">
+ <field-to-result field="content.dataResourceId" result-name="templateDataResourceId"/>
+ </if-not-empty>
<field-to-result field="articleText.textData" result-name="articleData"/>
<field-to-result field="summaryText.textData" result-name="summaryData"/>
- <field-to-result field="imageContent.dataResourceId" result-name="imageDataResourceId"/>
+ <field-to-result field="imageContent.contentId" result-name="imageContentId"/>
+ <field-to-result field="mainContent.contentId" result-name="articleContentId"/>
+ <field-to-result field="summaryContent.contentId" result-name="summaryContentId"/>
<field-to-result field="parameters.blogContentId" result-name="blogContentId"/>
<else>
<set from-field="content.contentId" field="contentId"/>
Modified: ofbiz/trunk/applications/content/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services.xml?rev=736237&r1=736236&r2=736237&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/content/servicedef/services.xml Tue Jan 20 22:20:53 2009
@@ -1095,7 +1095,9 @@
<attribute name="templateDataResourceId" type="String" mode="OUT" optional="true"/>
<attribute name="summaryData" type="String" mode="OUT" optional="true"/>
<attribute name="articleData" type="String" mode="OUT" optional="true"/>
- <attribute name="imageDataResourceId" type="String" mode="OUT" optional="true"/>
+ <attribute name="imageContentId" type="String" mode="OUT" optional="true"/>
+ <attribute name="articleContentId" type="String" mode="OUT" optional="true"/>
+ <attribute name="summaryContentId" type="String" mode="OUT" optional="true"/>
</service>
<service name="getOwnedOrPublishedBlogEntries" engine="simple" location="org/ofbiz/content/blog/BlogServices.xml" invoke="getOwnedOrPublishedBlogEntries"
auth="true" transaction-timeout="72000">
Modified: ofbiz/trunk/applications/content/widget/content/ContentMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/content/ContentMenus.xml?rev=736237&r1=736236&r2=736237&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/content/ContentMenus.xml (original)
+++ ofbiz/trunk/applications/content/widget/content/ContentMenus.xml Tue Jan 20 22:20:53 2009
@@ -39,21 +39,21 @@
<menu-item name="content" title="${uiLabelMap.ContentContent}">
<condition>
- <not><if-empty field-name="currentValue.contentId"/></not>
+ <not><if-empty field="currentValue.contentId"/></not>
</condition>
<link target="EditContent?contentId=${parameters.contentId}"/>
</menu-item>
<menu-item name="association" title="${uiLabelMap.ContentAssociation}">
<condition>
- <not><if-empty field-name="currentValue.contentId"/></not>
+ <not><if-empty field="currentValue.contentId"/></not>
</condition>
<link target="EditContentAssoc?contentId=${parameters.contentId}"/>
</menu-item>
<menu-item name="role" title="${uiLabelMap.FormFieldTitle_roles}" >
<condition>
- <not><if-empty field-name="currentValue.contentId"/></not>
+ <not><if-empty field="currentValue.contentId"/></not>
</condition>
<link target="EditContentRole?contentId=${parameters.contentId}"/>
</menu-item>
@@ -61,7 +61,7 @@
<menu-item name="purpose" title="${uiLabelMap.FormFieldTitle_purposes}" >
<condition>
<not>
- <if-empty field-name="currentValue.contentId" />
+ <if-empty field="currentValue.contentId" />
</not>
</condition>
<link target="EditContentPurpose?contentId=${parameters.contentId}"/>
@@ -69,28 +69,28 @@
<menu-item name="attribute" title="${uiLabelMap.ContentAttribute}" >
<condition>
- <not><if-empty field-name="currentValue.contentId"/></not>
+ <not><if-empty field="currentValue.contentId"/></not>
</condition>
<link target="EditContentAttribute?contentId=${parameters.contentId}"/>
</menu-item>
<menu-item name="websites" title="${uiLabelMap.ContentWebSites}">
<condition>
- <not><if-empty field-name="currentValue.contentId"/></not>
+ <not><if-empty field="currentValue.contentId"/></not>
</condition>
<link target="ListWebSite?contentId=${parameters.contentId}"/>
</menu-item>
<menu-item name="metaData" title="${uiLabelMap.ContentMetadata}" >
<condition>
- <not><if-empty field-name="currentValue.contentId"/></not>
+ <not><if-empty field="currentValue.contentId"/></not>
</condition>
<link target="EditContentMetaData?contentId=${parameters.contentId}"/>
</menu-item>
<menu-item name="workEffort" title="${uiLabelMap.WorkEffortWorkEffort}" >
<condition>
- <not><if-empty field-name="currentValue.contentId"/></not>
+ <not><if-empty field="currentValue.contentId"/></not>
</condition>
<link target="EditContentWorkEfforts?contentId=${parameters.contentId}"/>
</menu-item>
@@ -102,13 +102,13 @@
<menu-item name="NewContent" title="${uiLabelMap.CommonCreateNew}">
<condition>
- <not><if-empty field-name="currentValue.contentId"/></not>
+ <not><if-empty field="currentValue.contentId"/></not>
</condition>
<link target="EditContent"/>
</menu-item>
<menu-item name="NewContentAssoc" title="${uiLabelMap.CommonCreateNew} ${uiLabelMap.ContentAssociation}">
<condition>
- <if-compare field-name="tabButtonItem" operator="equals" value="association"/>
+ <if-compare field="tabButtonItem" operator="equals" value="association"/>
</condition>
<link target="EditContentAssoc?contentId=${parameters.contentId}"/>
</menu-item>
@@ -136,9 +136,15 @@
<menu name="blog" menu-container-style="button-bar tab-bar" default-selected-style="selected" default-menu-item-name="content" default-permission-operation="CONTENT_ADMIN"
default-permission-entity-action="_ADMIN" default-associated-content-id="${userLogin.userLoginId}" selected-menuitem-context-field-name="tabButtonItem"
title="" type="simple">
+ <menu-item name="ListBlog" title="${uiLabelMap.CommonList}">
+ <link target="blogMain"/>
+ </menu-item>
<menu-item name="EditBlog" title="${uiLabelMap.CommonEdit}">
<link target="editBlog?blogContentId=${parameters.blogContentId}"/>
</menu-item>
+ <menu-item name="Articles" title="${uiLabelMap.ContentBlogActicleList}">
+ <link target="blogContent?blogContentId=${parameters.blogContentId}"/>
+ </menu-item>
<menu-item name="Owners" title="${uiLabelMap.FormFieldTitle_roles}">
<link target="EditContentRole?contentId=${parameters.blogContentId}"/>
</menu-item>
@@ -151,12 +157,28 @@
<link target="editBlog"/>
</menu-item>
</menu>
+
+ <menu name="blogArt" menu-container-style="button-bar tab-bar" default-selected-style="selected" default-menu-item-name="content" default-permission-operation="CONTENT_ADMIN"
+ default-permission-entity-action="_ADMIN" default-associated-content-id="${userLogin.userLoginId}" selected-menuitem-context-field-name="tabButtonItem"
+ title="" type="simple">
+ <menu-item name="ListlogArt" title="${uiLabelMap.CommonList}">
+ <link target="blogContent?blogContentId=${parameters.blogContentId}"/>
+ </menu-item>
+ <menu-item name="ViewBlogArt" title="${uiLabelMap.CommonView}">
+ <link target="ViewBlogArticle?articleContentId=${parameters.articleContentId}&blogContentId=${parameters.blogContentId}"/>
+ </menu-item>
+ <menu-item name="EditBlogArt" title="${uiLabelMap.CommonEdit}">
+ <link target="EditBlogArticle?articleContentId=${parameters.articleContentId}&blogContentId=${parameters.blogContentId}"/>
+ </menu-item>
+ <menu-item name="Owners" title="${uiLabelMap.FormFieldTitle_roles}">
+ <link target="EditContentRole?contentId=${parameters.articleContentId}"/>
+ </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="NewBlogArticle?blogContentId=${parameters.blogContentId}"/>
+ <link target="EditBlogArticle?blogContentId=${parameters.blogContentId}"/>
</menu-item>
</menu>
</menus>
Modified: ofbiz/trunk/applications/content/widget/forum/BlogForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/forum/BlogForms.xml?rev=736237&r1=736236&r2=736237&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/forum/BlogForms.xml (original)
+++ ofbiz/trunk/applications/content/widget/forum/BlogForms.xml Tue Jan 20 22:20:53 2009
@@ -32,16 +32,14 @@
<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" paginate-target="blogContent"
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="EditBlogArticle?articleContentId=${contentId}&blogContentId=${parameters.blogContentId}" description="${contentName} [${contentId}]"/>
+ <hyperlink target="ViewBlogArticle?articleContentId=${contentId}&blogContentId=${parameters.blogContentId}" description="${contentName} [${contentId}]"/>
</field>
- <field name="View" title="${uiLabelMap.CommonView}"><hyperlink target="ViewBlogArticle?articleContentId=${contentId}&blogContentId=${parameters.blogContentId}" description="${uiLabelMap.CommonView}"/></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>
Modified: ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml?rev=736237&r1=736236&r2=736237&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml (original)
+++ ofbiz/trunk/applications/content/widget/forum/BlogScreens.xml Tue Jan 20 22:20:53 2009
@@ -36,7 +36,6 @@
<if-has-permission permission="CONTENTMGR" action="_VIEW"/>
</condition>
<widgets>
- <container style="h1"><label text="${pageTitle}"/></container>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
@@ -56,11 +55,44 @@
<decorator-section name="body">
<section>
<condition>
- <not><if-empty field-name="parameters.blogContentId"/></not>
+ <not><if-empty field="parameters.blogContentId"/></not>
</condition>
+ <actions>
+ <set field="contentId" from-field="parameters.blogContentId"/>
+ <entity-one entity-name="Content" value-field="blogContent"/>
+ </actions>
<widgets>
<include-menu name="blog" location="component://content/widget/content/ContentMenus.xml"/>
<include-menu name="blogSub" location="component://content/widget/content/ContentMenus.xml"/>
+ <label style="h1" text="${blogContent.contentName}"/>
+ <link style="h1" text=" [${blogContent.contentId}]" target="blogContent?blogContentId=${parameters.blogContentId}"/>
+ </widgets>
+ </section>
+ <decorator-section-include name="body"/>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+
+ <screen name="blogArtDecorator">
+ <section>
+ <widgets>
+ <decorator-screen name="commonBlogDecorator">
+ <decorator-section name="body">
+ <section>
+ <condition>
+ <not><if-empty field="parameters.articleContentId"/></not>
+ </condition>
+ <actions>
+ <set field="contentId" from-field="parameters.blogContentId"/>
+ <entity-one entity-name="Content" value-field="blogContent"/>
+ </actions>
+ <widgets>
+ <include-menu name="blogArt" location="component://content/widget/content/ContentMenus.xml"/>
+ <include-menu name="blogArtSub" location="component://content/widget/content/ContentMenus.xml"/>
+ <label style="h1" text="${blogContent.contentName}"/>
+ <link style="h1" text=" [${blogContent.contentId}]" target="blogContent?blogContentId=${parameters.blogContentId}"/>
</widgets>
</section>
<decorator-section-include name="body"/>
@@ -74,16 +106,16 @@
<section>
<actions>
<set field="headerItem" value="Blog"/>
- <entity-condition entity-name="ContentAssocViewTo" list-name="blogs" use-cache="true">
+ <entity-condition entity-name="ContentAssocViewTo" list="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-expr field-name="caFromDate" operator="equals" from-field="null"/>
+ <condition-expr field-name="caFromDate" operator="less-equals" from-field="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" from-field="nullField"/>
+ <condition-expr field-name="caThruDate" operator="greater-equals" from-field="nowTimestamp"/>
</condition-list>
</condition-list>
<order-by field-name="contentName"/>
@@ -106,7 +138,7 @@
<actions>
<set field="tabButtonItem" value="EditBlog"/>
<set field="contentId" from-field="parameters.blogContentId"/>
- <entity-one entity-name="Content" value-name="content"/>
+ <entity-one entity-name="Content" value-field="content"/>
</actions>
<widgets>
<decorator-screen name="blogDecorator">
@@ -123,10 +155,10 @@
<screen name="BlogContent">
<section>
<actions>
- <set field="headerItem" value="Blog"/>
- <entity-condition entity-name="ContentAssocViewTo" use-cache="false" list-name="blogContent">
+ <set field="tabButtonItem" value="Articles"/>
+ <entity-condition entity-name="ContentAssocViewTo" use-cache="false" list="blogContent">
<condition-list combine="and">
- <condition-expr field-name="contentIdStart" operator="equals" env-name="parameters.blogContentId"/>
+ <condition-expr field-name="contentIdStart" operator="equals" from-field="parameters.blogContentId"/>
<condition-expr field-name="caContentAssocTypeId" operator="equals" value="PUBLISH_LINK"/>
<condition-expr field-name="caThruDate" operator="equals" value=""/>
</condition-list>
@@ -134,9 +166,8 @@
</entity-condition>
</actions>
<widgets>
- <decorator-screen name="commonBlogDecorator">
+ <decorator-screen name="blogDecorator">
<decorator-section name="body">
- <include-menu name="blogArtSub" location="component://content/widget/content/ContentMenus.xml"/>
<screenlet title="${uiLabelMap.ContentBlogActicleList}" navigation-form-name="BlogContent">
<include-form name="BlogContent" location="component://content/widget/forum/BlogForms.xml"/>
</screenlet>
@@ -150,7 +181,6 @@
<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"/>
@@ -161,9 +191,9 @@
<if-service-permission service-name="genericContentPermission" main-action="CREATE" context-map="crPerm"/>
</condition>
<widgets>
- <decorator-screen name="commonBlogDecorator">
+ <decorator-screen name="commonBlogDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <include-form name="CreateArticle" location="component://ecommerce/widget/blog/BlogForms.xml"/>
+ <include-form name="EditArticle" location="component://ecommerce/widget/blog/BlogForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -178,72 +208,31 @@
<screen name="EditArticle">
<section>
<actions>
+ <set field="tabButtonItem" value="EditBlogArt"/>
<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"/>
+ <set field="contentId" from-field="parameters.articleContentId"/>
</actions>
<widgets>
<section>
- <condition>
- <if-service-permission service-name="genericContentPermission" main-action="UPDATE" context-map="upPerm"/>
- </condition>
+ <!--condition>
+ <if-service-permission service-name="genericContentPermission" main-action="UPDATE"/>
+ </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>
+ <service service-name="getBlogEntry" result-map="blogEntry" auto-field-map="true"/>
</actions>
<widgets>
- <decorator-screen name="commonBlogDecorator">
+ <decorator-screen name="blogArtDecorator">
<decorator-section name="body">
+ <sub-content content-id="${contentId}" map-key="IMAGE"/>
<include-form name="EditArticle" location="component://ecommerce/widget/blog/BlogForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
<fail-widgets>
- <label text="Permissions failed."></label>
+ <label text="Permissions failed to edit Article: ${contentId} in Blog: ${blogContentId}"></label>
</fail-widgets>
</section>
</widgets>
@@ -252,15 +241,35 @@
<screen name="ViewArticle">
<section>
<actions>
- <entity-one entity-name="Content" value-name="content" use-cache="true">
- <field-map field-name="contentId" env-name="parameters.articleContentId"/>
- </entity-one>
+ <set field="tabButtonItem" value="ViewBlogArt"/>
+ <set field="contentId" from-field="parameters.articleContentId"/>
+ <set field="blogContentId" from-field="parameters.blogContentId"/>
+ <entity-one entity-name="Content" value-field="blogEntry"/>
</actions>
<widgets>
- <decorator-screen name="commonBlogDecorator">
+ <decorator-screen name="blogArtDecorator">
<decorator-section name="body">
- <label text="${content.contentName}: ${content.description}" style="h2"/>
- <content content-id="${parameters.articleContentId}"/>
+ <container><label text="${blogEntry.contentName}: ${blogEntry.description}" style="h2"/></container>
+ <horizontal-separator/>
+ <container style="lefthalf">
+ <label style="h3" text="Image"/>
+ <container>
+ <sub-content content-id="${contentId}" map-key="IMAGE"/>
+ </container>
+ </container>
+ <container style="righthalf">
+ <label style="h3" text="Summary"/>
+ <container>
+ <sub-content content-id="${contentId}" map-key="SUMMARY"/>
+ </container>
+ </container>
+ <container style="clear"/>
+ <horizontal-separator/>
+ <label style="h3" text="Article"/>
+ <container>
+ <sub-content content-id="${contentId}" map-key="MAIN"/>
+ </container>
+ <horizontal-separator/>
</decorator-section>
</decorator-screen>
</widgets>