Skip to content

Commit

Permalink
Improved: CATALOG - Move from hard-code menu location to parameterize…
Browse files Browse the repository at this point in the history
…d (OFBIZ-12947) (#732)

Move the menu location in the various catalog screens from hard-coded to parameterized.

modified:
- CatalogScreens.xml
- CategoryScreens.xml
- CommonScreens.xml
- ConfigScreens.xml
- FeatureScreens.xml
- PriceScreens.xml
- ProductScreens.xml
- PromoScreens.xml
- ReviewScreens.xml
- StoreScreens.xml
- SubscriptionScreens.xml
- ThesaurusScreens.xml
  • Loading branch information
PierreSmits authored Mar 18, 2024
1 parent fae131f commit a9a3d13
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 43 deletions.
6 changes: 3 additions & 3 deletions applications/product/widget/catalog/CatalogScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-menu name="CatalogTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="CatalogSubTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="CatalogTabBar" location="${parameters.mainMenuLocation}"/>
<include-menu name="CatalogSubTabBar" location="${parameters.mainMenuLocation}"/>
<label style="h1">${uiLabelMap.ProductCatalog} ${uiLabelMap.CommonFor} "${prodCatalog.catalogName}" [${prodCatalogId}]</label>
<screenlet title="${uiLabelMap.PageTitleEditProductCatalog}">
<label style="h3">${uiLabelMap.ProductCatalogEmptyWarning}</label>
Expand Down Expand Up @@ -195,7 +195,7 @@ under the License.
<widgets>
<decorator-screen name="ShortcutDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="body">
<include-menu name="CatalogShortcutAppBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="CatalogShortcutAppBar" location="${parameters.mainMenuLocation}"/>
</decorator-section>
</decorator-screen>
</widgets>
Expand Down
14 changes: 7 additions & 7 deletions applications/product/widget/catalog/CategoryScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="MainActionMenu" location="${parameters.mainMenuLocation}"/>
</decorator-section>
<decorator-section name="left-column">
<include-screen name="leftbar" location="component://product/widget/catalog/CommonScreens.xml"/>
Expand All @@ -53,8 +53,8 @@ under the License.
<not><if-empty field="productCategory"/></not>
</condition>
<widgets>
<include-menu name="CategoryTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="CategorySubTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="CategoryTabBar" location="${parameters.mainMenuLocation}"/>
<include-menu name="CategorySubTabBar" location="${parameters.mainMenuLocation}"/>
<container>
<label style="h1">${uiLabelMap[labelTitleProperty]} ${uiLabelMap.CommonFor}: ${productCategory.categoryName} [${uiLabelMap.CommonId}:${productCategoryId}] ${${extraFunctionName}}</label>
</container>
Expand All @@ -65,7 +65,7 @@ under the License.
<if-compare operator="not-equals" value="EditCategory" field="tabButtonItem"/>
</condition>
<widgets>
<include-menu name="CategorySubTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="CategorySubTabBar" location="${parameters.mainMenuLocation}"/>
</widgets>
</section>
</fail-widgets>
Expand Down Expand Up @@ -170,8 +170,8 @@ under the License.
<not><if-empty field="productCategory"/></not>
</condition>
<widgets>
<include-menu name="CategoryTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="CategorySubTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="CategoryTabBar" location="${parameters.mainMenuLocation}"/>
<include-menu name="CategorySubTabBar" location="${parameters.mainMenuLocation}"/>
<container>
<label style="h1">${uiLabelMap[labelTitleProperty]} ${uiLabelMap.CommonFor}: ${productCategory.description} [${uiLabelMap.CommonId}:${productCategoryId}] ${${extraFunctionName}}</label>
</container>
Expand All @@ -182,7 +182,7 @@ under the License.
<if-compare operator="not-equals" value="EditCategory" field="tabButtonItem"/>
</condition>
<widgets>
<include-menu name="CategorySubTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="CategorySubTabBar" location="${parameters.mainMenuLocation}"/>
</widgets>
</section>
</fail-widgets>
Expand Down
34 changes: 17 additions & 17 deletions applications/product/widget/catalog/CommonScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ under the License.
<!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
<set field="activeApp" value="catalogmgr" global="true"/>
<set field="applicationMenuName" value="CatalogAppBar" global="true"/>
<set field="applicationMenuLocation" value="component://product/widget/catalog/CatalogMenus.xml" global="true"/>
<set field="applicationMenuLocation" value="${parameters.mainMenuLocation}" global="true"/>
<set field="helpAnchor" from-field="helpAnchor" default-value="_catalog"/>
<set field="applicationTitle" from-field="uiLabelMap.ProductCatalogManagerApplication" global="true"/>
<set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/ui/js/jquery.cookie-1.4.0.js" global="true"/>
Expand All @@ -58,7 +58,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="MainActionMenu" location="${parameters.mainMenuLocation}"/>
</decorator-section>
<decorator-section name="left-column">
<section>
Expand Down Expand Up @@ -90,8 +90,8 @@ under the License.
<not><if-empty field="prodCatalog"/></not>
</condition>
<widgets>
<include-menu name="CatalogTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="CatalogSubTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="CatalogTabBar" location="${parameters.mainMenuLocation}"/>
<include-menu name="CatalogSubTabBar" location="${parameters.mainMenuLocation}"/>
<label style="h1">${uiLabelMap.ProductCatalog} ${uiLabelMap.CommonFor} "${prodCatalog.catalogName}" [${prodCatalogId}]</label>
</widgets>
<fail-widgets>
Expand All @@ -100,7 +100,7 @@ under the License.
<if-compare operator="not-equals" value="ProductCatalog" field="tabButtonItem"/>
</condition>
<widgets>
<include-menu name="CatalogSubTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="CatalogSubTabBar" location="${parameters.mainMenuLocation}"/>
</widgets>
</section>
</fail-widgets>
Expand All @@ -122,7 +122,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="MainActionMenu" location="${parameters.mainMenuLocation}"/>
</decorator-section>
<decorator-section name="left-column">
<section>
Expand Down Expand Up @@ -153,12 +153,12 @@ under the License.
<condition><not><if-empty field="productStore"/></not></condition>
<widgets>
<container>
<include-menu name="ProductStoreTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="ProductStoreTabBar" location="${parameters.mainMenuLocation}"/>
<label style="h1">${uiLabelMap[labelTitleProperty]} ${uiLabelMap.CommonFor}: ${productStore.storeName} [${uiLabelMap.CommonId}:${productStoreId}] ${${extraFunctionName}}</label>
</container>
<section>
<widgets>
<include-menu name="ProductStoreSubTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="ProductStoreSubTabBar" location="${parameters.mainMenuLocation}"/>
</widgets>
</section>
</widgets>
Expand All @@ -183,7 +183,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="MainActionMenu" location="${parameters.mainMenuLocation}"/>
</decorator-section>
<decorator-section name="left-column">
<include-screen name="ProductStoreGroupTree"/>
Expand All @@ -199,7 +199,7 @@ under the License.
</or>
</condition>
<widgets>
<include-menu name="ProductStoreGroupButtonBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="ProductStoreGroupButtonBar" location="${parameters.mainMenuLocation}"/>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
Expand All @@ -217,7 +217,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="MainActionMenu" location="${parameters.mainMenuLocation}"/>
</decorator-section>
<decorator-section name="left-column">
<include-screen name="leftbar"/>
Expand All @@ -229,7 +229,7 @@ under the License.
<if-has-permission permission="CATALOG" action="_VIEW"/>
</condition>
<widgets>
<include-menu name="ShippingTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="ShippingTabBar" location="${parameters.mainMenuLocation}"/>
<container>
<label style="h1">${uiLabelMap[labelTitleProperty]}</label>
</container>
Expand Down Expand Up @@ -364,7 +364,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="MainActionMenu" location="${parameters.mainMenuLocation}"/>
</decorator-section>
<decorator-section name="left-column">
<section>
Expand Down Expand Up @@ -397,7 +397,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="MainActionMenu" location="${parameters.mainMenuLocation}"/>
</decorator-section>
<decorator-section name="left-column">
<include-screen name="leftbar"/>
Expand All @@ -408,7 +408,7 @@ under the License.
<if-has-permission permission="CATALOG" action="_VIEW"/>
</condition>
<widgets>
<include-menu name="ImageManagementTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="ImageManagementTabBar" location="${parameters.mainMenuLocation}"/>
<decorator-section-include name="body"/>
</widgets>
<fail-widgets>
Expand Down Expand Up @@ -456,8 +456,8 @@ under the License.
<condition><not><if-empty field="productStore"/></not></condition>
<widgets>
<container>
<include-menu name="ProductStoreTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="ProductStoreSubTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="ProductStoreTabBar" location="${parameters.mainMenuLocation}"/>
<include-menu name="ProductStoreSubTabBar" location="${parameters.mainMenuLocation}"/>
<label style="h1">${uiLabelMap[labelTitleProperty]} ${uiLabelMap.CommonFor}: ${productStore.storeName} [${uiLabelMap.CommonId}:${productStoreId}] ${${extraFunctionName}}</label>
</container>
<include-portal-page id="ProductStoreFacility"/>
Expand Down
4 changes: 2 additions & 2 deletions applications/product/widget/catalog/ConfigScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="MainActionMenu" location="${parameters.mainMenuLocation}"/>
</decorator-section>
<decorator-section name="left-column">
<include-screen name="leftbar" location="component://product/widget/catalog/CommonScreens.xml"/>
Expand All @@ -41,7 +41,7 @@ under the License.
<condition><not><if-empty field="configItemId"/></not></condition>
<widgets>
<container>
<include-menu name="ConfigItemTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="ConfigItemTabBar" location="${parameters.mainMenuLocation}"/>
<label style="h1">${uiLabelMap[labelTitleProperty]} ${uiLabelMap.CommonFor}: ${configItem.configItemName} [${uiLabelMap.CommonId}:${configItemId}] ${${extraFunctionName}}</label>
</container>
<container style="button-bar">
Expand Down
4 changes: 2 additions & 2 deletions applications/product/widget/catalog/FeatureScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="MainActionMenu" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="MainActionMenu" location="${parameters.mainMenuLocation}"/>
</decorator-section>
<decorator-section name="left-column">
<include-screen name="leftbar" location="component://product/widget/catalog/CommonScreens.xml"/>
Expand All @@ -41,7 +41,7 @@
</or>
</condition>
<widgets>
<include-menu name="FeaturesTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
<include-menu name="FeaturesTabBar" location="${parameters.mainMenuLocation}"/>
<container style="button-bar"><link target="CreateProductFeature" text="${uiLabelMap.ProductNewFeatureCategory}" style="buttontext create"/></container>
<decorator-section-include name="body"/>
</widgets>
Expand Down
Loading

0 comments on commit a9a3d13

Please sign in to comment.