You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2011/05/29 05:34:51 UTC
svn commit: r1128812 - in /ofbiz/trunk/applications/product/widget/catalog:
CatalogMenus.xml CategoryScreens.xml CommonScreens.xml
Author: hansbak
Date: Sun May 29 03:34:51 2011
New Revision: 1128812
URL: http://svn.apache.org/viewvc?rev=1128812&view=rev
Log:
replace links with menu widget in categegory maintenance and only show buttons where appropriate. add some permissions to catalog
Modified:
ofbiz/trunk/applications/product/widget/catalog/CatalogMenus.xml
ofbiz/trunk/applications/product/widget/catalog/CategoryScreens.xml
ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml
Modified: ofbiz/trunk/applications/product/widget/catalog/CatalogMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/CatalogMenus.xml?rev=1128812&r1=1128811&r2=1128812&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/CatalogMenus.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/CatalogMenus.xml Sun May 29 03:34:51 2011
@@ -75,7 +75,7 @@ under the License.
</menu-item>
<menu-item name="EditCategoryRollup" title="${uiLabelMap.ProductRollup}">
<link target="EditCategoryRollup">
- <parameter param-name="showProductCategoryId" from-field="productCategoryId"/>
+ <parameter param-name="productCategoryId"/>
</link>
</menu-item>
<menu-item name="EditCategoryProducts" title="${uiLabelMap.ProductProducts}">
@@ -110,6 +110,36 @@ under the License.
</menu-item>
</menu>
+ <menu name="CategorySubTabBar" menu-container-style="button-bar button-style-2" default-selected-style="selected">
+ <menu-item name="EditCategory" title="${uiLabelMap.ProductNewCategory}" widget-style="buttontext create">
+ <link target="EditCategory"/>
+ </menu-item>
+ <menu-item name="createProductInCategoryStart" title="${uiLabelMap.ProductCreateProductInCategory}" widget-style="buttontext create">
+ <condition>
+ <not><if-empty field="productCategory"/></not>
+ </condition>
+ <link target="createProductInCategoryStart">
+ <parameter param-name="prodCatalogId"/>
+ </link>
+ </menu-item>
+ <menu-item name="AdvancedSearch" title="${uiLabelMap.ProductSearchInCategory}" widget-style="buttontext search">
+ <condition>
+ <not><if-empty field="productCategory"/></not>
+ </condition>
+ <link target="advancedsearch">
+ <parameter param-name="SEARCH_CATEGORY_ID" from-field="productCategoryId"/>
+ </link>
+ </menu-item>
+ <menu-item name="ProductCategoryPage" title="${uiLabelMap.ProductCategoryPage}" widget-style="buttontext website">
+ <condition>
+ <not><if-empty field="productCategory"/></not>
+ </condition>
+ <link target="/ecommerce/control/category" url-mode="plain">
+ <parameter param-name="category_id" from-field="productCategoryId"/>
+ </link>
+ </menu-item>
+ </menu>
+
<menu name="ProductStoreTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
<menu-item name="EditProductStore" title="${uiLabelMap.ProductStore}">
<link target="EditProductStore">
Modified: ofbiz/trunk/applications/product/widget/catalog/CategoryScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/CategoryScreens.xml?rev=1128812&r1=1128811&r2=1128812&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/CategoryScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/CategoryScreens.xml Sun May 29 03:34:51 2011
@@ -24,50 +24,45 @@ under the License.
<section>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
- <decorator-section name="pre-body">
- <section>
- <!-- do check for CATALOG, _VIEW permission -->
- <condition>
- <and>
- <if-has-permission permission="CATALOG" action="_VIEW"/>
- <not><if-empty field="productCategoryId"/></not>
- </and>
- </condition>
- <widgets>
- <include-menu name="CategoryTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
- </widgets>
- </section>
- </decorator-section>
<decorator-section name="left-column">
<include-screen name="leftbar" location="component://product/widget/catalog/CommonScreens.xml"/>
</decorator-section>
<decorator-section name="body">
<section>
- <!-- do check for CATALOG, _VIEW permission -->
<condition>
- <if-has-permission permission="CATALOG" action="_VIEW"/>
+ <or>
+ <if-has-permission permission="CATALOG" action="_ADMIN"/>
+ <if-has-permission permission="CATALOG" action="_CREATE"/>
+ <if-has-permission permission="CATALOG" action="_UPDATE"/>
+ <if-has-permission permission="CATALOG" action="_VIEW"/>
+ </or>
</condition>
+ <actions>
+ <set field="productCategoryId" from-field="parameters.productCategoryId"/>
+ <entity-one entity-name="ProductCategory" value-field="productCategory"/>
+ </actions>
<widgets>
<section>
- <condition><not><if-empty field="productCategoryId"/></not></condition>
+ <condition>
+ <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"/>
<container>
<label style="h1">${uiLabelMap[labelTitleProperty]} ${uiLabelMap.CommonFor}: ${productCategory.description} [${uiLabelMap.CommonId}:${productCategoryId}] ${${extraFunctionName}}</label>
</container>
-
- <container style="button-bar">
- <link target="EditCategory" text="${uiLabelMap.ProductNewCategory}" style="buttontext create"/>
- <link target="createProductInCategoryStart" text="${uiLabelMap.ProductCreateProductInCategory}" style="buttontext create">
- <parameter param-name="productCategoryId"/>
- </link>
- <link target="advancedsearch" text="${uiLabelMap.ProductSearchInCategory}" style="buttontext search">
- <parameter param-name="SEARCH_CATEGORY_ID" from-field="productCategoryId"/>
- </link>
- <link target="/ecommerce/control/category" url-mode="plain" text="${uiLabelMap.ProductCategoryPage}" style="buttontext website">
- <parameter param-name="category_id" from-field="productCategoryId"/>
- </link>
- </container>
</widgets>
+ <fail-widgets>
+ <section>
+ <condition>
+ <if-compare operator="not-equals" value="EditCategory" field="tabButtonItem"/>
+ </condition>
+ <widgets>
+ <include-menu name="CategorySubTabBar" location="component://product/widget/catalog/CatalogMenus.xml"/>
+ </widgets>
+ </section>
+ </fail-widgets>
</section>
<decorator-section-include name="body"/>
</widgets>
@@ -95,18 +90,6 @@ under the License.
<widgets>
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="menu-bar">
- <container style="button-bar">
- <link target="EditCategory" text="${uiLabelMap.ProductNewCategory}" style="buttontext create"/>
- <link target="createProductInCategoryStart" text="${uiLabelMap.ProductCreateProductInCategory}" style="buttontext create">
- <parameter param-name="productCategoryId"/>
- </link>
- <link target="advancedsearch" text="${uiLabelMap.ProductSearchInCategory}" style="buttontext search">
- <parameter param-name="SEARCH_CATEGORY_ID" from-field="productCategoryId"/>
- </link>
- <link target="/ecommerce/control/category" url-mode="plain" text="${uiLabelMap.ProductCategoryPage}" style="buttontext website">
- <parameter param-name="category_id" from-field="productCategoryId"/>
- </link>
- </container>
</decorator-section>
<decorator-section name="search-options">
<include-form name="FindCategory" location="component://product/widget/catalog/CategoryForms.xml"/>
@@ -241,7 +224,7 @@ under the License.
<set field="headerItem" value="categories"/>
<set field="tabButtonItem" value="EditCategoryRollup"/>
<set field="labelTitleProperty" value="ProductRollup"/>
- <set field="productCategoryId" from-field="parameters.showProductCategoryId"/>
+ <set field="productCategoryId" from-field="parameters.productCategoryId"/>
<entity-condition entity-name="ProductCategoryRollup" list="currentProductCategoryRollups">
<condition-expr field-name="productCategoryId" from-field="productCategoryId"/>
Modified: ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml?rev=1128812&r1=1128811&r2=1128812&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/CommonScreens.xml Sun May 29 03:34:51 2011
@@ -63,6 +63,8 @@ under the License.
<condition>
<or>
<if-has-permission permission="CATALOG" action="_ADMIN"/>
+ <if-has-permission permission="CATALOG" action="_CREATE"/>
+ <if-has-permission permission="CATALOG" action="_UPDATE"/>
<if-has-permission permission="CATALOG" action="_VIEW"/>
</or>
</condition>