svn commit: r533848 - in /ofbiz/trunk/applications: ecommerce/webapp/ecommerce/customer/ ecommerce/widget/ party/webapp/partymgr/party/ party/widget/partymgr/ product/config/

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

svn commit: r533848 - in /ofbiz/trunk/applications: ecommerce/webapp/ecommerce/customer/ ecommerce/widget/ party/webapp/partymgr/party/ party/widget/partymgr/ product/config/

jaz-3
Author: jaz
Date: Mon Apr 30 13:36:02 2007
New Revision: 533848

URL: http://svn.apache.org/viewvc?view=rev&rev=533848
Log:
applied patch from Joe Eckard (Party Serialized Inventory Summary) for JIRA issue OFBIZ-949

Added:
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl   (with props)
    ofbiz/trunk/applications/party/webapp/partymgr/party/SerializedInventorySummary.ftl   (with props)
Modified:
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl
    ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml
    ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl
    ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml
    ofbiz/trunk/applications/product/config/ProductUiLabels.properties

Added: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl?view=auto&rev=533848
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl (added)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl Mon Apr 30 13:36:02 2007
@@ -0,0 +1,62 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<div id="serialized-inventory-summary" class="screenlet">
+    <div class="screenlet-header">
+        <span class="boxhead">${uiLabelMap.ProductSerializedInventorySummary}</span>
+    </div>
+    <div class="screenlet-body">
+        <table id="serialized-inventory" class="basic-table" cellspacing="0" cellpadding="2">
+            <thead>
+                <tr class="header-row">
+                    <td>${uiLabelMap.ProductInventoryItemId}</td>
+                    <td>${uiLabelMap.ProductProductName}</td>
+                    <td>${uiLabelMap.ProductSerialNumber}</td>
+                    <td>${uiLabelMap.ProductSoftIdentifier}</td>
+                    <td>${uiLabelMap.ProductActivationNumber}</td>
+                    <td>${uiLabelMap.ProductActivationNumber} ${uiLabelMap.CommonValidThruDate}</td>
+                </tr>
+            </thead>
+            <tbody>
+                <#list inventoryItemList as inventoryItem>
+                    <#assign product = inventoryItem.getRelatedOne('Product')?if_exists>
+                    <tr>
+                        <td>${inventoryItem.inventoryItemId}</td>
+                        <td>
+                            <#if product?has_content>
+                                <#if product.isVariant?default('N') == 'Y'>
+                                    <#assign product = Static['org.ofbiz.product.product.ProductWorker'].getParentProduct(product.productId, delegator)?if_exists>
+                                </#if>
+                                <#if product?has_content>
+                                    <#assign productName = Static['org.ofbiz.product.product.ProductContentWrapper'].getProductContentAsText(product, 'PRODUCT_NAME', request)?if_exists>
+                                    <a href="<@ofbizUrl>product?product_id=${product.productId}</@ofbizUrl>">${productName?default(product.productId)}</a>
+                                </#if>
+                            </#if>
+                        </td>
+                        <td>${inventoryItem.serialNumber?if_exists}</td>
+                        <td>${inventoryItem.softIdentifier?if_exists}</td>
+                        <td>${inventoryItem.activationNumber?if_exists}</td>
+                        <td>${inventoryItem.activationValidThru?if_exists}</td>
+                    </tr>
+                </#list>
+            </tbody>
+        </table>
+    </div>
+</div>
+

Propchange: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl?view=diff&rev=533848&r1=533847&r2=533848
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl Mon Apr 30 13:36:02 2007
@@ -561,6 +561,9 @@
 
 ${screens.render("component://ecommerce/widget/CustomerScreens.xml#FinAccountList-include")}
 
+<#-- Serialized Inventory Summary -->
+${screens.render('component://ecommerce/widget/CustomerScreens.xml#SerializedInventorySummary')}
+
 <#else>
     <div class="head3">${uiLabelMap.PartyNoPartyForCurrentUserName}: ${userLogin.userLoginId}</div>
 </#if>

Modified: ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml?view=diff&rev=533848&r1=533847&r2=533848
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml Mon Apr 30 13:36:02 2007
@@ -447,4 +447,38 @@
             </widgets>
         </section>
     </screen>
+
+    <screen name="SerializedInventorySummary">
+        <section>
+            <actions>
+                <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+
+                <entity-condition entity-name="InventoryItem" list-name="inventoryItemList">
+                    <condition-list>
+                        <condition-expr field-name="inventoryItemTypeId" operator="equals" value="SERIALIZED_INV_ITEM"/>
+                        <condition-expr field-name="ownerPartyId" operator="equals" env-name="userLogin.partyId"/>
+                    </condition-list>
+                    <order-by field-name="-createdStamp"/>
+                </entity-condition>
+            </actions>
+            <widgets>
+                <section>
+                    <condition>
+                        <not>
+                            <if-empty field-name="inventoryItemList"/>
+                        </not>
+                    </condition>
+                    <widgets>
+                        <platform-specific>
+                            <html>
+                                <html-template location="component://ecommerce/webapp/ecommerce/customer/SerializedInventorySummary.ftl"/>
+                            </html>
+                        </platform-specific>
+                    </widgets>
+                </section>
+            </widgets>
+        </section>
+    </screen>
+
 </screens>

