applications/content/widget/forum/BlogScreens.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="CommonBlogDecorator">
<section>
<actions>
<set field="activeSubMenu" from-field="activeSubMenu" default-value="component://content/widget/content/ContentMenus.xml#Blog" />
<property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
<decorator-screen name="CommonContentAppDecorator" location="${parameters.mainDecoratorLocation}">
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="BlogDecorator">
<section>
<widgets>
<decorator-screen name="CommonBlogDecorator">
<decorator-section name="body">
<section>
<condition>
<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="BlogSubTabBar" location="component://content/widget/content/ContentMenus.xml"/>
<label text="${blogContent.contentName}"/>
<link style="${styles.link_nav_info_id}" text=" [${blogContent.contentId}]" target="blogContent">
<parameter param-name="blogContentId" from-field="parameters.blogContentId"/>
</link>
</widgets>
</section>
<decorator-section-include name="body"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="BlogArticleDecorator">
<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="BlogArticleTabBar" location="component://content/widget/content/ContentMenus.xml"/>
<include-menu name="BlogArticleButtonBar" location="component://content/widget/content/ContentMenus.xml"/>
<container>
<label style="span" text="${blogContent.contentName}"/>
<link style="${styles.link_nav_info_id}" text=" [${blogContent.contentId}]" target="blogContent">
<parameter param-name="blogContentId" from-field="parameters.blogContentId"/>
</link>
</container>
</widgets>
</section>
<decorator-section-include name="body"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="BlogMain">
<section>
<actions>
<set field="activeSubMenuItem" value="ListBlog"/>
<set field="titleProperty" value="ContentBlogList"/>
<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" 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" from-field="nullField"/>
<condition-expr field-name="caThruDate" operator="greater-equals" from-field="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="BlogSubTabBar" location="component://content/widget/content/ContentMenus.xml"/>
<screenlet 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="activeSubMenuItem" value="EditBlog"/>
<set field="contentId" from-field="parameters.blogContentId"/>
<set field="titleProperty" value="ContentBlogEdit"/>
<entity-one entity-name="Content" value-field="content"/>
</actions>
<widgets>
<decorator-screen name="BlogDecorator">
<decorator-section name="body">
<screenlet>
<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="activeSubMenuItem" value="Articles"/>
<set field="titleProperty" value="ContentBlogArticleList"/>
<entity-condition entity-name="ContentAssocViewTo" use-cache="false" list="blogContent">
<condition-list combine="and">
<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>
<order-by field-name="caFromDate DESC"/>
</entity-condition>
</actions>
<widgets>
<decorator-screen name="BlogDecorator">
<decorator-section name="body">
<screenlet navigation-form-name="BlogContent">
<include-form name="BlogContent" location="component://content/widget/forum/BlogForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditArticle">
<section>
<actions>
<set field="activeSubMenuItem" 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"/>
</condition-->
<actions>
<service service-name="getBlogEntry" result-map="blogEntry" auto-field-map="true"/>
</actions>
<widgets>
<decorator-screen name="BlogArticleDecorator">
<decorator-section name="body">
<sub-content content-id="${contentId}" map-key="IMAGE"/>
<include-form name="EditArticle" location="component://content/widget/forum/BlogForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
<fail-widgets>
<label style="common-msg-error-perm" text="${uiLabelMap.EditBlogArticlePermissionError}: ${contentId} ${uiLabelMap.ContentBlog} ${blogContentId}"></label>
</fail-widgets>
</section>
</widgets>
</section>
</screen>
<screen name="ViewArticle">
<section>
<actions>
<set field="activeSubMenuItem" 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="BlogArticleDecorator">
<decorator-section name="body">
<label style="heading" text="${blogEntry.contentName}: ${blogEntry.description}"/>
<horizontal-separator/>
<container style="${styles.grid_large}6">
<label text="${uiLabelMap.ContentImage}"/>
<container>
<sub-content content-id="${contentId}" map-key="IMAGE"/>
</container>
</container>
<container style="${styles.grid_large}6">
<label text="${uiLabelMap.ContentBlogSummary}"/>
<container>
<sub-content content-id="${contentId}" map-key="SUMMARY"/>
</container>
</container>
<container style="clear"/>
<horizontal-separator/>
<label text="${uiLabelMap.ContentBlogArticle}"/>
<container>
<sub-content content-id="${contentId}" map-key="ARTICLE"/>
</container>
<horizontal-separator/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>