applications/content/widget/forum/ForumScreens.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is subject to the terms and conditions defined in the
files 'LICENSE' and 'NOTICE', which are part of this source
code package.
-->
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
<screen name="FindForumGroups">
<section>
<actions>
<set field="titleProperty" value="PageTitleFindForumGroup"/>
<set field="activeSubMenuItem" value="ForumGroups"/>
<set field="labelTitleProperty" value="PageTitleFindForumGroup"/>
<entity-and entity-name="Content" list="forumGroups">
<field-map field-name="contentTypeId" value="FORUM_ROOT"/>
<order-by field-name="contentName"/>
</entity-and>
</actions>
<widgets>
<decorator-screen name="CommonForumDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet id="ForumGroupPanel" title="${uiLabelMap.ContentForumGroupCreate}" collapsible="true">
<include-form name="AddForumGroup" location="component://content/widget/forum/ForumForms.xml"/>
</screenlet>
<include-form name="ListForumGroups" location="component://content/widget/forum/ForumForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="FindForums">
<section>
<actions>
<set field="activeSubMenuItem" value="forums"/>
<set field="titleProperty" value="PageTitleFindForums"/>
<set field="tabBar" value="ForumGroupSideBar"/>
<set field="forumGroupId" from-field="parameters.forumGroupId" default-value="parameters.contentId"/>
<entity-one entity-name="Content" value-field="forumGroup">
<field-map field-name="contentId" from-field="forumGroupId"/>
</entity-one>
<set field="objectName" from-field="forumGroup.contentName"/>
<set field="objectId" from-field="forumGroup.contentId"/>
<entity-and entity-name="ContentAssocDataResourceViewTo" list="forums">
<field-map field-name="contentIdStart" from-field="forumGroupId"/>
</entity-and>
</actions>
<widgets>
<decorator-screen name="CommonForumDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet id="AddForumToForumGroupPanel" title="${uiLabelMap.ContentForumAddTo} ${forumGroup.contentName}" collapsible="true">
<include-form name="AddForum" location="component://content/widget/forum/ForumForms.xml"/>
</screenlet>
<include-form name="ListForums" location="component://content/widget/forum/ForumForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ForumGroupRoles">
<section>
<actions>
<set field="titleProperty" value="PageTitleForumGroupRoles"/>
<set field="activeSubMenuItem" value="roles"/>
<set field="tabBar" value="ForumGroupSideBar"/>
<entity-one entity-name="Content" value-field="forumGroup">
<field-map field-name="contentId" from-field="parameters.forumGroupId"/>
</entity-one>
<set field="objectName" from-field="forumGroup.contentName"/>
<set field="objectId" from-field="forumGroup.contentId"/>
<entity-and entity-name="ContentRole" list="forumRoles">
<field-map field-name="contentId" from-field="parameters.forumGroupId"/>
<order-by field-name="roleTypeId"/>
</entity-and>
</actions>
<widgets>
<decorator-screen name="CommonForumDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet id="ForumGroupRolePanel" title="${uiLabelMap.ContentForumAddRoleTo} ${forumGroup.contentName} [${forumGroup.contentId}]" collapsible="true">
<include-form name="AddForumGroupRole" location="component://content/widget/forum/ForumForms.xml"/>
</screenlet>
<include-form name="ForumGroupRoles" location="component://content/widget/forum/ForumForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ForumGroupPurposes">
<section>
<actions>
<set field="titleProperty" value="PageTitleForumGroupPurposes"/>
<set field="activeSubMenuItem" value="purposes"/>
<set field="tabBar" value="ForumGroupSideBar"/>
<entity-one entity-name="Content" value-field="forumGroup">
<field-map field-name="contentId" from-field="parameters.forumGroupId"/>
</entity-one>
<set field="objectName" from-field="forumGroup.contentName"/>
<set field="objectId" from-field="forumGroup.contentId"/>
<entity-and entity-name="ContentPurpose" list="forumPurposes">
<field-map field-name="contentId" from-field="parameters.forumGroupId"/>
<order-by field-name="contentPurposeTypeId"/>
</entity-and>
</actions>
<widgets>
<decorator-screen name="CommonForumDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet id="ForumGroupPurposePanel" title="${uiLabelMap.ContentForumAddPurposeTo} ${forumGroup.contentName} [${forumGroup.contentId}]" collapsible="true">
<include-form name="AddForumGroupPurpose" location="component://content/widget/forum/ForumForms.xml"/>
</screenlet>
<include-form name="ForumGroupPurposes" location="component://content/widget/forum/ForumForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="FindForumMessages">
<section>
<actions>
<set field="titleProperty" value="PageTitleFindForumMessages"/>
<set field="tabBar" value="ForumMessagesSideBar"/>
<set field="activeSubMenuItem" value="messageList"/>
<set field="labelTitleProperty" value="PageTitleFindForumMessages"/>
<entity-one entity-name="Content" value-field="forum">
<field-map field-name="contentId" from-field="parameters.forumId"/>
</entity-one>
<set field="objectName" from-field="forum.contentName"/>
<set field="objectId" from-field="forum.contentId"/>
<set field="forumNbrMessages" from-field="forum.childBranchCount" default-value="0"/>
<entity-and entity-name="ContentAssocViewTo" list="forumMessages">
<field-map field-name="ownerContentId" from-field="parameters.forumId"/>
<order-by field-name="createdDate DESC"/>
</entity-and>
<set field="parameters.forumMessageIdTo" from-field="parameters.forumId"/>
</actions>
<widgets>
<decorator-screen name="CommonForumDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-form name="ListForumMessages" location="component://content/widget/forum/ForumForms.xml"/>
<screenlet title="${uiLabelMap.ContentForumAddThreadTo} ${forum.description}">
<include-form name="AddForumMessage" location="component://content/widget/forum/ForumForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="FindForumThreads">
<section>
<actions>
<set field="contentId" from-field="parameters.forumId"/>
<set field="responseContentId" from-field="parameters.forumId"/>
<set field="threadContentId" from-field="parameters.threadContentId" default-value="${contentId}"/>
<set field="forumId" from-field="parameters.forumId"/>
<entity-one entity-name="Content" value-field="content" use-cache="true">
<field-map field-name="contentId" from-field="contentId"/>
</entity-one>
<set field="ownerContentId" from-field="content.ownerContentId" default-value="${forumId}"/>
<set field="trail" from-field="threadContentId"/>
<set field="enableEdit" value="false"/>
<set field="webPutPt" from-field="parameters.forumGroupId"/>
<set field="rsp.contentName" value="${content.contentName}"/>
<set field="titleProperty" value="PageTitleFindForumMessages"/>
<set field="tabBar" value="ForumMessagesSideBar"/>
<set field="activeSubMenuItem" value="messageThread"/>
<set field="labelTitleProperty" value="PageTitleFindForumMessages"/>
<entity-one entity-name="Content" value-field="forum">
<field-map field-name="contentId" from-field="parameters.forumId"/>
</entity-one>
<set field="objectName" from-field="forum.contentName"/>
<set field="objectId" from-field="forum.contentId"/>
<set field="forumNbrMessages" from-field="forum.childBranchCount" default-value="0"/>
<entity-one entity-name="Content" value-field="forumThread">
<field-map field-name="contentId" from-field="parameters.forumThreadId"/>
</entity-one>
<entity-one entity-name="Content" value-field="forumMessage">
<field-map field-name="contentId" from-field="parameters.forumMessageId"/>
</entity-one>
<entity-one entity-name="ElectronicText" value-field="electronicText">
<field-map field-name="dataResourceId" from-field="forumMessage.dataResourceId"/>
</entity-one>
<set field="contentId" from-field="parameters.forumId"/>
<set field="trail" from-field="parameters.trail" default-value="${contentId}"/>
</actions>
<widgets>
<decorator-screen name="CommonForumDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-tree name="MessageTree" location="component://content/widget/forum/ForumTrees.xml"/>
<section>
<condition>
<not><if-empty field="parameters.forumThreadId"/></not>
</condition>
<widgets>
<screenlet title="${uiLabelMap.ContentForumThread} ${parameters.forumThreadId}">
<include-form name="EditForumThreadMessage" location="component://content/widget/forum/ForumForms.xml"/>
</screenlet>
</widgets>
</section>
<section>
<condition>
<not><if-empty field="parameters.forumMessageId"/></not>
</condition>
<widgets>
<screenlet title="${uiLabelMap.ContentForumMessage} ${parameters.forumMessageId}">
<include-form name="EditForumThreadMessage" location="component://content/widget/forum/ForumForms.xml"/>
</screenlet>
</widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditForumMessage">
<section>
<actions>
<set field="titleProperty" value="PageTitleEditForumMessage"/>
<set field="activeSubMenuItem" value="EditForumMessage"/>
<set field="labelTitleProperty" value="PageTitleEditForumMessage"/>
<set field="tabBar" value="ForumMessagesSideBar"/>
<set field="activeSubMenuItem" value=""/>
<set field="labelTitleProperty" value="PageTitleFindForumMessages"/>
</actions>
<widgets>
<decorator-screen name="CommonForumDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.ContentForumAddResponseToMessage} ${contentData.resultData.content.description}">
<include-form name="EditForumMessage" location="component://content/widget/forum/ForumForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="AddForumMessage">
<section>
<actions>
<set field="titleProperty" value="PageTitleEditForumMessage"/>
<set field="activeSubMenuItem" value="EditForumMessage"/>
<set field="labelTitleProperty" value="PageTitleEditForumMessage"/>
<set field="tabBar" value="ForumMessagesSideBar"/>
<set field="activeSubMenuItem" value=""/>
<set field="labelTitleProperty" value="PageTitleFindForumMessages"/>
<entity-one entity-name="Content" value-field="forumMessage">
<field-map field-name="contentId" from-field="parameters.forumMessageIdTo"/>
</entity-one>
</actions>
<widgets>
<decorator-screen name="CommonForumDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.ContentForumAddResponseToMessage} ${forumMessage.description}">
<include-form name="AddForumMessage" location="component://content/widget/forum/ForumForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="AddForumThreadMessage">
<section>
<actions>
<set field="titleProperty" value="PageTitleEditForumMessage"/>
<set field="activeSubMenuItem" value="EditForumMessage"/>
<set field="labelTitleProperty" value="PageTitleEditForumMessage"/>
<set field="tabBar" value="ForumMessagesSideBar"/>
<set field="activeSubMenuItem" value=""/>
<set field="labelTitleProperty" value="PageTitleFindForumMessages"/>
<entity-one entity-name="Content" value-field="forumMessage">
<field-map field-name="contentId" from-field="parameters.forumMessageIdTo"/>
</entity-one>
</actions>
<widgets>
<decorator-screen name="CommonForumDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.ContentForumAddResponseToMessage} ${forumMessage.description} [${forumMessage.contentId}]">
<include-form name="AddForumThreadMessage" location="component://content/widget/forum/ForumForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>