ilscipio/scipio-erp

View on GitHub
applications/content/widget/cms/CMSScreens.xml

Summary

Maintainability
Test Coverage
<?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="CMSContentFind">
        <section>
            <actions>
                <set field="titleProperty" value="PageTitleFindCMSContent"/>
                <set field="entityName" value="ContentAssocDataResourceViewFrom"/>
                <service service-name="urlEncodeArgs" result-map="result">
                    <field-map field-name="mapIn" from-field="requestParameters"/>
                </service>
                <set field="viewIndex" from-field="requestParameters.VIEW_INDEX" type="Integer" default-value="0"/>
                <set field="viewSize" from-field="requestParameters.VIEW_SIZE" type="Integer" default-value="20"/>
                <set field="currentCMSMenuItemName" value="contentfind" to-scope="user"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonCmsDecorator" location="${parameters.cmsDecoratorLocation}">
                    <decorator-section name="body">
                        <section>
                            <widgets>
                                <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
                                    <decorator-section name="menu-bar">
                                        <container style="button-bar"><link target="EditAddContent" text="${uiLabelMap.CommonCreateNew}" style="${styles.link_nav} ${styles.action_add}"/></container>
                                    </decorator-section>
                                    <decorator-section name="search-options">
                                        <include-form name="findContent" location="component://content/widget/cms/CMSForms.xml"/>
                                    </decorator-section>
                                    <decorator-section name="search-results">
                                        <include-form name="listFindContent" location="component://content/widget/cms/CMSForms.xml"/>
                                    </decorator-section>
                                </decorator-screen>
                            </widgets>
                        </section>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

    <screen name="CMSContentEdit">
        <section>
            <actions>
                <script location="component://content/webapp/content/WEB-INF/actions/cms/GetMenuContext.groovy"/>
                <set field="titleProperty" value="PageTitleEditCMSContent"/>
                <entity-one entity-name="Content" value-field="currentValue">
                    <field-map field-name="contentId" from-field="parameters.contentId"/>
                </entity-one>
                <entity-one entity-name="ElectronicText" value-field="electronicText">
                    <field-map field-name="dataResourceId" from-field="parameters.drDataResourceId"/>
                </entity-one>
                <set field="textData" from-field="electronicText.textData"/>
                <set field="contentId" from-field="currentValue.contentId"/>
                <set field="dataResourceId" from-field="parameters.drDataResourceId"/>
                <set field="rootForumId" value="WebStoreFORUM"/>
                <set field="rootForumId2" value="WebStoreCONTENT"/>
                <script location="component://content/webapp/content/WEB-INF/actions/cms/FeaturePrep.groovy"/>
                <set field="menuContext.contentTarget" value="CMSContentEdit?contentId=${contentId}&amp;drDataResourceId=${dataResourceId}"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonCmsDecorator" location="${parameters.cmsDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet>
                            <platform-specific>
                                <html><html-template location="component://content/webapp/content/cms/CMSContentEdit.ftl"/></html>
                            </platform-specific>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

    <screen name="EditAddContent">
        <section>
            <actions>
                <set field="titleProperty" value="ContentCMSEditPage"/>
                <set field="entityOperation" value="_UPDATE"/>
                <set field="targetOperation" value="CONTENT_UPDATE|CONTENT_CREATE|CONTENT_CREATE_SUB"/>
                <set field="requiredRoles" value="OWNER|BLOG_AUTHOR|BLOG_EDITOR|BLOG_ADMIN|BLOG_PUBLISHER"/>
                <set field="contentPurposeTypeId" value="ARTICLE"/>
                <set field="MASTER_contentId" from-field="parameters.MASTER_contentId" default-value="${parameters.contentId}"/>
                <set field="MASTER_drDataResourceId" from-field="parameters.MASTER_drDataResourceId" default-value="${parameters.drDataResourceId}"/>
                <set field="MASTER_caContentIdTo" from-field="parameters.MASTER_caContentIdTo" default-value="${parameters.caContentIdTo}"/>
                <set field="MASTER_caContentId" from-field="parameters.MASTER_caContentId" default-value="${parameters.caContentIdFrom}"/>
                <set field="MASTER_caContentAssocTypeId" from-field="parameters.MASTER_caContentAssocTypeId" default-value="${parameters.caContentAssocTypeId}"/>
                <set field="MASTER_caMapKey" from-field="parameters.MASTER_caMapKey" default-value="${parameters.caMapKey}"/>
                <set field="MASTER_caFromDate" from-field="parameters.MASTER_caFromDate" default-value="${parameters.caFromDate}" type="Timestamp"/>
                <set field="MASTER_caThruDate" from-field="parameters.MASTER_caThruDate" default-value="${parameters.caThruDate}" type="Timestamp"/>

                <set field="contentId" from-field="MASTER_contentId"/>
                <set field="drDataResourceId" from-field="MASTER_drDataResourceId"/>
                <set field="caContentIdTo" from-field="MASTER_caContentIdTo"/>
                <set field="caContentId" from-field="MASTER_caContentId"/>
                <set field="caContentAssocTypeId" from-field="MASTER_caContentAssocTypeId"/>
                <set field="caFromDate" from-field="MASTER_caFromDate"/>
                <set field="caThruDate" from-field="MASTER_caThruDate"/>
                <set field="caMapKey" from-field="MASTER_caMapKey"/>


                <script location="component://content/webapp/content/WEB-INF/actions/cms/CmsEditAddPrep.groovy"/>
                <set field="currentCMSMenuItemName" value="EditAddContent" to-scope="user"/>
                <set field="enableEdit" value="true"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonCmsDecorator" location="${parameters.cmsDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet>
                            <link text="${uiLabelMap.ContentGoToFind}" target="CMSContentFind?VIEW_INDEX=${CMSContentFindViewIndex}&amp;${CMSContentFindQueryString}" style="${styles.link_nav} ${styles.action_find}"/>
                            <include-form name="EditAddContentStuff" location="component://content/widget/cms/CMSForms.xml"/>
                            <content content-id="${contentId}" enable-edit-name="notfound"  edit-request="EditAddSubContent?MASTER_caMapKey=${MASTER_caMapKey}&amp;MASTER_contentId=${MASTER_contentId}&amp;MASTER_caContentIdTo=${MASTER_caContentIdTo}&amp;MASTER_caContentAssocTypeId=${MASTER_caContentAssocTypeId}&amp;MASTER_caFromDate=${MASTER_caFromDate}&amp;MASTER_caThruDate=${MASTER_caThruDate}&amp;MASTER_drDataResourceId=${MASTER_drDataResourceId}&amp;caContentIdTo=${caContentIdTo}"/>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

    <screen name="EditAddSubContent">
        <section>
            <actions>
                <set field="titleProperty" value="ContentCMSAddSubContent"/>
                <set field="entityOperation" value="_UPDATE"/>
                <set field="targetOperation" value="CONTENT_UPDATE|CONTENT_CREATE|CONTENT_CREATE_SUB"/>
                <set field="requiredRoles" value="OWNER|BLOG_AUTHOR|BLOG_EDITOR|BLOG_ADMIN|BLOG_PUBLISHER"/>
                <set field="contentPurposeTypeId" value="ARTICLE"/>
                <set field="MASTER_contentId" from-field="parameters.MASTER_contentId"/>
                <set field="MASTER_drDataResourceId" from-field="parameters.MASTER_drDataResourceId"/>
                <set field="MASTER_caContentIdTo" from-field="parameters.MASTER_caContentIdTo"/>
                <set field="MASTER_caContentId" from-field="parameters.MASTER_caContentId"/>
                <set field="MASTER_caContentAssocTypeId" from-field="parameters.MASTER_caContentAssocTypeId"/>
                <set field="MASTER_caFromDate" from-field="parameters.MASTER_caFromDate" type="Timestamp"/>

                <set field="caContentIdTo" from-field="parameters.contentId"/>
                <set field="caMapKey" from-field="parameters.mapKey"/>

                <script location="component://content/webapp/content/WEB-INF/actions/cms/CmsEditAddPrep.groovy"/>
                <set field="currentCMSMenuItemName" value="EditAddContent" to-scope="user"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonCmsDecorator" location="${parameters.cmsDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet>
                            <link text="${uiLabelMap.ContentGoToFind}" target="CMSContentFind?VIEW_INDEX=${CMSContentFindViewIndex}&amp;${CMSContentFindQueryString}" style="${styles.link_nav} ${styles.action_find}"/>
                            <include-form name="EditAddSubContentStuff" location="component://content/widget/cms/CMSForms.xml"/>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

    <screen name="CMSSites">
        <section>
            <actions>
                <script location="component://content/webapp/content/WEB-INF/actions/cms/GetMenuContext.groovy"/>
                <set field="titleProperty" value="ContentCMSSearchPage"/>
                <set field="forumId" from-field="parameters.contentId"/>
                <set field="defaultSiteId" value="WebStoreFORUM"/>
                <set field="currentCMSMenuItemName" value="subsites" to-scope="user"/>
                <script location="component://content/webapp/content/WEB-INF/actions/cms/UserPermPrep.groovy"/>
                <script location="component://content/webapp/content/WEB-INF/actions/cms/MostRecentPrep.groovy"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonCmsDecorator" location="${parameters.cmsDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet>
                            <platform-specific>
                                <html><html-template location="component://content/webapp/content/cms/CMSSites.ftl"/></html>
                            </platform-specific>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

    <screen name="addSubSite">
        <section>
            <actions>
                <script location="component://content/webapp/content/WEB-INF/actions/cms/GetMenuContext.groovy"/>
                <set field="titleProperty" value="PageTitleSearchContent"/>
            </actions>
            <widgets>
                <decorator-screen name="CommonCmsDecorator" location="${parameters.cmsDecoratorLocation}">
                    <decorator-section name="body">
                        <screenlet>
                            <platform-specific>
                                <html><html-template location="component://content/webapp/content/cms/addSubSite.ftl"/></html>
                            </platform-specific>
                        </screenlet>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>
</screens>