Added: ofbiz/trunk/applications/party/webapp/partymgr/party/SerializedInventorySummary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/SerializedInventorySummary.ftl?view=auto&rev=533848
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/SerializedInventorySummary.ftl (added)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/SerializedInventorySummary.ftl Mon Apr 30 13:36:02 2007
@@ -0,0 +1,62 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<div id="serialized-inventory-summary" class="screenlet">
+    <div class="screenlet-header">
+        <span class="boxhead">${uiLabelMap.ProductSerializedInventorySummary}</span>
+    </div>
+    <div class="screenlet-body">
+        <table id="serialized-inventory" class="basic-table" cellspacing="0" cellpadding="2">
+            <thead>
+                <tr class="header-row">
+                    <td>${uiLabelMap.ProductInventoryItemId}</td>
+                    <td>${uiLabelMap.ProductProductName}</td>
+                    <td>${uiLabelMap.ProductSerialNumber}</td>
+                    <td>${uiLabelMap.ProductSoftIdentifier}</td>
+                    <td>${uiLabelMap.ProductActivationNumber}</td>
+                    <td>${uiLabelMap.ProductActivationNumber} ${uiLabelMap.CommonValidThruDate}</td>
+                </tr>
+            </thead>
+            <tbody>
+                <#list inventoryItemList as inventoryItem>
+                    <#assign product = inventoryItem.getRelatedOne('Product')?if_exists>
+                    <tr>
+                        <td>${inventoryItem.inventoryItemId}</td>
+                        <td>
+                            <#if product?has_content>
+                                <#if product.isVariant?default('N') == 'Y'>
+                                    <#assign product = Static['org.ofbiz.product.product.ProductWorker'].getParentProduct(product.productId, delegator)?if_exists>
+                                </#if>
+                                <#if product?has_content>
+                                    <#assign productName = Static['org.ofbiz.product.product.ProductContentWrapper'].getProductContentAsText(product, 'PRODUCT_NAME', request)?if_exists>
+                                    <a href="/catalog/control/EditProduct?productId=${product.productId}&externalLoginKey=${requestAttributes.externalLoginKey?if_exists}">${productName?default(product.productId)}</a>
+                                </#if>
+                            </#if>
+                        </td>
+                        <td>${inventoryItem.serialNumber?if_exists}</td>
+                        <td>${inventoryItem.softIdentifier?if_exists}</td>
+                        <td>${inventoryItem.activationNumber?if_exists}</td>
+                        <td>${inventoryItem.activationValidThru?if_exists}</td>
+                    </tr>
+                </#list>
+            </tbody>
+        </table>
+    </div>
+</div>
+

Propchange: ofbiz/trunk/applications/party/webapp/partymgr/party/SerializedInventorySummary.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/party/webapp/partymgr/party/SerializedInventorySummary.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/party/webapp/partymgr/party/SerializedInventorySummary.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl?view=diff&rev=533848&r1=533847&r2=533848
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl Mon Apr 30 13:36:02 2007
@@ -667,6 +667,9 @@
     </div>
   </div>
 
+  <#-- Serialized Inventory Summary -->
+  ${screens.render('component://party/widget/partymgr/PartyScreens.xml#SerializedInventorySummary')}
+
 <#else>
   ${uiLabelMap.PartyNoPartyFoundWithPartyId}: ${parameters.partyId?if_exists}
 </#if>

Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml?view=diff&rev=533848&r1=533847&r2=533848
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Mon Apr 30 13:36:02 2007
@@ -770,5 +770,38 @@
         </section>
     </screen>
 
+    <screen name="SerializedInventorySummary">
+        <section>
+            <actions>
+                <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+
+                <entity-condition entity-name="InventoryItem" list-name="inventoryItemList">
+                    <condition-list>
+                        <condition-expr field-name="inventoryItemTypeId" operator="equals" value="SERIALIZED_INV_ITEM"/>
+                        <condition-expr field-name="ownerPartyId" operator="equals" env-name="parameters.partyId"/>
+                    </condition-list>
+                    <order-by field-name="-createdStamp"/>
+                </entity-condition>
+            </actions>
+            <widgets>
+                <section>
+                    <condition>
+                        <not>
+                            <if-empty field-name="inventoryItemList"/>
+                        </not>
+                    </condition>
+                    <widgets>
+                        <platform-specific>
+                            <html>
+                                <html-template location="component://party/webapp/partymgr/party/SerializedInventorySummary.ftl"/>
+                            </html>
+                        </platform-specific>
+                    </widgets>
+                </section>
+            </widgets>
+        </section>
+    </screen>
+
 </screens>
 

Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.properties?view=diff&rev=533848&r1=533847&r2=533848
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.properties (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.properties Mon Apr 30 13:36:02 2007
@@ -1188,6 +1188,7 @@
 ProductSerialAtpQoh=Serial# or ATP/QOH
 ProductSerialNumber=Serial Number
 ProductSerializedInventoryFound=Serialized Inventory Found
+ProductSerializedInventorySummary=Serialized Inventory Summary
 ProductServerDirectory=ServerDirectory
 ProductServerFileName=Server file name
 ProductServiceConfig=Service Config