Files
ofbiz-framework/applications/commonext/widget/CommonScreens.xml
T
Bruno Busco 1c0b238799 [OFBIZ-3274] - Using decorator sections to control the left-bar
The leftbar content is now defined using the "left-column" ApplicationDecorator section instead of setting the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle".
The logic that checks if the "left-column" section has content, and thus if a left column must be rendered, has been moved from the GlobalDecorator to the ApplicationDecorator.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@894330 13f79535-47bb-0310-9956-ffa450edef68
2009-12-29 09:22:45 +00:00

105 lines
7.4 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://ofbiz.apache.org/dtds/widget-screen.xsd">
<screen name="ApplicationDecorator">
<section>
<actions>
<property-map resource="CommonExtUiLabels" map-name="uiLabelMap" global="true"/>
<service service-name="getUserPreferenceGroup" result-map="prefResult">
<field-map field-name="userPrefGroupTypeId" value="GLOBAL_PREFERENCES"/>
</service>
<set field="userPreferences" from-field="prefResult.userPrefMap" global="true"/>
<entity-one entity-name="PartyNameView" value-field="partyNameView">
<field-map field-name="partyId" from-field="userLogin.partyId"/>
</entity-one>
<set field="line.text" value="${uiLabelMap.CommonWelcome} ${person.firstName} ${person.middleName} ${person.lastName}"/>
<set field="line.urlText" value="[${userLogin.userLoginId}]"/>
<set field="line.url" value="/partymgr/control/viewprofile?partyId=${userLogin.partyId}"/>
<set field="layoutSettings.topLines[]" from-field="line" global="true"/>
<script location="component://commonext/script/changeOrgPartyId.groovy"/>
<!-- system info notes -->
<service service-name="getLastSystemInfoNote" result-map="resultNote"/>
<set field="linkStart" value="/myportal/control/showPortletDecorator?portalPortletId="/>
<set field="layoutSettings.middleTopHeader" value="---------- ${uiLabelMap.CommonLastSytemNotes} ----------"/>
<set field="layoutSettings.middleTopMessage1" value="${groovy:resultNote.lastSystemInfoNote1!=null?resultNote.lastSystemInfoNote1.noteDateTime.toString().substring(0,16) + &quot; &quot; + resultNote.lastSystemInfoNote1.noteInfo:&quot;&quot;}"/>
<set field="layoutSettings.middleTopLink1" value="${linkStart}${resultNote.lastSystemInfoNote1.moreInfoPortletId}&amp;id=${resultNote.lastSystemInfoNote1.moreInfoItemId}"/>
<set field="layoutSettings.middleTopMessage2" value="${groovy:resultNote.lastSystemInfoNote2!=null?resultNote.lastSystemInfoNote2.noteDateTime.toString().substring(0,16) + &quot; &quot; + resultNote.lastSystemInfoNote2.noteInfo:&quot;&quot;}"/>
<set field="layoutSettings.middleTopLink2" value="${linkStart}${resultNote.lastSystemInfoNote2.moreInfoPortletId}&amp;id=${resultNote.lastSystemInfoNote2.moreInfoItemId}"/>
<set field="layoutSettings.middleTopMessage3" value="${groovy:resultNote.lastSystemInfoNote3!=null?resultNote.lastSystemInfoNote3.noteDateTime.toString().substring(0,16) + &quot; &quot; + resultNote.lastSystemInfoNote3.noteInfo:&quot;&quot;}"/>
<set field="layoutSettings.middleTopLink3" value="${linkStart}${resultNote.lastSystemInfoNote3.moreInfoPortletId}&amp;id=${resultNote.lastSystemInfoNote3.moreInfoItemId}"/>
</actions>
<widgets>
<section>
<condition><not><if-empty field="PartyAcctgPrefAndGroupList"/></not></condition><!-- produced by changeOrgPartyId.groovy-->
<actions>
<set field="defaultOrganizationPartyId" value="${userPreferences.ORGANIZATION_PARTY}" global="true"/>
<property-to-field resource="general" property="currency.uom.id.default" field="defaultCurrencyUomId"/>
<entity-one entity-name="PartyAcctgPrefAndGroup" value-field="orgParty">
<field-map field-name="partyId" from-field="defaultOrganizationPartyId"/>
</entity-one>
<set field="defaultOrganizationPartyCurrencyUomId" from-field="orgParty.baseCurrencyUomId" default-value="defaultCurrencyUomId" global="true"/>
<set field="defaultOrganizationPartyGroupName" from-field="orgParty.groupName" global="true"/>
<set field="dropdown.hiddenFieldList" from-field="hiddenFields" global="true"/>
<set field="dropdown.action" value="setUserPreference"/>
<set field="dropdown.textBegin" value="${uiLabelMap.CommonDefaultOrganizationPartyId} :"/>
<set field="dropdown.dropDownList" from-field="PartyAcctgPrefAndGroupList"/>
<set field="dropdown.selectionName" value="userPrefValue"/>
<set field="dropdown.selectedKey" value="${defaultOrganizationPartyId}"/>
<set field="dropdown.textEnd" value="[${defaultOrganizationPartyId}]"/>
<set field="layoutSettings.topLines[]" from-field="dropdown" global="true"/>
</actions>
<widgets/>
</section>
<decorator-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="pre-body">
<decorator-section-include name="pre-body"/>
</decorator-section>
<decorator-section name="body">
<container id="column-container">
<section>
<condition>
<if-empty-section section-name="left-column"/>
</condition>
<widgets>
<container id="content-main-section">
<decorator-section-include name="body"/>
</container>
</widgets>
<fail-widgets>
<container style="left">
<decorator-section-include name="left-column"/>
</container>
<container id="content-main-section" style="leftonly">
<container style="no-clear">
<decorator-section-include name="body"/>
</container>
</container>
</fail-widgets>
</section>
<container style="clear"></container>
</container>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>