Improved: Consitent menu bar in following screens decorator:
- facility
- workeffort
- iCalendar
- timesheet
- quote
(OFBIZ-7756)(OFBIZ-7818)(OFBIZ-7822)(OFBIZ-7832)(OFBIZ-7841)
Thanks Avnindra Sharma for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1768263 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/applications/order/widget/ordermgr/QuoteScreens.xml b/applications/order/widget/ordermgr/QuoteScreens.xml
index c93a798..af4a87c 100644
--- a/applications/order/widget/ordermgr/QuoteScreens.xml
+++ b/applications/order/widget/ordermgr/QuoteScreens.xml
@@ -45,6 +45,9 @@
</container>
</widgets>
</section>
+ <container>
+ <link target="EditQuote" text="${uiLabelMap.OrderCreateOrderQuote}" style="buttontext"/>
+ </container>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
diff --git a/applications/product/template/facility/FindFacilityLocation.ftl b/applications/product/template/facility/FindFacilityLocation.ftl
index 0c64153..a947ef2 100644
--- a/applications/product/template/facility/FindFacilityLocation.ftl
+++ b/applications/product/template/facility/FindFacilityLocation.ftl
@@ -18,7 +18,6 @@
-->
<div class="button-bar button-style-1">
- <a href="<@ofbizUrl>EditFacility</@ofbizUrl>" class="create">${uiLabelMap.ProductNewFacility}</a>
<a href="<@ofbizUrl>EditFacilityLocation?facilityId=${facilityId!}</@ofbizUrl>" class="create">${uiLabelMap.ProductNewFacilityLocation}</a>
</div>
diff --git a/applications/product/template/inventory/ReceiveInventory.ftl b/applications/product/template/inventory/ReceiveInventory.ftl
index 8d530a8..c821c9c 100644
--- a/applications/product/template/inventory/ReceiveInventory.ftl
+++ b/applications/product/template/inventory/ReceiveInventory.ftl
@@ -23,9 +23,6 @@
<#if invalidProductId??>
<div class="errorMessage">${invalidProductId}</div>
</#if>
- <div class="button-bar button-style-1">
- <a href="<@ofbizUrl>EditFacility</@ofbizUrl>" class="create">${uiLabelMap.ProductNewFacility}</a>
- </div>
<#-- Receiving Results -->
<#if receivedItems?has_content>
<h3>${uiLabelMap.ProductReceiptPurchaseOrder} ${purchaseOrder.orderId}</h3>
diff --git a/applications/product/template/returns/ReceiveReturn.ftl b/applications/product/template/returns/ReceiveReturn.ftl
index aaffb0c..2aa2d88 100644
--- a/applications/product/template/returns/ReceiveReturn.ftl
+++ b/applications/product/template/returns/ReceiveReturn.ftl
@@ -21,7 +21,6 @@
<h3>${uiLabelMap.ProductReceiveReturn} ${uiLabelMap.CommonInto} <#if facility?has_content>"${facility.facilityName?default("Not Defined")}"</#if> [${uiLabelMap.CommonId}:${facility.facilityId!}]</h3>
</div>
<div class="screenlet-body">
- <a href="<@ofbizUrl>EditFacility</@ofbizUrl>" class="buttontext">${uiLabelMap.ProductNewFacility}</a>
<#-- Receiving Results -->
<#if receivedItems?has_content>
<h3>${uiLabelMap.ProductReceiptForReturn} ${uiLabelMap.CommonNbr}<a href="/ordermgr/control/returnMain?returnId=${returnHeader.returnId}${externalKeyParam!}" class="buttontext">${returnHeader.returnId}</a></h3>
diff --git a/applications/product/widget/facility/CommonScreens.xml b/applications/product/widget/facility/CommonScreens.xml
index a88b00e..b9c0b93 100644
--- a/applications/product/widget/facility/CommonScreens.xml
+++ b/applications/product/widget/facility/CommonScreens.xml
@@ -79,6 +79,11 @@
<label style="h3">${uiLabelMap.ProductErrorFacilityIdNotFound}</label>
</fail-widgets>
</section>
+ <section>
+ <condition>
+ <if-service-permission service-name="facilityGenericPermission" main-action="CREATE"/>
+ </condition>
+ </section>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.ProductFacilityViewPermissionError}</label>
@@ -87,6 +92,11 @@
</decorator-section>
<decorator-section name="body">
<section>
+ <widgets>
+ <container style="button-bar"><link target="EditFacility" text="${uiLabelMap.ProductCreateNewFacility}" style="buttontext"/></container>
+ </widgets>
+ </section>
+ <section>
<condition>
<if-service-permission service-name="facilityGenericPermission" main-action="VIEW"/>
</condition>
diff --git a/applications/product/widget/facility/FacilityScreens.xml b/applications/product/widget/facility/FacilityScreens.xml
index 4fcaf3d..e5f3c46 100644
--- a/applications/product/widget/facility/FacilityScreens.xml
+++ b/applications/product/widget/facility/FacilityScreens.xml
@@ -56,7 +56,6 @@
</condition>
<widgets>
<container style="button-bar">
- <link target="EditFacility" text="${uiLabelMap.ProductNewFacility}" style="buttontext create"/>
<link target="/workeffort/control/calendar" text="${uiLabelMap.CommonViewCalendar}" style="buttontext" url-mode="inter-app">
<parameter param-name="facilityId"/>
<parameter param-name="externalLoginKey" from-field="parameters.externalLoginKey"/>
@@ -83,14 +82,6 @@
</condition>
<widgets>
<label text="${uiLabelMap.FacilitySelection}" style="h1"/>
- <section>
- <condition>
- <if-service-permission service-name="facilityGenericPermission" main-action="CREATE"/>
- </condition>
- <widgets>
- <container style="button-bar"><link target="EditFacility" text="${uiLabelMap.ProductCreateNewFacility}" style="buttontext create"/></container>
- </widgets>
- </section>
<screenlet>
<include-form name="FindFacility10" location="component://product/widget/facility/FacilityForms.xml"/>
</screenlet>
@@ -102,16 +93,6 @@
</condition>
<widgets>
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
- <decorator-section name="menu-bar">
- <section>
- <condition>
- <if-service-permission service-name="facilityGenericPermission" main-action="CREATE"/>
- </condition>
- <widgets>
- <container style="button-bar"><link target="EditFacility" text="${uiLabelMap.ProductCreateNewFacility}" style="buttontext"/></container>
- </widgets>
- </section>
- </decorator-section>
<decorator-section name="search-options">
<include-form name="FindFacilityOptions" location="component://product/widget/facility/FacilityForms.xml"/>
</decorator-section>
@@ -180,7 +161,6 @@
<label>${uiLabelMap.ProductEditFacility} ${facility.facilityName} [${facilityId}]</label>
</container>
<container style="button-bar button-style-1">
- <link target="EditFacility" text="${uiLabelMap.ProductNewFacility}" style="create"/>
<link target="/workeffort/control/calendar" text="${uiLabelMap.CommonViewCalendar}" url-mode="inter-app">
<parameter param-name="facilityId"/>
<parameter param-name="externalLoginKey" from-field="parameters.externalLoginKey"/>
@@ -365,7 +345,6 @@
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="menu-bar">
<container style="button-bar">
- <link target="EditFacility" text="${uiLabelMap.ProductNewFacility}" style="buttontext create"/>
<link target="EditInventoryItem" text="${uiLabelMap.ProductNewInventoryItem}" style="buttontext create">
<parameter param-name="facilityId" from-field="parameters.facilityId"/>
</link>
@@ -409,7 +388,6 @@
<label style="h1">${uiLabelMap.ProductInventoryItemsFor} ${facility.facilityName} [${uiLabelMap.CommonId}:${facility.facilityId}]</label>
</container>
<container>
- <link target="EditFacility" text="${uiLabelMap.ProductNewFacility}" style="buttontext"/>
<link target="EditInventoryItem" text="${uiLabelMap.ProductCreateNewInventoryItemFacility}" style="buttontext">
<parameter param-name="facilityId" from-field="parameters.facilityId"/>
</link>
@@ -574,9 +552,6 @@
<container style="page-title">
<label>${uiLabelMap.ProductInventoryItemsDetailsFor} ${facility.facilityName} [${uiLabelMap.CommonId}:${facility.facilityId}]</label>
</container>
- <container style="button-bar button-style-1">
- <link target="EditFacility" text="${uiLabelMap.ProductNewFacility}" style="create"/>
- </container>
<screenlet title="${uiLabelMap.PageTitleViewFacilityInventoryItemsDetails}">
<include-form name="SearchInventoryItemsDetailsParams" location="component://product/widget/facility/FacilityForms.xml"/>
</screenlet>
@@ -739,9 +714,6 @@
<container style="page-title">
<label>${title}</label>
</container>
- <container style="button-bar button-style-1">
- <link target="EditFacility" text="${uiLabelMap.ProductNewFacility}" style="create"/>
- </container>
<screenlet id="add-facility-group-member" title="${uiLabelMap.ProductAddFacilityGroupMember}" collapsible="true">
<include-form name="AddGroupToFacility" location="component://product/widget/facility/FacilityForms.xml"/>
</screenlet>
@@ -773,9 +745,6 @@
<container style="page-title">
<label>${title}</label>
</container>
- <container style="button-bar button-style-1">
- <link target="EditFacility" text="${uiLabelMap.ProductNewFacility}" style="create"/>
- </container>
<screenlet id="add-facility-party-role" title="${uiLabelMap.ProductAddFacilityPartyRole}" collapsible="true">
<include-form name="AddPartyToFacility" location="component://product/widget/facility/FacilityForms.xml"/>
</screenlet>
@@ -803,7 +772,6 @@
<label>${title}</label>
</container>
<container style="button-bar button-style-1">
- <link target="EditFacility" text="${uiLabelMap.ProductNewFacility}" style="create"/>
<section>
<condition>
<not><if-empty field="facilityId"/></not>
@@ -1088,7 +1056,6 @@
<decorator-section name="body">
<label text="${title}" style="h1"/>
<container style="button-bar">
- <link target="EditFacility" text="${uiLabelMap.ProductNewFacility}" style="buttontext"/>
<link target="PickMoveStockSimple" text="${uiLabelMap.CommonPrint}" style="buttontext ">
<parameter param-name="facilityId" from-field="facilityId"/>
</link>
diff --git a/applications/workeffort/widget/CommonScreens.xml b/applications/workeffort/widget/CommonScreens.xml
index 6172591..d1a30e5 100644
--- a/applications/workeffort/widget/CommonScreens.xml
+++ b/applications/workeffort/widget/CommonScreens.xml
@@ -87,6 +87,11 @@
<if-service-permission service-name="workEffortManagerPermission" main-action="VIEW"/>
</condition>
<widgets>
+ <container style="button-bar">
+ <link text="${uiLabelMap.WorkEffortCreate}" target="EditWorkEffort" style="buttontext">
+ <parameter param-name="DONE_PAGE" from-field="donePage"/>
+ </link>
+ </container>
<section>
<condition>
<not>
@@ -130,10 +135,12 @@
<condition><not><if-empty field="timesheetId"/></not></condition>
<widgets>
<include-menu name="TimesheetTabBar" location="component://workeffort/widget/TimesheetMenus.xml"/>
+ <container style="button-bar">
+ <link text="${uiLabelMap.WorkEffortTimesheetCreate}" target="EditTimesheet" style="buttontext create"/>
+ </container>
<container><label style="h1">${uiLabelMap.WorkEffortTimesheetTimesheetId} ${timesheetId}</label></container>
</widgets>
</section>
-
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
diff --git a/applications/workeffort/widget/TimesheetScreens.xml b/applications/workeffort/widget/TimesheetScreens.xml
index ab5f872..f2f60c7 100644
--- a/applications/workeffort/widget/TimesheetScreens.xml
+++ b/applications/workeffort/widget/TimesheetScreens.xml
@@ -186,9 +186,6 @@
</widgets>
<fail-widgets>
<screenlet title="${uiLabelMap.PageTitleEditTimesheet}">
- <container style="button-bar">
- <link text="${uiLabelMap.WorkEffortTimesheetCreate}" target="EditTimesheet" style="buttontext create"/>
- </container>
<include-form name="EditTimesheet" location="component://workeffort/widget/TimesheetForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.PageTitleAddTimesheetToInvoice}">
@@ -222,9 +219,6 @@
<decorator-screen name="CommonTimesheetDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.PageTitleEditTimesheetRoles}">
- <container style="button-bar">
- <link text="${uiLabelMap.WorkEffortTimesheetCreate}" target="EditTimesheet" style="buttontext create"/>
- </container>
<include-form name="ListTimesheetRoles" location="component://workeffort/widget/TimesheetForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.PageTitleAddTimesheetRoles}">
@@ -249,7 +243,6 @@
<decorator-screen name="CommonTimesheetDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.PageTitleEditTimesheetEntries}">
- <container><link text="${uiLabelMap.WorkEffortTimesheetCreate}" target="EditTimesheet" style="buttontext"/></container>
<include-form name="ListTimesheetEntries" location="component://workeffort/widget/TimesheetForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.PageTitleAddTimesheetEntries}">
diff --git a/applications/workeffort/widget/WorkEffortScreens.xml b/applications/workeffort/widget/WorkEffortScreens.xml
index 8821086..eb9f541 100644
--- a/applications/workeffort/widget/WorkEffortScreens.xml
+++ b/applications/workeffort/widget/WorkEffortScreens.xml
@@ -110,11 +110,6 @@
</screenlet>
</widgets>
<fail-widgets>
- <container style="button-bar">
- <link text="${uiLabelMap.WorkEffortCreate}" target="EditWorkEffort" style="buttontext">
- <parameter param-name="DONE_PAGE" from-field="donePage"/>
- </link>
- </container>
<screenlet>
<include-form name="EditWorkEffort" location="component://workeffort/widget/WorkEffortForms.xml"/>
</screenlet>
@@ -817,6 +812,9 @@
</or>
</condition>
<widgets>
+ <container style="button-bar">
+ <link text="${uiLabelMap.CommonCreate}" target="EditICalendar" style="buttontext"/>
+ </container>
<container style="h1">
<label text="${title}"/>
</container>
@@ -899,9 +897,6 @@
<include-form name="EditICalendar" location="component://workeffort/widget/WorkEffortForms.xml"/>
</widgets>
<fail-widgets>
- <container style="button-bar">
- <link text="${uiLabelMap.CommonCreate}" target="EditICalendar" style="buttontext"/>
- </container>
<include-form name="EditICalendar" location="component://workeffort/widget/WorkEffortForms.xml"/>
</fail-widgets>
</section>