Skip to content

Commit

Permalink
Improved: WorkEffort - MainActionMenu (OFBIZ-12557) (#498)
Browse files Browse the repository at this point in the history
Currently the create buttons for the main objects of the work effort  are located within the find and other widgets/templates of those objects.
In order to improve the usability of 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 component.

modified:
WorkEffortMenus.xml - added MainActionMenu for users with CREATE permission in the component
CommonScreens.xml - added MainActionMenu as an 'include-menu' ref in various common decorator screens.
Added MainActionMenu as an 'include-menu' in screen definitions in various other Screen.xml files where appropriate
additional cleaning.
  • Loading branch information
PierreSmits committed Jul 10, 2022
1 parent d41d816 commit 38230e4
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 45 deletions.
10 changes: 10 additions & 0 deletions applications/workeffort/widget/CommonScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://workeffort/widget/WorkEffortMenus.xml"/>
<section>
<condition>
<and>
Expand Down Expand Up @@ -129,6 +130,9 @@ under the License.
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://workeffort/widget/WorkEffortMenus.xml"/>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
Expand Down Expand Up @@ -164,6 +168,9 @@ under the License.
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://workeffort/widget/WorkEffortMenus.xml"/>
</decorator-section>
<decorator-section name="body">
<section>
<condition>
Expand Down Expand Up @@ -213,6 +220,9 @@ under the License.
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://workeffort/widget/WorkEffortMenus.xml"/>
</decorator-section>
<decorator-section name="body">
<platform-specific>
<html><html-template location="component://workeffort/template/Main.ftl"/></html>
Expand Down
3 changes: 3 additions & 0 deletions applications/workeffort/widget/CustRequestScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ under the License.
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://workeffort/widget/WorkEffortMenus.xml"/>
</decorator-section>
<decorator-section name="body">
<screenlet title="${uiLabelMap.WorkEffortMyRequestList}">
<include-grid name="ListRequests" location="component://workeffort/widget/CustRequestForms.xml"/>
Expand Down
3 changes: 3 additions & 0 deletions applications/workeffort/widget/TimesheetScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ under the License.
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://workeffort/widget/WorkEffortMenus.xml"/>
</decorator-section>
<decorator-section name="body">
<screenlet title="${uiLabelMap.WorkEffortMyCurrentTimesheets}">
<container style="button-bar">
Expand Down
17 changes: 16 additions & 1 deletion applications/workeffort/widget/WorkEffortMenus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,22 @@ under the License.
<menu-item name="userJobs" title="${uiLabelMap.WorkEffortJobList}"><link target="UserJobs"/></menu-item>
<menu-item name="WorkEffortICalendar" title="${uiLabelMap.WorkEffortICalendar}"><link target="FindICalendars"/></menu-item>
</menu>

<menu name="MainActionMenu" menu-container-style="button-bar button-style-2" default-selected-style="selected">
<menu-item name="NewWorkEffort" title="${uiLabelMap.WorkEffortCreate}">
<condition>
<and>
<or>
<if-has-permission permission="WORKEFFORTMGR" action="_CREATE"/>
</or>
</and>
</condition>
<link text="${uiLabelMap.WorkEffortCreate}" target="WorkEffort/Edit" link-type="layered-modal">
<set-callback area-target="WorkEffortSummary" area-id="window">
<parameter param-name="workEffortId" from-event-result="workEffortId"/>
</set-callback>
</link>
</menu-item>
</menu>
<menu name="WorkEffortShortcutAppBar" title="${uiLabelMap.WorkEffortManager}" default-menu-item-name="task" >
<menu-item name="task" title="${uiLabelMap.WorkEffortTaskList}"><link target="/workeffort/control/mytasks" url-mode="inter-app"/></menu-item>
<menu-item name="calendar" title="${uiLabelMap.WorkEffortCalendar}"><link target="/workeffort/control/calendar" url-mode="inter-app"/></menu-item>
Expand Down

0 comments on commit 38230e4

Please sign in to comment.