svn commit: r534160 - in /ofbiz/trunk/applications: ecommerce/webapp/ecommerce/customer/ ecommerce/widget/ party/webapp/partymgr/party/ party/widget/partymgr/

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

svn commit: r534160 - in /ofbiz/trunk/applications: ecommerce/webapp/ecommerce/customer/ ecommerce/widget/ party/webapp/partymgr/party/ party/widget/partymgr/

jaz-3
Author: jaz
Date: Tue May  1 10:04:08 2007
New Revision: 534160

URL: http://svn.apache.org/viewvc?view=rev&rev=534160
Log:
added patch from Joe Eckard for JIRA issue OFBIZ-951 (subscription summary display)

Added:
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/SubscriptionSummary.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

Added: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/SubscriptionSummary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/SubscriptionSummary.ftl?view=auto&rev=534160
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/SubscriptionSummary.ftl (added)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/SubscriptionSummary.ftl Tue May  1 10:04:08 2007
@@ -0,0 +1,61 @@
+<#--
+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="subscription-summary" class="screenlet">
+    <div class="screenlet-header">
+        <span class="boxhead">${uiLabelMap.ProductSubscriptions}</span>
+    </div>
+    <div class="screenlet-body">
+        <table width="100%" cellspacing="0" cellpadding="2">
+            <thead>
+                <tr class="header-row">
+                    <td><div class="tableheadtext">${uiLabelMap.ProductSubscription} ${uiLabelMap.CommonId}</div></td>
+                    <td><div class="tableheadtext">${uiLabelMap.ProductSubscription} ${uiLabelMap.CommonType}</div></td>
+                    <td><div class="tableheadtext">${uiLabelMap.CommonDescription}</div></td>
+                    <td><div class="tableheadtext">${uiLabelMap.ProductProductName}</div></td>
+                    <td><div class="tableheadtext">${uiLabelMap.CommonFromDate}</div></td>
+                    <td><div class="tableheadtext">${uiLabelMap.CommonThruDate}</div></td>
+                </tr>
+                <tr><td colspan="6"><hr class="sepbar"/></td></tr>
+            </thead>
+            <tbody>
+                <#list subscriptionList as subscription>
+                    <tr>
+                        <td>${subscription.subscriptionId}</td>
+                        <td>
+                            <#assign subscriptionType = subscription.getRelatedOne('SubscriptionType')?if_exists>
+                            ${(subscriptionType.description)?default(subscription.subscriptionTypeId?default('N/A'))}
+                        </td>
+                        <td>${subscription.description?if_exists}</td>
+                        <td>
+                            <#assign product = subscription.getRelatedOne('Product')?if_exists>
+                            <#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>" class="linktext">${productName?default(product.productId)}</a>
+                            </#if>
+                        </td>
+                        <td>${subscription.fromDate?if_exists}</td>
+                        <td>${subscription.thruDate?if_exists}</td>
+                    </tr>
+                </#list>
+            </tbody>
+        </table>
+    </div>
+</div>
+

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

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

Propchange: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/SubscriptionSummary.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=534160&r1=534159&r2=534160
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/viewprofile.ftl Tue May  1 10:04:08 2007
@@ -564,6 +564,9 @@
 <#-- Serialized Inventory Summary -->
 ${screens.render('component://ecommerce/widget/CustomerScreens.xml#SerializedInventorySummary')}
 
+<#-- Subscription Summary -->
+${screens.render('component://ecommerce/widget/CustomerScreens.xml#SubscriptionSummary')}
+
 <#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=534160&r1=534159&r2=534160
==============================================================================
--- ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml (original)
+++ ofbiz/trunk/applications/ecommerce/widget/CustomerScreens.xml Tue May  1 10:04:08 2007
@@ -481,4 +481,36 @@
         </section>
     </screen>
 
+    <screen name="SubscriptionSummary">
+        <section>
+            <actions>
+                <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+
+                <entity-condition entity-name="Subscription" list-name="subscriptionList" filter-by-date="true">
+                    <condition-list>
+                        <condition-expr field-name="partyId" operator="equals" env-name="userLogin.partyId"/>
+                    </condition-list>
+                    <order-by field-name="-fromDate"/>
+                </entity-condition>
+            </actions>
+            <widgets>
+                <section>
+                    <condition>
+                        <not>
+                            <if-empty field-name="subscriptionList"/>
+                        </not>
+                    </condition>
+                    <widgets>
+                        <platform-specific>
+                            <html>
+                                <html-template location="component://ecommerce/webapp/ecommerce/customer/SubscriptionSummary.ftl"/>
+                            </html>
+                        </platform-specific>
+                    </widgets>
+                </section>
+            </widgets>
+        </section>
+    </screen>
+
 </screens>

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=534160&r1=534159&r2=534160
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/viewprofile.ftl Tue May  1 10:04:08 2007
@@ -670,6 +670,9 @@
   <#-- Serialized Inventory Summary -->
   ${screens.render('component://party/widget/partymgr/PartyScreens.xml#SerializedInventorySummary')}
 
+  <#-- Subscription Summary -->
+  ${screens.render('component://party/widget/partymgr/PartyScreens.xml#SubscriptionSummary')}
+
 <#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=534160&r1=534159&r2=534160
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Tue May  1 10:04:08 2007
@@ -805,5 +805,70 @@
         </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>
+
+    <screen name="SubscriptionSummary">
+        <section>
+            <actions>
+                <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+
+                <entity-condition entity-name="Subscription" list-name="subscriptionList" filter-by-date="true">
+                    <condition-list>
+                        <condition-expr field-name="partyId" operator="equals" env-name="parameters.partyId"/>
+                    </condition-list>
+                    <order-by field-name="-fromDate"/>
+                </entity-condition>
+            </actions>
+            <widgets>
+                <section>
+                    <condition>
+                        <not>
+                            <if-empty field-name="subscriptionList"/>
+                        </not>
+                    </condition>
+                    <widgets>
+                        <platform-specific>
+                            <html>
+                                <html-template location="component://party/webapp/partymgr/party/SubscriptionSummary.ftl"/>
+                            </html>
+                        </platform-specific>
+                    </widgets>
+                </section>
+            </widgets>
+        </section>
+    </screen>
+
 </screens>