Files
ofbiz-framework/applications/humanres/widget/CommonScreens.xml
T
Pierre Smits 75aeb494a0 Improved: Have a Menu in Humanres featuring actions to create the main objects (OFBIZ-11777) (#429)
Currently the create buttons for the main objects of the humanres plugin are located within find and profile widgets/templates of those objects.

In order to improve the usability of this plugin, OFBiz (and thus the appeal of it for adopters and users) these create buttons/links/etc. should be in a main action menu visible at all times when a user is working within the web appliclation of the component.

Modified:
HumanresMenus.xml - added MainActionMenu
To following screens - added ref to MainActionMenu, clean-up
CommonScreens.xml
EmplLeaveScreens.xml
EmployeeScreens.xml
EmploymentScreens.xml
PartyQualScreens.xml
PartyResumeScreens.xml
PartySkillsScreens.xml
PerfReviewScreens.xml
2022-01-06 11:56:26 +01:00

470 lines
26 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"
xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">
<screen name="main-decorator">
<section>
<actions>
<property-map resource="HumanResUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="WorkEffortUiLabels" map-name="uiLabelMap" global="true"/>
<set field="layoutSettings.companyName" from-field="uiLabelMap.HumanResCompanyName" global="true"/>
<set field="layoutSettings.companySubtitle" from-field="uiLabelMap.HumanResCompanySubtitle" global="true"/>
<!-- layoutSettings.headerImageUrl can be used to specify an application specific logo; if not set,
then the global layoutSettings.commonHeaderImageUrl (specified in GlobalDecorator) will be used. -->
<!--<set field="layoutSettings.headerImageUrl" value="/images/ofbiz_logo.png" global="true"/>-->
<set field="activeApp" value="humanres" global="true"/>
<set field="layoutSettings.javaScripts[]" value="/partymgr/static/partymgr.js" global="true"/>
<set field="layoutSettings.styleSheets[]" value="/partymgr/static/partymgr.css" global="true"/>
<set field="layoutSettings.styleSheets[]" value="/images/humanres/humanres.css" global="true"/>
<set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/ui/js/jquery.cookie-1.4.0.js" global="true"/>
<set field="applicationMenuName" value="HumanResAppBar" global="true"/>
<set field="applicationMenuLocation" value="component://humanres/widget/HumanresMenus.xml" global="true"/>
<set field="applicationTitle" from-field="uiLabelMap.HumanResManagerApplication" global="true"/>
<set field="helpAnchor" from-field="helpAnchor" default-value="_human_resources"/>
</actions>
<widgets>
<include-screen name="ApplicationDecorator" location="component://commonext/widget/CommonScreens.xml"/>
</widgets>
</section>
</screen>
<screen name="Main">
<section>
<widgets>
<decorator-screen name="main-decorator">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://humanres/widget/HumanresMenus.xml"/>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
<if-has-permission permission="HUMANRES" action="_VIEW"/>
</condition>
<widgets>
<container style="lefthalf">
<include-screen name="OrgTree"/>
</container>
</widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ShortcutApp">
<section>
<actions>
<property-map resource="HumanResUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
<decorator-screen name="ShortcutDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="body">
<include-menu name="HumanResShortcutAppBar" location="component://humanres/widget/HumanresMenus.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="OrgTree">
<section>
<actions>
<set field="partyId" from-field="defaultOrganizationPartyId"/>
<set field="helpAnchor" value="_the_human_resources_main_screen"/>
<script location="component://humanres/groovyScripts/category/CategoryTree.groovy"></script>
</actions>
<widgets>
<screenlet title="${uiLabelMap.FormFieldTitle_company}">
<section>
<widgets>
<platform-specific><html><html-template multi-block="true" location="component://humanres/template/category/CategoryTree.ftl"/></html></platform-specific>
</widgets>
</section>
</screenlet>
</widgets>
</section>
</screen>
<screen name="PartyGroupTreeLine">
<section>
<widgets>
<label text="${partyAndGroup.groupName}"/>
</widgets>
</section>
</screen>
<screen name="PartyPersonTreeLine">
<section>
<widgets>
<label text="${partyAndPerson.firstName} ${partyAndPerson.lastName}"/>
</widgets>
</section>
</screen>
<screen name="CommonEmplPositionDecorator">
<section>
<actions>
<set field="headerItem" value="EmplPosition"/>
<set field="emplPositionId" from-field="parameters.emplPositionId"/>
<entity-one entity-name="EmplPosition" value-field="emplPosition"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://humanres/widget/HumanresMenus.xml"/>
<section>
<condition>
<and>
<if-has-permission permission="HUMANRES" action="_VIEW"/>
<not><if-empty field="emplPosition"/></not>
</and>
</condition>
<widgets>
<include-menu name="EmplPostionBar" location="component://humanres/widget/HumanresMenus.xml"/>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<!-- do check for EmplPosition, _VIEW permission -->
<condition>
<if-has-permission permission="HUMANRES" action="_VIEW"/>
</condition>
<widgets>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.HumanResViewPermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CommonEmploymentDecorator">
<section>
<actions>
<set field="roleTypeIdFrom" from-field="parameters.roleTypeIdFrom"/>
<set field="roleTypeIdTo" from-field="parameters.roleTypeIdTo"/>
<set field="partyIdFrom" from-field="parameters.partyIdFrom"/>
<set field="partyIdTo" from-field="parameters.partyIdTo"/>
<set field="fromDate" from-field="parameters.fromDate" type="Timestamp"/>
<entity-one entity-name="Employment" value-field="employment"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://humanres/widget/HumanresMenus.xml"/>
</decorator-section>
<decorator-section name="body">
<section>
<!-- do check for Employment, _VIEW permission -->
<condition>
<if-has-permission permission="HUMANRES" action="_VIEW"/>
</condition>
<widgets>
<section>
<condition>
<not><if-empty field="parameters.partyIdFrom"/></not>
</condition>
<actions>
<entity-one entity-name="PartyNameView" value-field="emplName">
<field-map field-name="partyId" from-field="parameters.partyIdTo"/>
</entity-one>
<entity-one entity-name="PartyNameView" value-field="orgName">
<field-map field-name="partyId" from-field="parameters.partyIdFrom"/>
</entity-one>
</actions>
<widgets>
<section>
<condition>
<not><if-empty field="parameters.fromDate"/></not>
</condition>
<widgets>
<include-menu name="EmploymentBar" location="component://humanres/widget/HumanresMenus.xml"/>
<label style="h1" text="${emplName.lastName},${emplName.firstName} ${emplName.middleName} [${emplName.partyId}] ${uiLabelMap.CommonFor}"></label>
<label style="h1" text="${orgName.groupName} [${orgName.partyId}]"></label>
</widgets>
</section>
</widgets>
</section>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.HumanResViewPermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CommonPerfReviewDecorator">
<section>
<actions>
<set field="perfReviewId" from-field="parameters.perfReviewId"/>
<entity-one entity-name="PerfReview" value-field="perfReview"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://humanres/widget/HumanresMenus.xml"/>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
<if-has-permission permission="HUMANRES" action="_VIEW"/>
</condition>
<widgets>
<section>
<condition>
<not><if-empty field="perfReview"/></not>
</condition>
<actions>
<entity-one entity-name="PartyNameView" value-field="partyNameView">
<field-map field-name="partyId" from-field="perfReview.employeePartyId"/>
</entity-one>
</actions>
<widgets>
<include-menu name="PerfReviewBar" location="component://humanres/widget/HumanresMenus.xml"/>
<label style="h1" text="${uiLabelMap.HumanResPerfReview} [${perfReview.perfReviewId}] ${partyNameView.lastName} ${partyNameView.firstName} ${partyNameView.middleName}"></label>
</widgets>
</section>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.HumanResViewPermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EmployeeDecorator">
<!-- Decorator for Employee edit/view screen set. partyId in this context is a Party in Employee Role and in Employment relationship with internal organization -->
<section>
<actions>
<set field="headerItem" value="Employees"/>
<set field="partyId" from-field="parameters.partyId"/>
<entity-one entity-name="Party" value-field="party"/>
<entity-one entity-name="Person" value-field="lookupPerson"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://humanres/widget/HumanresMenus.xml"/>
<section>
<condition>
<and>
<if-has-permission permission="HUMANRES" action="_VIEW"/>
<not><if-empty field="partyId"/></not>
</and>
</condition>
<widgets>
<include-menu name="EmployeeProfileTabBar" location="component://humanres/widget/HumanresMenus.xml"/>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
<if-has-permission permission="HUMANRES" action="_VIEW"/>
</condition>
<widgets>
<section>
<condition><not><if-empty field="partyId"/></not></condition>
<widgets>
<container style="h1">
<section>
<condition><not><if-empty field="lookupPerson"/></not></condition>
<widgets>
<label text="${uiLabelMap.PartyTheProfileOf} ${lookupPerson.personalTitle} ${lookupPerson.firstName} ${lookupPerson.middleName} ${lookupPerson.lastName} ${lookupPerson.suffix} [${partyId}]"/>
</widgets>
<fail-widgets>
<label style="h1" text="${uiLabelMap.HumanResNewEmployee}"/>
</fail-widgets>
</section>
</container>
</widgets>
</section>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.PartyMgrViewPermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CommonPartyDecorator">
<section>
<actions>
<set field="partyId" from-field="parameters.partyId"/>
<entity-one entity-name="Party" value-field="party"/>
<entity-one entity-name="Person" value-field="lookupPerson"/>
<entity-one entity-name="PartyGroup" value-field="lookupGroup"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<section>
<condition>
<and>
<if-has-permission permission="HUMANRES" action="_VIEW"/>
<not><if-empty field="partyId"/></not>
</and>
</condition>
<widgets>
<include-menu name="EmployeeProfileTabBar" location="component://humanres/widget/HumanresMenus.xml"/>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
<if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/>
</condition>
<!-- do check for PARTYMGR, _VIEW permission -->
<widgets>
<section>
<condition><not><if-empty field="partyId"/></not></condition>
<widgets>
<container style="h1">
<section>
<condition>
<or>
<not><if-empty field="lookupPerson"/></not>
<not><if-empty field="lookupGroup"/></not>
</or>
</condition>
<widgets>
<label text="${uiLabelMap.PartyTheProfileOf} ${lookupPerson.personalTitle} ${lookupPerson.firstName} ${lookupPerson.middleName} ${lookupPerson.lastName} ${lookupPerson.suffix} ${lookupGroup.groupName} [${partyId}]"/>
</widgets>
<fail-widgets>
<label style="h1" text="${uiLabelMap.PartyNewUser}"/>
</fail-widgets>
</section>
</container>
</widgets>
</section>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.PartyMgrViewPermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="GlobalHRSettingsDecorator">
<section>
<actions>
<set field="headerItem" value="GlobalHRSettings"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://humanres/widget/HumanresMenus.xml"/>
<include-menu name="GlobalHRSettingMenus" location="component://humanres/widget/HumanresMenus.xml"/>
</decorator-section>
<decorator-section name="body">
<decorator-section-include name="body"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CommonRecruitmentDecorator">
<section>
<actions>
<set field="headerItem" value="Recruitment"/>
<property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://humanres/widget/HumanresMenus.xml"/>
<include-menu name="RecruitmentTypeMenu" location="component://humanres/widget/HumanresMenus.xml"/>
</decorator-section>
<decorator-section name="body">
<decorator-section-include name="body"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CommonTrainingDecorator">
<section>
<actions>
<property-map resource="HumanResUiLabels" map-name="uiLabelMap" global="true"/>
<set field="headerItem" value="Training"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://humanres/widget/HumanresMenus.xml"/>
<include-menu name="TrainingTypeMenu" location="component://humanres/widget/HumanresMenus.xml"/>
</decorator-section>
<decorator-section name="body">
<decorator-section-include name="body"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CommonMyCommunicationEventDecorator">
<section>
<actions>
<script location="component://party/groovyScripts/communication/GetMyCommunicationEventRole.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://humanres/widget/HumanresMenus.xml"/>
<include-menu name="EmployeeProfileTabBar" location="component://humanres/widget/HumanresMenus.xml"/>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
<if-has-permission permission="HUMANRES" action="_VIEW"/>
</condition>
<widgets>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.PartyMgrViewPermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>