Skip to content

Commit

Permalink
Improved: HumanRes-Main page (OFBIZ-13050)
Browse files Browse the repository at this point in the history
Current main page shows the OrgTree screen in a hard-coded way for about 50% of the available screen.

modified:
CommonScreens.xml/screen Main
- added actions elements to work with PortalPage
- added include-portal-page element
- removed display condition
  • Loading branch information
PierreSmits committed Apr 21, 2024
1 parent b212e0f commit af22e26
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
28 changes: 20 additions & 8 deletions applications/humanres/data/HumanResPortletData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,27 @@
<entity-engine-xml>

<PortletCategory portletCategoryId="HUMANRES" description="Human Resource Portlets"/>
<PortalPortlet portalPortletId="myLeave"
portletName="My Leave"
screenName="MyLeaveList"
screenLocation="component://humanres/widget/EmployeeScreens.xml"
description="My Leaves form Human Resource" securityServiceName="portalPermissionIsEmployee" securityMainAction="VIEW"/>
<PortalPortlet portalPortletId="myLeave" portletName="My Leave"
description="My Leaves form Human Resource"
screenName="MyLeaveList" screenLocation="component://humanres/widget/EmployeeScreens.xml"
securityServiceName="portalPermissionIsEmployee" securityMainAction="VIEW"/>
<PortletPortletCategory portalPortletId="myLeave" portletCategoryId="HUMANRES"/>
<PortalPortlet portalPortletId="MyTrainings" portletName="My Trainings" description="Trainings of a party"
screenName="MyTrainings" screenLocation="component://humanres/widget/EmployeeScreens.xml" securityServiceName="portalPermissionIsEmployee"
securityMainAction="VIEW"/>
<PortalPortlet portalPortletId="MyTrainings" portletName="My Trainings"
description="Trainings of a party"
screenName="MyTrainings" screenLocation="component://humanres/widget/EmployeeScreens.xml"
securityServiceName="portalPermissionIsEmployee" securityMainAction="VIEW"/>
<PortletPortletCategory portalPortletId="MyTrainings" portletCategoryId="HUMANRES"/>

<PortalPage portalPageId="Humanres_MAIN" portalPageName="HumanRes Main Page"
description="The main portal page of the Humanres application"
ownerUserLoginId="_NA_" sequenceNum="1"/>
<PortalPageColumn columnSeqId="00001" portalPageId="Humanres_MAIN"/>
<PortalPageColumn columnSeqId="00002" portalPageId="Humanres_MAIN"/>
<PortalPortlet portalPortletId="ORG_TREE" portletName="Organisation Tree"
description="The Organisation Tree Structure"
screenName="OrgTree" screenLocation="component://humanres/widget/CommonScreens.xml"/>
<PortletPortletCategory portalPortletId="ORG_TREE" portletCategoryId="HUMANRES"/>
<PortalPagePortlet portalPageId="Humanres_MAIN" portalPortletId="ORG_TREE" columnSeqId="00001" portletSeqId="00001" sequenceNum="1"/>
<PortalPagePortlet portalPageId="Humanres_MAIN" portalPortletId="Calendar" columnSeqId="00002" portletSeqId="00001" sequenceNum="2"/>

</entity-engine-xml>
15 changes: 5 additions & 10 deletions applications/humanres/widget/CommonScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,17 @@ under the License.

<screen name="Main">
<section>
<actions>
<set field="parameters.parentPortalPageId" from-field="parameters.parentPortalPageId" default-value="${parameters.localDispatcherName}_MAIN" global="true"/>
<script location="component://common/src/main/groovy/org/apache/ofbiz/common/GetParentPortalPageId.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="${parameters.mainMenuLocation}"/>
</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>
<include-portal-page id="${parameters.portalPageId}"/>
</decorator-section>
</decorator-screen>
</widgets>
Expand Down

0 comments on commit af22e26

Please sign in to comment.