Author: jleroux
Date: Tue Oct 27 08:29:12 2009 New Revision: 830091 URL: http://svn.apache.org/viewvc?rev=830091&view=rev Log: Better behavior in case of error (nothing to export from product search list) Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml ofbiz/trunk/applications/product/webapp/catalog/find/exportproducts.ftl ofbiz/trunk/applications/product/widget/catalog/FindScreens.xml Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=830091&r1=830090&r2=830091&view=diff ============================================================================== --- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original) +++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Tue Oct 27 08:29:12 2009 @@ -10226,6 +10226,10 @@ <value xml:lang="th">ERROR: à¸à¸´à¸à¸à¸¥à¸²à¸ ! à¹à¸¡à¹à¸à¸à¸ªà¸´à¸à¸à¹à¸²</value> <value xml:lang="zh">é误ï¼æ²¡ææ¾å°äº§å</value> </property> + <property key="ProductErrorNothingToExport"> + <value xml:lang="en">ERROR: Nothing To Export</value> + <value xml:lang="fr">ERREUR : rien à exporter</value> + </property> <property key="ProductErrorShipmentNotPurchaseShipment"> <value xml:lang="de">Lieferung ${shipmentId} ist keine Einkaufslieferung</value> <value xml:lang="en">Shipment ${shipmentId} is not a Purchase Shipment</value> Modified: ofbiz/trunk/applications/product/webapp/catalog/find/exportproducts.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/find/exportproducts.ftl?rev=830091&r1=830090&r2=830091&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/find/exportproducts.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/find/exportproducts.ftl Tue Oct 27 08:29:12 2009 @@ -15,6 +15,11 @@ KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ---><#list productExportList as productExportMap><#assign productCategoryCount=0/><#assign productFeatureCount=0/> -${productExportMap.productId} <#if productExportMap.productFeatureCustom?has_content>${productExportMap.productFeatureCustom.description?if_exists}</#if> <#list productExportMap.productCategories as productCategoryAndMember><#if productCategoryAndMember.categoryName?has_content><#if productCategoryCount > 0>,</#if>${productCategoryAndMember.categoryName}<#assign productCategoryCount=productCategoryCount + 1/></#if></#list> <#list productExportMap.productFeatures as productFeatureAndAppl><#if productFeatureAndAppl.description?has_content><#if productFeatureCount > 0>,</#if>${productFeatureAndAppl.description}<#assign productFeatureCount=productFeatureCount + 1/></#if></#list> -</#list> \ No newline at end of file +--> +<#if productExportList?has_content> + <#list productExportList as productExportMap><#assign productCategoryCount=0/><#assign productFeatureCount=0/> + ${productExportMap.productId} <#if productExportMap.productFeatureCustom?has_content>${productExportMap.productFeatureCustom.description?if_exists}</#if> <#list productExportMap.productCategories as productCategoryAndMember><#if productCategoryAndMember.categoryName?has_content><#if productCategoryCount > 0>,</#if>${productCategoryAndMember.categoryName}<#assign productCategoryCount=productCategoryCount + 1/></#if></#list> <#list productExportMap.productFeatures as productFeatureAndAppl><#if productFeatureAndAppl.description?has_content><#if productFeatureCount > 0>,</#if>${productFeatureAndAppl.description}<#assign productFeatureCount=productFeatureCount + 1/></#if></#list> + </#list> +<#else> + ${uiLabelMap.ProductErrorNothingToExport} +</#if> \ No newline at end of file Modified: ofbiz/trunk/applications/product/widget/catalog/FindScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/FindScreens.xml?rev=830091&r1=830090&r2=830091&view=diff ============================================================================== --- ofbiz/trunk/applications/product/widget/catalog/FindScreens.xml (original) +++ ofbiz/trunk/applications/product/widget/catalog/FindScreens.xml Tue Oct 27 08:29:12 2009 @@ -100,9 +100,13 @@ <set field="productExportList" from-field="parameters.productExportList"/> </actions> <widgets> - <platform-specific> - <html><html-template location="component://product/webapp/catalog/find/exportproducts.ftl"/></html> - </platform-specific> + <decorator-screen name="CommonFindDecorator"> + <decorator-section name="body"> + <platform-specific> + <html><html-template location="component://product/webapp/catalog/find/exportproducts.ftl"/></html> + </platform-specific> + </decorator-section> + </decorator-screen> </widgets> </section> </screen> |
Free forum by Nabble | Edit this page |