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-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 935dbbb  Improved: Move edit of Request to RequestSubTabBar 
(OFBIZ-12494) (#447)
935dbbb is described below

commit 935dbbbb78bfd73d4f3c9b2a0672c4aa5b7b751f
Author: Pierre Smits <pierre.sm...@orrtiz.com>
AuthorDate: Thu Jan 20 13:21:44 2022 +0100

    Improved: Move edit of Request to RequestSubTabBar (OFBIZ-12494) (#447)
    
    In general, a <object>TabBar menu is intended to give users access to 
overviews related to the <object>. And a <object>SubTabBar menu is intended to 
give users access to actions to be performed on the <object>, like status 
changes, adding new related records, etc.
    The menu-item for editing a request is currently located in the 
RequestTabBar menu in OrderMenus.xml.
    Given that this menu-item is intended for users with UPDATE permissions and 
to give those users access to a screen to edit the data, this menu-item must 
move to the RequestSubTabBar menu.
    
    modified: OrderMenus.xml
    - menu RequestTabBar, removed menu-item editRequest (moved to 
RequestSubTabBar), additional cleanup
    - menu RequestSubTabBar, added menu-item editRequest, added permission 
condition, additional cleanup
---
 applications/order/widget/ordermgr/OrderMenus.xml | 28 ++++++++++++-----------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/applications/order/widget/ordermgr/OrderMenus.xml 
b/applications/order/widget/ordermgr/OrderMenus.xml
index 11825ac..b2496e5 100644
--- a/applications/order/widget/ordermgr/OrderMenus.xml
+++ b/applications/order/widget/ordermgr/OrderMenus.xml
@@ -381,12 +381,12 @@ under the License.
     </menu>
 
     <menu name="RequestTabBar" extends="CommonTabBarMenu" 
extends-resource="component://common/widget/CommonMenus.xml">
-        <menu-item name="ViewRequest" 
title="${uiLabelMap.OrderRequestOverview}">
+        <menu-item name="ViewRequest" title="${uiLabelMap.CommonOverview}">
             <link target="ViewRequest">
                 <parameter param-name="custRequestId" 
from-field="custRequest.custRequestId"/>
             </link>
         </menu-item>
-        <menu-item name="editRequest" title="${uiLabelMap.OrderRequest}">
+        <menu-item name="requestroles" title="${uiLabelMap.CommonRoles}">
             <condition>
                 <and>
                     <not><if-empty field="custRequest"/></not>
@@ -394,11 +394,11 @@ under the License.
                     <if-compare field="custRequest.statusId" 
operator="not-equals" value="CRQ_COMPLETED"/>
                 </and>
             </condition>
-            <link target="request">
+            <link target="requestroles">
                 <parameter param-name="custRequestId" 
from-field="custRequest.custRequestId"/>
             </link>
         </menu-item>
-        <menu-item name="requestroles" title="${uiLabelMap.OrderRequestRoles}">
+        <menu-item name="requestitems" title="${uiLabelMap.CommonItems}">
             <condition>
                 <and>
                     <not><if-empty field="custRequest"/></not>
@@ -406,11 +406,11 @@ under the License.
                     <if-compare field="custRequest.statusId" 
operator="not-equals" value="CRQ_COMPLETED"/>
                 </and>
             </condition>
-            <link target="requestroles">
+            <link target="requestitems">
                 <parameter param-name="custRequestId" 
from-field="custRequest.custRequestId"/>
             </link>
         </menu-item>
-        <menu-item name="requestitems" title="${uiLabelMap.OrderRequestItems}">
+        <menu-item name="custRequestContent" 
title="${uiLabelMap.CommonContent}">
             <condition>
                 <and>
                     <not><if-empty field="custRequest"/></not>
@@ -418,26 +418,28 @@ under the License.
                     <if-compare field="custRequest.statusId" 
operator="not-equals" value="CRQ_COMPLETED"/>
                 </and>
             </condition>
-            <link target="requestitems">
+            <link target="EditCustRequestContent">
                 <parameter param-name="custRequestId" 
from-field="custRequest.custRequestId"/>
             </link>
         </menu-item>
-        <menu-item name="custRequestContent" 
title="${uiLabelMap.OrderRequestContent}">
+    </menu>
+    <menu name="RequestSubTabBar" extends="CommonTabBarMenu" 
extends-resource="component://common/widget/CommonMenus.xml"
+        menu-container-style="button-bar button-style-2">
+        <menu-item name="editRequest" title="${uiLabelMap.CommonEdit}">
             <condition>
                 <and>
+                    <or>
+                        <if-has-permission permission="ORDERMGR" 
action="_UPDATE"/>
+                    </or>
                     <not><if-empty field="custRequest"/></not>
                     <if-compare field="custRequest.statusId" 
operator="not-equals" value="CRQ_CANCELLED"/>
                     <if-compare field="custRequest.statusId" 
operator="not-equals" value="CRQ_COMPLETED"/>
                 </and>
             </condition>
-            <link target="EditCustRequestContent">
+            <link target="request">
                 <parameter param-name="custRequestId" 
from-field="custRequest.custRequestId"/>
             </link>
         </menu-item>
-    </menu>
-
-    <menu name="RequestSubTabBar" extends="CommonTabBarMenu" 
extends-resource="component://common/widget/CommonMenus.xml"
-        menu-container-style="button-bar button-style-2">
         <menu-item name="createQuoteFromRequest" 
title="${uiLabelMap.OrderCreateQuoteFromRequest}">
             <condition>
                 <and>

Reply via email to