svn commit: r830091 - in /ofbiz/trunk/applications/product: config/ProductUiLabels.xml webapp/catalog/find/exportproducts.ftl widget/catalog/FindScreens.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r830091 - in /ofbiz/trunk/applications/product: config/ProductUiLabels.xml webapp/catalog/find/exportproducts.ftl widget/catalog/FindScreens.xml

jleroux@apache.org
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 &gt; 0>,</#if>${productCategoryAndMember.categoryName}<#assign productCategoryCount=productCategoryCount + 1/></#if></#list>    <#list     productExportMap.productFeatures as productFeatureAndAppl><#if productFeatureAndAppl.description?has_content><#if productFeatureCount &gt; 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 &gt; 0>,</#if>${productCategoryAndMember.categoryName}<#assign productCategoryCount=productCategoryCount + 1/></#if></#list>    <#list     productExportMap.productFeatures as productFeatureAndAppl><#if productFeatureAndAppl.description?has_content><#if productFeatureCount &gt; 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>