This is the first pass, there are still a number of references to old permission checking, some services need to be refactored, some replaced with better practices. This is a work in progress. This first pass includes the removal of special BLOG_ roles and status. Replaced with a generic CONTENT_ and CTNT_. Also adds new ECAs to base createContent service which creates OWNER role as well as associations when passed a contentIdTo or contentIdFrom (and TYPE). This will probably replace the persistContentAndAssoc service which is used in many places. Some have been updated in the revision, others will follow. Most code which calls the older permission services are found in .java files. Almost all simple methods have been converted to have the permission in the service def and the code removed from the implementation. Java methods still need to be addressed. The older permission service will output a warning in logs with a stack trace to help track down places where this service is still being called. This is not an error, but may show in logs for the time being. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@509321 13f79535-47bb-0310-9956-ffa450edef68
724 lines
39 KiB
XML
724 lines
39 KiB
XML
<?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="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"/>
|
|
|
|
</actions>
|
|
<widgets>
|
|
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
|
|
<decorator-section name="body">
|
|
<container style="blogs">
|
|
<include-screen name="CommonBlogTitle"/>
|
|
<decorator-section-include name="body"/>
|
|
</container>
|
|
</decorator-section>
|
|
</decorator-screen>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
|
|
<screen name="CommonBlogTitle">
|
|
<section>
|
|
<condition>
|
|
<not>
|
|
<if-empty field-name="parameters.blogContentId"/>
|
|
</not>
|
|
</condition>
|
|
<actions>
|
|
<entity-one entity-name="Content" value-name="blogContent">
|
|
<field-map field-name="contentId" env-name="parameters.blogContentId"/>
|
|
</entity-one>
|
|
|
|
<!-- permission fields -->
|
|
<set field="crPerm.ownerContentId" from-field="blogContentId"/>
|
|
<set field="crPerm.contentOperationId" value="CONTENT_CREATE"/>
|
|
<set field="crPerm.contentPurposeTypeId" value="ARTICLE"/>
|
|
</actions>
|
|
<widgets>
|
|
<container style="bloghr">
|
|
<container style="leftjustify">
|
|
<link text="${blogContent.contentName} - ${blogContent.description}" target="MainBlog?blogContentId=${blogContentId}" style="blogtitle"/>
|
|
</container>
|
|
<container style="rightjustify">
|
|
<section>
|
|
<condition>
|
|
<if-service-permission service-name="genericContentPermission" main-action="CREATE" context-map="crPerm"/>
|
|
</condition>
|
|
<widgets>
|
|
<link text="Add New" target="NewArticle?blogContentId=${blogContentId}" style="buttontext" url-mode="inter-app"/>
|
|
</widgets>
|
|
</section>
|
|
|
|
<link target="ViewBlogRss?blogContentId=${blogContent.contentId}&mainLinkReq=MainBlog&entryLinkReq=ViewArticle" target-window="_blank">
|
|
<image src="/images/feed-icon-14x14.png" id="feedIcon" height="12px"/>
|
|
</link>
|
|
</container>
|
|
</container>
|
|
</widgets>
|
|
<fail-widgets>
|
|
<label text="Unable to find Blog content!" style="blogtitle"/>
|
|
</fail-widgets>
|
|
</section>
|
|
</screen>
|
|
|
|
<screen name="MainBlog">
|
|
<section>
|
|
<actions>
|
|
<set field="MainColumnStyle" value="nocolumns"/>
|
|
<property-to-field property="blog.view.size" field="blogViewSize" resource="blog" default="10"/>
|
|
<set field="blogContentId" from-field="parameters.blogContentId"/>
|
|
<entity-condition entity-name="ContentAssocViewTo" use-cache="false" list-name="blogList">
|
|
<condition-list combine="and">
|
|
<condition-expr field-name="contentIdStart" operator="equals" env-name="blogContentId"/>
|
|
<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="CTNT_PUBLISHED"/>
|
|
</condition-list>
|
|
<order-by field-name="caFromDate DESC"/>
|
|
</entity-condition>
|
|
<set field="viewIndex" from-field="requestParameters.VIEW_INDEX" type="Integer"/>
|
|
|
|
<!-- permission fields -->
|
|
<set field="upPerm.contentId" from-field="blogContentId"/>
|
|
<set field="upPerm.contentOperationId" value="CONTENT_UPDATE"/>
|
|
<set field="upPerm.contentPurposeTypeId" value="ARTICLE"/>
|
|
</actions>
|
|
<widgets>
|
|
<section>
|
|
<!-- if viewer has update permission, show all blogs, even those that were preview only -->
|
|
<condition>
|
|
<if-service-permission service-name="genericContentPermission" main-action="UPDATE" context-map="upPerm"/>
|
|
</condition>
|
|
<actions>
|
|
<service service-name="getOwnedOrPublishedBlogEntries" result-map-name="result">
|
|
<field-map field-name="contentId" env-name="blogContentId"/>
|
|
<field-map field-name="userLogin" env-name="userLogin"/>
|
|
</service>
|
|
<set field="blogList" from-field="result.blogList" default-value="${blogList}"/>
|
|
</actions>
|
|
<widgets/>
|
|
</section>
|
|
<decorator-screen name="CommonBlog">
|
|
<decorator-section name="body">
|
|
<iterate-section list-name="blogList" entry-name="blog" view-size="${blogViewSize}" paginate="true" paginate-target="MainBlog?blogContentId=${blogContentId}&ownerContentId=${parameters.ownerContentId}">
|
|
<section name="firstBlog">
|
|
<condition>
|
|
<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="<p/>"/>
|
|
<link text="${blog.contentName} [${blog.contentId}]" target="ViewArticle?articleContentId=${blog.contentId}&blogContentId=${blogContentId}" style="blogheader" url-mode="inter-app"/>
|
|
<!--
|
|
<link text="Latest" target="LatestResponses?ownerContentId=${blog.ownerContentId}" />
|
|
-->
|
|
<label text="<br/>"/>
|
|
<container style="blogtext">
|
|
<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"/>
|
|
</condition>
|
|
<widgets>
|
|
<container style="blogwrapper">
|
|
<include-menu name="view_edit" location="component://ecommerce/widget/blog/BlogMenus.xml"/>
|
|
<label text="<p/>"/>
|
|
<!--<label text="${blog.contentName} [${blog.contentId}]" style="blogheader"/>-->
|
|
<link text="${blog.contentName} [${blog.contentId}]" target="ViewArticle?articleContentId=${blog.contentId}&blogContentId=${blogContentId}" style="blogheader" url-mode="inter-app"/>
|
|
<!--
|
|
<link text="Latest" target="LatestResponses?ownerContentId=${blog.ownerContentId}" />
|
|
-->
|
|
<label text="<br/>"/>
|
|
<container style="blogtext">
|
|
<label text="${blog.description}" style="blogtext"/>
|
|
</container>
|
|
</container>
|
|
</widgets>
|
|
</section>
|
|
</iterate-section>
|
|
</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="CommonBlog">
|
|
<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="CommonBlog">
|
|
<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="CommonBlog">
|
|
<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>
|
|
|
|
<screen name="ViewResponse">
|
|
<section>
|
|
<actions>
|
|
<set field="contentId" 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"/>
|
|
<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="contentId"/>
|
|
</entity-one>
|
|
<entity-one entity-name="Content" value-name="article">
|
|
<field-map field-name="contentId" env-name="articleContentId"/>
|
|
</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="<p/>"/>
|
|
<container style="bloghr">
|
|
<container style="leftjustify">
|
|
<link text="${article.contentName}: ${article.description}" target="ViewArticle?articleContentId=${articleContentId}&blogContentId=${blogContentId}" style="blogtitle"/>
|
|
<label text=" --> ${content.contentName}: ${content.description}" style="blogtitle"/>
|
|
</container>
|
|
<section>
|
|
<condition>
|
|
<!--
|
|
<if-service-permission service-name="genericContentPermission" main-action="UPDATE"/>
|
|
-->
|
|
<if-empty field-name="foobar"/>
|
|
</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}&ownerContentId=${content.ownerContentId}&articleContentId=${articleContentId}&blogContentId=${blogContentId}&edit=Y" style="buttontext"/>
|
|
</widgets>
|
|
<fail-widgets>
|
|
<link text="View" target="ViewResponse?contentId=${content.contentId}&ownerContentId=${content.ownerContentId}&articleContentId=${articleContentId}&blogContentId=${blogContentId}&edit=N" style="buttontext"/>
|
|
</fail-widgets>
|
|
</section>
|
|
</container>
|
|
</widgets>
|
|
</section>
|
|
</container>
|
|
<container style="blogcontentwrapper">
|
|
<content content-id="${contentId}"/>
|
|
</container>
|
|
<label text="<p/>"/>
|
|
|
|
<include-screen name="AddBlogResponse"/>
|
|
<label text="<p/>"/>
|
|
|
|
<container style="bloghr">
|
|
<label text="Thread: " style="blogtitle"/>
|
|
</container>
|
|
<include-tree name="ResponseTree" location="component://ecommerce/widget/blog/BlogTrees.xml"/>
|
|
<label text="<p/>"/>
|
|
|
|
<section>
|
|
<condition>
|
|
<or>
|
|
<if-compare field-name="content.statusId" operator="equals" value="CTNT_INITIAL_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 comment: " style="blogtitle"/>
|
|
</container>
|
|
<include-screen name="EditBlogResponse"/>
|
|
</widgets>
|
|
</section>
|
|
</decorator-section>
|
|
</decorator-screen>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
|
|
<screen name="BlogContent">
|
|
<section>
|
|
<condition>
|
|
<not>
|
|
<if-empty field-name="contentId"/>
|
|
</not>
|
|
</condition>
|
|
<actions/>
|
|
|
|
<widgets>
|
|
<content content-id="${contentId}"/>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
|
|
<screen name="AdminBlog">
|
|
<section>
|
|
<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"/>
|
|
</decorator-section>
|
|
</decorator-screen>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
|
|
<screen name="BlogResponses">
|
|
<section>
|
|
<actions>
|
|
<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-list>
|
|
<order-by field-name="caFromDate DESC"/>
|
|
</entity-condition>
|
|
|
|
<set field="viewIndex" from-field="requestParameters.VIEW_INDEX" type="Integer"/>
|
|
</actions>
|
|
<widgets>
|
|
<container style="bloghr">
|
|
<label text="Comments: " style="blogtitle"/>
|
|
</container>
|
|
<iterate-section list-name="responseList" entry-name="rsp" view-size="10">
|
|
<section name="Blog Responses">
|
|
<widgets>
|
|
<include-screen name="responseTreeLine"/>
|
|
</widgets>
|
|
</section>
|
|
</iterate-section>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
|
|
<screen name="LatestResponses">
|
|
<section>
|
|
<actions>
|
|
<entity-condition entity-name="ContentAssocDataResourceViewTo" 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-list>
|
|
<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">
|
|
<section name="Blog Responses">
|
|
<widgets>
|
|
<include-screen name="responseTreeLine"/>
|
|
</widgets>
|
|
</section>
|
|
</iterate-section>
|
|
</decorator-section>
|
|
</decorator-screen>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
|
|
<screen name="responseTreeLine">
|
|
<section>
|
|
<widgets>
|
|
<section>
|
|
<condition>
|
|
<if-compare-field field-name="responseContentId" operator="not-equals" to-field-name="rsp.contentId"/>
|
|
</condition>
|
|
<widgets>
|
|
<container>
|
|
<link text="${rsp.contentName}[${rsp.contentId}]" target="ViewResponse?contentId=${rsp.contentId}&ownerContentId=${rsp.ownerContentId}&articleContentId=${articleContentId}&blogContentId=${parameters.blogContentId}" style="responseheader"/>
|
|
<link text="View" target="ViewResponse?contentId=${rsp.contentId}&ownerContentId=${rsp.ownerContentId}&articleContentId=${articleContentId}&blogContentId=${parameters.blogContentId}" style="buttontext"/>
|
|
<container style="responsetext">
|
|
<label text="${rsp.description}" style="responsetext"/>
|
|
<label text="(Posted on: ${rsp.createdDate})" style="responsetext"/>
|
|
</container>
|
|
</container>
|
|
</widgets>
|
|
</section>
|
|
<section>
|
|
<condition>
|
|
<if-compare-field field-name="responseContentId" operator="equals" to-field-name="rsp.contentId"/>
|
|
</condition>
|
|
<widgets>
|
|
<container style="responseSelected">
|
|
<link text="${rsp.contentName}[${rsp.contentId}]" target="ViewResponse?contentId=${rsp.contentId}&ownerContentId=${rsp.ownerContentId}&articleContentId=${articleContentId}&blogContentId=${parameters.blogContentId}" style="responseheader"/>
|
|
<link text="View" target="ViewResponse?contentId=${rsp.contentId}&ownerContentId=${rsp.ownerContentId}&articleContentId=${articleContentId}&blogContentId=${parameters.blogContentId}" style="buttontext"/>
|
|
<container style="responsetext">
|
|
<label text="${rsp.description}" style="responsetext"/>
|
|
<label text="(Posted on: ${rsp.createdDate})" style="responsetext"/>
|
|
</container>
|
|
</container>
|
|
</widgets>
|
|
</section>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
|
|
<screen name="blogTreeLine">
|
|
<section>
|
|
<widgets>
|
|
<container>
|
|
<link text="${rsp.contentName}[${rsp.contentId}]" target="ViewArticle?articleContentId=${articleContentId}&ownerContentId=${rsp.ownerContentId}&blogContentId=${parameters.blogContentId}" style="responseheader"/>
|
|
<link text="View Blog Article" target="ViewArticle?articleContentId=${articleContentId}&ownerContentId=${rsp.ownerContentId}&blogContentId=${parameters.blogContentId}" style="buttontext"/>
|
|
<container style="responsetext">
|
|
<label text="${rsp.description}" style="responsetext"/>
|
|
<label text="(Posted on: ${rsp.createdDate})" style="responsetext"/>
|
|
</container>
|
|
</container>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
|
|
<screen name="AddBlogResponse">
|
|
<section>
|
|
<widgets>
|
|
<section>
|
|
<condition>
|
|
<if-empty field-name="parameters.contentId"/>
|
|
</condition>
|
|
<actions>
|
|
<set field="rsp.contentIdFrom" from-field="parameters.articleContentId"/>
|
|
</actions>
|
|
<widgets/>
|
|
</section>
|
|
<section>
|
|
<condition>
|
|
<not>
|
|
<if-empty field-name="parameters.contentId"/>
|
|
</not>
|
|
</condition>
|
|
<actions>
|
|
<set field="rsp.contentIdFrom" from-field="parameters.contentId"/>
|
|
</actions>
|
|
<widgets/>
|
|
</section>
|
|
<section>
|
|
<actions>
|
|
<set field="rsp.contentTypeId" value="DOCUMENT"/>
|
|
<set field="rsp.contentAssocTypeId" value="RESPONSE"/>
|
|
<set field="rsp.dataResourceTypeId" value="ELECTRONIC_TEXT"/>
|
|
<set field="rsp.contentOperationId" value="CONTENT_CREATE"/>
|
|
<set field="rsp.contentPurposeTypeId" value="RESPONSE"/>
|
|
<set field="rsp.articleContentId" from-field="articleContentId"/>
|
|
<set field="rsp.ownerContentId" from-field="content.contentId"/>
|
|
<set field="rsp.blogContentId" from-field="parameters.blogContentId"/>
|
|
<set field="useRequestParameters" value="false" type="Boolean"/>
|
|
|
|
<!-- used for permission check -->
|
|
<set field="contentPurposeTypeId" value="RESPONSE"/>
|
|
<set field="contentOperationId" value="CONTENT_CREATE"/>
|
|
<set field="ownerContentId" from-field="content.ownerContentId"/>
|
|
</actions>
|
|
<widgets>
|
|
<container style="bloghr">
|
|
<label text="Add Comment [${content.contentId}]: " style="blogtitle"/>
|
|
<section>
|
|
<condition>
|
|
<and>
|
|
<if-compare field-name="content.statusId" operator="equals" value="CTNT_PUBLISHED"/>
|
|
<if-service-permission service-name="genericContentPermission" main-action="CREATE"/>
|
|
</and>
|
|
</condition>
|
|
|
|
<actions>
|
|
<set field="displayForm" value="Y"/>
|
|
</actions>
|
|
<widgets/>
|
|
<fail-widgets>
|
|
<label text="&nbsp;You must be logged in and viewing a published record 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">
|
|
<include-form name="AddBlogResponse" location="component://ecommerce/widget/blog/BlogForms.xml"/>
|
|
</container>
|
|
</widgets>
|
|
</section>
|
|
</widgets>
|
|
</section>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
|
|
<screen name="EditBlogResponse">
|
|
<section>
|
|
<actions>
|
|
<set field="rsp.contentPurposeTypeId" value="RESPONSE"/>
|
|
<set field="rsp.contentOperationId" value="CONTENT_UPDATE"/>
|
|
<set field="rsp.ownerContentId" from-field="parameters.ownerContentId"/>
|
|
<set field="rsp.blogContentId" from-field="parameters.blogContentId"/>
|
|
|
|
<!-- permission fields -->
|
|
<set field="upPerm.ownerContentId" from-field="parameters.ownerContentId"/>
|
|
<set field="upPerm.contentId" from-field="parameters.contentId"/>
|
|
<set field="upPerm.contentOperationId" value="CONTENT_UPDATE"/>
|
|
<set field="upPerm.contentPurposeTypeId" value="RESPONSE"/>
|
|
</actions>
|
|
<widgets>
|
|
<section>
|
|
<!--
|
|
<condition>
|
|
<if-service-permission service-name="genericContentPermission" main-action="UPDATE"/>
|
|
</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"/>
|
|
</entity-one>
|
|
</actions>
|
|
<widgets>
|
|
<container style="blogcontentwrapper">
|
|
<include-form name="EditBlogResponse" location="component://ecommerce/widget/blog/BlogForms.xml"/>
|
|
</container>
|
|
</widgets>
|
|
<fail-widgets>
|
|
<label text="&nbsp;You must be logged in in order to edit comments."/>
|
|
</fail-widgets>
|
|
</section>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
|
|
<!-- Column Included Screens -->
|
|
<screen name="blogs">
|
|
<section>
|
|
<actions>
|
|
<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>
|
|
<platform-specific>
|
|
<html>
|
|
<html-template location="component://ecommerce/webapp/ecommerce/blog/blogs.ftl"/>
|
|
|
|
</html>
|
|
</platform-specific>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
</screens>
|
|
|
|
|