This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git
The following commit(s) were added to refs/heads/trunk by this push:
new 3645c3d0c Improved: PROJECTMGR- Move from hard-coded menu location to
parameterized (OFBIZ-12975) (#107)
3645c3d0c is described below
commit 3645c3d0c3d91da4a1e0b642f9cf39dc97e0e51d
Author: Pierre Smits <[email protected]>
AuthorDate: Sat Apr 13 11:08:31 2024 +0200
Improved: PROJECTMGR- Move from hard-coded menu location to parameterized
(OFBIZ-12975) (#107)
Move the menu location in the various projectmgr screens from hard-coded to
parameterized.
modified:
CommonScreens, ProjectScreens.xml, TimeSheeetScreens.xml
- change location of referenced menus
---
projectmgr/widget/CommonScreens.xml | 37 ++++++++++++++++++----------------
projectmgr/widget/ProjectScreens.xml | 2 +-
projectmgr/widget/TimeSheetScreens.xml | 2 +-
3 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/projectmgr/widget/CommonScreens.xml
b/projectmgr/widget/CommonScreens.xml
index 394ba3f05..647770272 100644
--- a/projectmgr/widget/CommonScreens.xml
+++ b/projectmgr/widget/CommonScreens.xml
@@ -42,7 +42,7 @@ under the License.
<set field="layoutSettings.styleSheets[]"
value="/projectmgr/static/projectmgr.css" global="true"/>
<set field="activeApp" value="projectmgr" global="true"/>
<set field="applicationMenuName" value="ProjectMgrAppBar"
global="true"/>
- <set field="applicationMenuLocation"
value="component://projectmgr/widget/ProjectMenus.xml" global="true"/>
+ <set field="applicationMenuLocation"
value="${parameters.mainMenuLocation}" global="true"/>
<set field="applicationTitle"
from-field="uiLabelMap.ProjectMgrApplication" global="true"/>
<set field="helpAnchor" from-field="helpAnchor"
default-value="_project_manager"/>
<set field="my" value="My" global="true"/>
@@ -65,7 +65,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
- <include-menu name="MainActionMenu"
location="component://projectmgr/widget/ProjectMenus.xml"/>
+ <include-menu name="MainActionMenu"
location="${parameters.mainMenuLocation}"/>
<section>
<condition>
<and>
@@ -75,8 +75,8 @@ under the License.
</condition>
<widgets>
<label style="h1" text="${uiLabelMap.Project}:
${project.workEffortId}"/>
- <include-menu name="ProjectTabBar"
location="component://projectmgr/widget/ProjectMenus.xml"/>
- <include-menu name="ProjectButtonBar"
location="component://projectmgr/widget/ProjectMenus.xml"/>
+ <include-menu name="ProjectTabBar"
location="${parameters.mainMenuLocation}"/>
+ <include-menu name="ProjectButtonBar"
location="${parameters.mainMenuLocation}"/>
</widgets>
</section>
</decorator-section>
@@ -116,7 +116,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
- <include-menu name="MainActionMenu"
location="component://projectmgr/widget/ProjectMenus.xml"/>
+ <include-menu name="MainActionMenu"
location="${parameters.mainMenuLocation}"/>
<section>
<condition>
<and>
@@ -126,8 +126,8 @@ under the License.
</condition>
<widgets>
<label style="h1"
text="${uiLabelMap.WorkEffortTask}: ${workEffort.workEffortId}"/>
- <include-menu name="TaskTabBar"
location="component://projectmgr/widget/ProjectMenus.xml"/>
- <include-menu name="TaskSubTabBar"
location="component://projectmgr/widget/ProjectMenus.xml"/>
+ <include-menu name="TaskTabBar"
location="${parameters.mainMenuLocation}"/>
+ <include-menu name="TaskSubTabBar"
location="${parameters.mainMenuLocation}"/>
</widgets>
</section>
</decorator-section>
@@ -157,7 +157,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
- <include-menu name="MainActionMenu"
location="component://projectmgr/widget/ProjectMenus.xml"/>
+ <include-menu name="MainActionMenu"
location="${parameters.mainMenuLocation}"/>
</decorator-section>
<decorator-section name="body">
<section>
@@ -185,7 +185,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
- <include-menu name="MainActionMenu"
location="component://projectmgr/widget/ProjectMenus.xml"/>
+ <include-menu name="MainActionMenu"
location="${parameters.mainMenuLocation}"/>
</decorator-section>
<decorator-section name="body">
<section>
@@ -219,7 +219,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
- <include-menu name="MainActionMenu"
location="component://projectmgr/widget/ProjectMenus.xml"/>
+ <include-menu name="MainActionMenu"
location="${parameters.mainMenuLocation}"/>
</decorator-section>
<decorator-section name="body">
<section>
@@ -227,8 +227,8 @@ under the License.
<if-has-permission permission="PROJECTMGR"
action="_VIEW"/>
</condition>
<widgets>
- <!--include-menu name="TimesheetTabBar"
location="component://projectmgr/widget/ProjectMenus.xml"/-->
- <include-menu name="TimesheetSubTabBar"
location="component://projectmgr/widget/ProjectMenus.xml"/>
+ <!--include-menu name="TimesheetTabBar"
location="${parameters.mainMenuLocation}"/-->
+ <include-menu name="TimesheetSubTabBar"
location="${parameters.mainMenuLocation}"/>
<section>
<condition>
<not>
@@ -263,7 +263,7 @@ under the License.
<if-has-permission permission="PROJECTMGR"
action="_VIEW"/>
</condition>
<widgets>
- <include-menu name="MyTimeSubTabBar"
location="component://projectmgr/widget/ProjectMenus.xml"/>
+ <include-menu name="MyTimeSubTabBar"
location="${parameters.mainMenuLocation}"/>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
@@ -285,7 +285,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
- <include-menu name="MainActionMenu"
location="component://projectmgr/widget/ProjectMenus.xml"/>
+ <include-menu name="MainActionMenu"
location="${parameters.mainMenuLocation}"/>
</decorator-section>
<decorator-section name="body">
<section>
@@ -341,6 +341,9 @@ under the License.
<widgets/>
</section>
<decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="pre-body">
+ <include-menu name="MainActionMenu"
location="${parameters.mainMenuLocation}"/>
+ </decorator-section>
<decorator-section name="body">
<section>
<!-- do check for PROJECTMGR, _VIEW permission -->
@@ -354,7 +357,7 @@ under the License.
<section>
<condition><not><if-empty
field="partyId"/></not></condition>
<widgets>
- <include-menu name="ResourceTabBar"
location="component://projectmgr/widget/ProjectMenus.xml"/>
+ <include-menu name="ResourceTabBar"
location="${parameters.mainMenuLocation}"/>
<container>
<section>
<widgets>
@@ -384,7 +387,7 @@ under the License.
<widgets>
<decorator-screen name="CommonRequestDecorator"
location="component://order/widget/ordermgr/CommonScreens.xml">
<decorator-section name="pre-body">
- <include-menu name="MainActionMenu"
location="component://projectmgr/widget/ProjectMenus.xml"/>
+ <include-menu name="MainActionMenu"
location="${parameters.mainMenuLocation}"/>
</decorator-section>
<decorator-section name="body">
<decorator-section-include name="body"/>
@@ -401,7 +404,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
- <include-menu name="MainActionMenu"
location="component://projectmgr/widget/ProjectMenus.xml"/>
+ <include-menu name="MainActionMenu"
location="${parameters.mainMenuLocation}"/>
</decorator-section>
<decorator-section name="body">
<decorator-section-include name="body"/>
diff --git a/projectmgr/widget/ProjectScreens.xml
b/projectmgr/widget/ProjectScreens.xml
index 13f506642..0ee555b9f 100644
--- a/projectmgr/widget/ProjectScreens.xml
+++ b/projectmgr/widget/ProjectScreens.xml
@@ -67,7 +67,7 @@ under the License.
</section>
<decorator-screen name="CommonProjectDecorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <include-menu name="ProjectButtonBar"
location="component://projectmgr/widget/ProjectMenus.xml"/>
+ <include-menu name="ProjectButtonBar"
location="${parameters.mainMenuLocation}"/>
<container style="clear"/>
<screenlet name="findProject" collapsible="true"
title="${uiLabelMap.PageTitleFindProject}">
<include-form name="FindProject"
location="component://projectmgr/widget/forms/ProjectForms.xml"/>
diff --git a/projectmgr/widget/TimeSheetScreens.xml
b/projectmgr/widget/TimeSheetScreens.xml
index 4a0535281..39485b205 100644
--- a/projectmgr/widget/TimeSheetScreens.xml
+++ b/projectmgr/widget/TimeSheetScreens.xml
@@ -232,7 +232,7 @@ under the License.
<fail-widgets>
<screenlet
title="${uiLabelMap.PageTitleCurrentTimesheet} ${uiLabelMap.CommonNbr}
${timesheet.timesheetId} ${uiLabelMap.ProjectMgrWeek}: ${weekNumber}
${uiLabelMap.CommonFrom}
${groovy:timesheet.get("fromDate").toString().substring(0,10)}
${uiLabelMap.CommonTo}
${groovy:timesheet.get("thruDate").toString().substring(0,10)}"
navigation-menu-name="TimesheetBar">
- <include-menu name="TimesheetBar"
location="component://projectmgr/widget/ProjectMenus.xml"/>
+ <include-menu name="TimesheetBar"
location="${parameters.mainMenuLocation}"/>
<include-form name="EditWeekTimesheet"
location="component://projectmgr/widget/forms/TimeSheetForms.xml"/>
</screenlet>
</fail-widgets>