You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by er...@apache.org on 2012/10/30 22:19:34 UTC

svn commit: r1403874 [4/7] - in /ofbiz/branches/20120329_portletWidget: applications/content/data/ applications/party/config/ applications/party/data/ applications/party/data/helpdata/EN/ applications/party/data/helpdata/FR/ applications/party/entityde...

Added: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPartyPaymentMethods.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPartyPaymentMethods.groovy?rev=1403874&view=auto
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPartyPaymentMethods.groovy (added)
+++ ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPartyPaymentMethods.groovy Tue Oct 30 21:19:31 2012
@@ -0,0 +1,173 @@
+/*
+ * 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.
+ */
+
+import org.ofbiz.accounting.payment.PaymentWorker;
+import org.ofbiz.accounting.payment.BillingAccountWorker;
+import org.ofbiz.party.contact.ContactHelper;
+import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilValidate;
+import javolution.util.FastList;
+import javolution.util.FastMap;
+import org.ofbiz.base.util.Debug;
+
+partyId = parameters.partyId ?: userLogin.partyId;
+showOld = "true".equals(parameters.SHOW_OLD);
+
+currencyUomId = null;
+paymentInfos = FastList.newInstance();
+paymentInfoList = FastList.newInstance();
+if (partyId) {
+    //Retrieve Billing Account
+    billingAccountAndRoles = delegator.findByAnd("BillingAccountAndRole", [partyId : partyId, thruDate : null]);
+    for (billingAccountAndRole in billingAccountAndRoles) {
+        currencyUomId = billingAccountAndRole.accountCurrencyUomId;
+        if (currencyUomId) billingAccountList = BillingAccountWorker.makePartyBillingAccountList(userLogin, currencyUomId, partyId, delegator, dispatcher);
+        for (billingAccount in billingAccountList) {
+            if (paymentInfoList.contains(billingAccount) == false) {
+                paymentInfoList.addAll(billingAccount);
+            }
+        }
+    }
+
+    //Add payment methods
+    paymentMethodList = PaymentWorker.getPartyPaymentMethodValueMaps(delegator, partyId, showOld);
+    if (UtilValidate.isNotEmpty(paymentMethodList)) {
+        paymentInfoList.addAll(paymentMethodList);
+    }
+
+    //Then create a description string for each information
+    for (paymentInfo in paymentInfoList) {
+        value = FastMap.newInstance();
+        //Billing Account
+        if (UtilValidate.isNotEmpty(paymentInfo.billingAccountId)) {
+            //Retrieve uom abbr
+            uomAbbr = "";
+            if (paymentInfo.accountCurrencyUomId) {
+                GenericValue uom = delegator.findByPrimaryKey("Uom",[uomId:paymentInfo.accountCurrencyUomId]);
+                if (UtilValidate.isNotEmpty(uom)) {
+                    uomAbbr = uom.get("abbreviation",locale);
+                }
+            }
+
+            //Create description for display
+            description = paymentInfo.billingAccountId
+            if (paymentInfo.description)    description += " (" + paymentInfo.description+")";
+            if (paymentInfo.accountLimit)   description += " (" + uiLabelMap.AccountingAccountLimit + " "+paymentInfo.accountLimit+" "+uomAbbr+")";
+            if (paymentInfo.accountBalance) description += " (" + uiLabelMap.AccountingBillingAvailableBalance +" "+ paymentInfo.accountBalance+" "+uomAbbr+")";
+            if (paymentInfo.fromDate)       description += " (" + uiLabelMap.CommonUpdated +" : "+ paymentInfo.fromDate+")";
+            if (paymentInfo.thruDate)       description += " (" + uiLabelMap.PartyContactEffectiveThru +" : " +paymentInfo.thruDate+")";
+
+            value = UtilMisc.toMap("billingAccountId",paymentInfo.billingAccountId,"type", uiLabelMap.AccountingBilling,"description",description);
+
+        } else if (UtilValidate.isNotEmpty(paymentInfo.paymentMethod)) {
+            paymentMethod = paymentInfo.paymentMethod;
+            
+            //Retrieve payment method type
+            type = paymentMethod.paymentMethodTypeId;
+            paymentMethodType = paymentMethod.getRelatedOne("PaymentMethodType");
+            if (UtilValidate.isNotEmpty(paymentMethodType)) {
+                type = paymentMethodType.get("description",locale);
+            }
+
+            //Create description for display
+            description = "";
+
+            if ("CREDIT_CARD".equals(paymentMethod.paymentMethodTypeId)) {
+                //Credit Card
+                creditCard = paymentMethod.getRelatedOne("CreditCard");
+                if (UtilValidate.isNotEmpty(creditCard)) {
+                    if (creditCard.companyNameOnCard) description += " "+ creditCard.companyNameOnCard;
+                    if (creditCard.titleOnCard)       description += " - "+ creditCard.titleOnCard;
+                    if (creditCard.firstNameOnCard)   description += " " + creditCard.firstNameOnCard;
+                    if (creditCard.middleNameOnCard)  description += " " + creditCard.middleNameOnCard;
+                    if (creditCard.suffixOnCard)      description += " " + creditCard.suffixOnCard;
+                    if (security.hasEntityPermission("PAY_INFO", "_VIEW", session)) {
+                        if (creditCard.cardType)   description += " " + creditCard.cardType;
+                        cardNumber = creditCard.cardNumber;
+                        if (UtilValidate.isNotEmpty(cardNumber)) {
+                            cardNumberDisplay = "";
+                            size = cardNumber.size() - 4;
+                            if (size >0) {
+                                for (int i = 0; i < size-1; i++) {
+                                    cardNumberDisplay += "*";
+                                }
+                                cardNumberDisplay += cardNumber[size .. size + 3];
+                                description += " " + cardNumberDisplay;
+                            }
+                        }
+                        if (creditCard.expireDate)      description += " " + creditCard.expireDate;
+                    } else {
+                        description += ContactHelper.formatCreditCard(creditCard);
+                    }
+                }
+
+            } else if ("GIFT_CARD".equals(paymentMethod.paymentMethodTypeId)) {
+                //Gift Card
+                giftCard = paymentMethod.getRelatedOne("GiftCard");
+                if (UtilValidate.isNotEmpty(giftCard)) {
+                    if (security.hasEntityPermission("PAY_INFO", "_VIEW", session)) {
+                        cardNumber = giftCard.cardNumber;
+                        pinNumber = giftCard.pinNumber;
+                        if (UtilValidate.isEmpty(cardNumber)) cardNumber = "N/A";
+                        if (UtilValidate.isEmpty(pinNumber))  pinNumber  = "N/A";
+
+                        description += " "+ cardNumber + " [" + pinNumber +"]";
+                    } else {
+                        //Hide card number
+                        if (UtilValidate.isNotEmpty(giftCard.cardNumber)) {
+                            cardNumberDisplay = "";
+                            cardNumber = giftCard.cardNumber;
+                            size = cardNumber.size() - 4;
+                            if (size >0) {
+                                for (int i = 0; i < size-1; i++) {
+                                    cardNumberDisplay += "*";
+                                }
+                                cardNumberDisplay += cardNumber[size .. size + 3];
+                                description += cardNumberDisplay;
+                            }
+                        } else {
+                            description += "N/A";
+                        }
+                    }
+                }
+
+            } else if ("EFT_ACCOUNT".equals(paymentMethod.paymentMethodTypeId)) {
+                //Eft Account
+                eftAccount = paymentMethod.getRelatedOne("EftAccount");
+                if (UtilValidate.isNotEmpty(eftAccount)) {
+                    if (eftAccount.nameOnAccount)    description += " "+ eftAccount.nameOnAccount;
+                    if (eftAccount.bankName)         description += " - "+ uiLabelMap.PartyBank +" : "+ eftAccount.bankName;
+                    if (eftAccount.accountNumber)    description += " "+ uiLabelMap.PartyAccount +" : "+ eftAccount.accountNumber;
+                }
+            }
+            if (paymentMethod.description) description += " ("+ paymentMethod.description +")";
+            if (paymentMethod.glAccountId) description += " ("+ uiLabelMap.CommonFor +" "+ paymentMethod.glAccountId+")";
+            if (paymentMethod.fromDate)    description += " ("+ uiLabelMap.CommonUpdated +" : "+ paymentMethod.fromDate+")";
+            if (paymentMethod.thruDate)    {
+                description += " ("+ uiLabelMap.PartyContactEffectiveThru +" : "+ paymentMethod.thruDate+")";
+                value = UtilMisc.toMap("paymentMethodId",paymentMethod.paymentMethodId,"type", type,"description", description);
+            } else  value = UtilMisc.toMap("paymentMethodId",paymentMethod.paymentMethodId,"type", type,"description", description, "activeEdit", "Y");
+        }
+        paymentInfos.add(value);
+    }
+}
+context.paymentInfos = paymentInfos;
+context.showOld = showOld;
+context.partyId = partyId;

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPartyPaymentMethods.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPartyPaymentMethods.groovy
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/actions/party/GetPartyPaymentMethods.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/controller-portlet-party.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/controller-portlet-party.xml?rev=1403874&view=auto
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/controller-portlet-party.xml (added)
+++ ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/controller-portlet-party.xml Tue Oct 30 21:19:31 2012
@@ -0,0 +1,442 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+
+<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd">
+    <!-- The controller elements that are common to all OFBiz components
+         can be found in the following xml file. A component can override the
+         elements found in the common-controller.xml file. -->
+
+    <description>Party portlets common Component Site Configuration File</description>
+
+    <!-- Request Mappings -->
+
+    <request-map uri="ShowPartyDetail"><security https="true" auth="true"/><response name="success" type="view" value="ShowPartyDetail"/></request-map>
+    <request-map uri="EditPersonPt"><security https="true" auth="true"/><response name="success" type="view" value="EditPersonPt"/></request-map>
+    <request-map uri="updatePersonJson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="updatePerson"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+
+    <request-map uri="EditPartyGroupPt"><security https="true" auth="true"/><response name="success" type="view" value="EditPartyGroupPt"/></request-map>
+    <request-map uri="updatePartyGroupJson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="updatePartyGroup"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+
+    <!-- userLogin request -->
+    <request-map uri="editPartyUserLoginPt"><security https="true" auth="true"/><response name="success" type="view" value="EditPartyUserLoginPt"/></request-map>
+    <request-map uri="createPartyUserLoginPt"><security https="true" auth="true"/><response name="success" type="view" value="CreatePartyUserLoginPt"/></request-map>
+    <request-map uri="editUserLoginPasswordPt"><security https="true" auth="true"/><response name="success" type="view" value="EditUserLoginPasswordPt"/></request-map>
+    <request-map uri="addUserLoginSecurityGroupPt"><security https="true" auth="true"/><response name="success" type="view" value="AddUserLoginSecurityGroupPt"/></request-map>
+    <request-map uri="updateUserLoginPasswordJson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="updatePassword"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updateUserLoginSecurityJson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="updateUserLoginSecurity"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="createUserLoginJson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="createUserLogin"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="enableUserLoginPt">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="updateUserLoginSecurity"/>
+        <response name="success" type="view" value="showPortlet"/>
+        <response name="error" type="view" value="showPortlet"/>
+    </request-map>
+    <request-map uri="disableUserLoginPt">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="updateUserLoginSecurity"/>
+        <response name="success" type="view" value="showPortlet"/>
+        <response name="error" type="view" value="showPortlet"/>
+    </request-map>
+    <request-map uri="createUserLoginAndSecurityGroupJson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="createUserLoginAndSecurityGroup"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="addUserLoginToSecurityGroupJson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="addUserLoginToSecurityGroup"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updateUserLoginToSecurityGroupJson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="updateUserLoginToSecurityGroup"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="removeUserLoginFromSecurityGroupJson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="removeUserLoginFromSecurityGroup"/>
+        <response name="success" type="view" value="showPortlet"/>
+        <response name="error" type="view" value="showPortlet"/>
+    </request-map>
+
+    <!-- contactMech request -->
+    <request-map uri="editContactMechMgmt"><security https="true" auth="true"/><response name="success" type="view" value="editContactMechMgmt"/></request-map>
+    <request-map uri="listContactMechMgmt"><security https="true" auth="true"/><response name="success" type="view" value="listContactMechMgmt"/></request-map>
+
+    <request-map uri="createTelecomNumberEntity">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createGivenTelecomNumber"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updateTelecomNumberEntity">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateGivenTelecomNumber"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="createContactMechEntity">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createContactMechEntity"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updateContactMechEntity">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateContactMechEntity"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="createEmailAddressEntity">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createGivenEmailAddress"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updateEmailAddressEntity">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateGivenEmailAddress"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="createPostalAddressEntity">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createGivenPostalAddress"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="createPostalAddressAndPurposeEntity">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createGivenPostalAddress"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updatePostalAddressEntity">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateGivenPostalAddress"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="deleteGivenContactMech">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deleteGivenContactMech"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updateGivenContactMech"><security https="true" auth="true"/>
+        <event type="service" invoke="updateGivenContactMech"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="removeGivenContactMech"><security https="true" auth="true"/>
+        <event type="service" invoke="removeGivenContactMech"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="createGivenContactMechPurpose">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createGivenContactMechPurpose"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updateGivenContactMechPurpose">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateGivenContactMechPurpose"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="deleteGivenContactMechPurpose">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deleteGivenContactMechPurpose"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="removeGivenContactMechPurpose">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="removeGivenContactMechPurpose"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+
+    <!-- Party relationship  -->
+    <request-map uri="EditPartyRelationshipPt"><security auth="true" https="true"/><response name="success" type="view" value="EditPartyRelationship"/></request-map>
+    <request-map uri="createRelationJson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="createPartyRelationship"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updateRelationJson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="updatePartyRelationship"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="deleteRelationJson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="deletePartyRelationship"/>
+        <response name="success" type="request" value="showPortlet"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+
+    <request-map uri="AddPartyRoles"><security https="true" auth="true"/><response name="success" type="view" value="AddPartyRoles"/></request-map>
+    <request-map uri="AddSecondaryPartyRole"><security https="true" auth="true"/><response name="success" type="view" value="AddSecondaryPartyRole"/></request-map>
+    <request-map uri="DeletePartyRolePt">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deletePartyRole"/>
+        <response name="success" type="request" value="showPortlet"/>
+        <response name="error" type="request" value="showPortlet"/>
+    </request-map>
+    <request-map uri="AddPartyRoleJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createPartyRole"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+
+    <request-map uri="editPartyBillingAccountPt"><security https="true" auth="true"/><response name="success" type="view" value="EditPartyBillingAccount"/></request-map>
+    <request-map uri="editPartyPaymentMethodPt"><security https="true" auth="true"/><response name="success" type="view" value="EditPartyPaymentMethod"/></request-map>
+
+    <request-map uri="createBillingAccountJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createBillingAccount"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updateBillingAccountJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateBillingAccount"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="deleteBillingAccountPt">
+        <security https="true" auth="true"/>
+        <event type="simple" path="component://party/script/org/ofbiz/party/party/PartySimpleMethods.xml" invoke="deleteBillingAccount"/>
+        <response name="success" type="view" value="showPortlet"/>
+        <response name="error" type="view" value="showPortlet"/>
+    </request-map>
+    <request-map uri="createBillingAccountTermJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createBillingAccountTerm"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updateBillingAccountTermJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateBillingAccountTerm"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="removeBillingAccountTermPt">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="removeBillingAccountTerm"/>
+        <response name="success" type="view" value="showPortlet"/>
+        <response name="error" type="view" value="showPortlet"/>
+    </request-map>
+
+   <request-map uri="createCreditCardJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createCreditCard"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updateCreditCardJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateCreditCard"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="createEftAccountJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createEftAccount"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updateEftAccountJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateEftAccount"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="createGiftCardJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createGiftCard"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updateGiftCardJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateGiftCard"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="createPaymentMethodJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createPaymentMethod"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updatePaymentMethodJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updatePaymentMethod"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="deletePaymentMethodPt">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deletePaymentMethod"/>
+        <response name="success" type="view" value="showPortlet"/>
+        <response name="error" type="view" value="showPortlet"/>
+    </request-map>
+
+
+    <request-map uri="EditPartyNotePt"><security https="true" auth="true"/><response name="success" type="view" value="EditPartyNotePt"/></request-map>
+    <request-map uri="AssocPartyNotePt"><security https="true" auth="true"/><response name="success" type="view" value="AssocPartyNotePt"/></request-map>
+    <request-map uri="createPartyNoteJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createPartyNote"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+
+    <request-map uri="updatePartyNoteJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updateNote"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+
+    <request-map uri="editPartyAttributePt">
+      <security https="true" auth="true"/>
+      <response name="success" type="view" value="editPartyAttributePt"/>
+    </request-map>
+    <request-map uri="createPartyAttributeJson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="createPartyAttribute"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updatePartyAttributeJson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="updatePartyAttribute"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="removePartyAttributeJson">
+        <security https="true" auth="true"/>
+        <event type="service" path="" invoke="removePartyAttribute" />
+        <response name="success" type="request" value="showPortlet"/>
+        <response name="error"   type="request" value="json"/>
+    </request-map>
+
+    <request-map uri="updateAvsOverrideJson">
+        <security https="true" auth="true"/>
+        <event type="simple" path="component://party/script/org/ofbiz/party/party/PartySimpleMethods.xml" invoke="updateAVSOverride"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="resetAvsOverrideJson">
+        <security https="true" auth="true"/>
+        <event type="simple" path="component://party/script/org/ofbiz/party/party/PartySimpleMethods.xml" invoke="deleteAVSOverride"/>
+        <response name="success" type="request" value="showPortlet"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+
+    <request-map uri="visitdetailPt"><security https="true" auth="true"/><response name="success" type="view" value="visitdetailPt"/></request-map>
+
+    <request-map uri="editPartyIdentificationPt"><security https="true" auth="true"/><response name="success" type="view" value="EditPartyIdentificationPt"/></request-map>
+    <request-map uri="createPartyIdentificationJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createPartyIdentification"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="updatePartyIdentificationJson">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="updatePartyIdentification"/>
+        <response name="success" type="request" value="json"/>
+        <response name="error" type="request" value="json"/>
+    </request-map>
+    <request-map uri="deletePartyIdentificationPt">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deletePartyIdentification"/>
+        <response name="success" type="view" value="showPortlet"/>
+        <response name="error" type="view" value="showPortlet"/>
+    </request-map>
+
+
+    <!-- end of request mappings -->
+
+    <!-- View Mappings -->
+    <view-map name="ShowPartyDetail" type="screen" page="component://party/widget/ProfileScreens.xml#ShowPartyDetail"/>
+    <view-map name="EditPersonPt" type="screen" page="component://party/widget/ProfileScreens.xml#EditPerson"/>
+    <view-map name="EditPartyGroupPt" type="screen" page="component://party/widget/ProfileScreens.xml#EditPartyGroup"/>
+    <view-map name="EditPartyProfileDefault" type="screen" page="component://party/widget/partymgr/portlet/party/PartyScreens.xml#EditPartyProfileDefault"/>
+    <view-map name="EditPartyUserLoginPt" type="screen" page="component://party/widget/ProfileScreens.xml#EditPartyUserLogin"/>
+    <view-map name="CreatePartyUserLoginPt" type="screen" page="component://party/widget/ProfileScreens.xml#CreatePartyUserLogin"/>
+    <view-map name="EditUserLoginPasswordPt" type="screen" page="component://party/widget/ProfileScreens.xml#EditUserLoginPassword"/>
+    <view-map name="AddUserLoginSecurityGroupPt" type="screen" page="component://party/widget/ProfileScreens.xml#AddUserLoginSecurityGroup"/>
+    <view-map name="editContactMechMgmt" page="component://party/widget/ProfileScreens.xml#EditContactMechMgmt" type="screen"/>
+    <view-map name="listContactMechMgmt" page="component://party/widget/ProfileScreens.xml#ListContactMechMgmt" type="screen"/>
+
+    <view-map name="EditPartyRelationship" type="screen" page="component://party/widget/ProfileScreens.xml#EditPartyRelationship"/>
+    <view-map name="AddPartyRoles" type="screen" page="component://party/widget/ProfileScreens.xml#AddPartyRoles"/>
+    <view-map name="AddSecondaryPartyRole" type="screen" page="component://party/widget/ProfileScreens.xml#AddSecondaryPartyRole" />
+    <view-map name="EditPartyBillingAccount" type="screen" page="component://party/widget/ProfileScreens.xml#EditPartyBillingAccount"/>
+
+    <view-map name="EditPartyPaymentMethod"  type="screen" page="component://party/widget/ProfileScreens.xml#EditPartyPaymentMethod"/>
+
+    <view-map name="EditPartyNotePt" type="screen" page="component://party/widget/ProfileScreens.xml#EditPartyNote"/>
+    <view-map name="AssocPartyNotePt" type="screen" page="component://party/widget/ProfileScreens.xml#AssocPartyNote"/>
+    <view-map name="editPartyAttributePt" type="screen" page="component://party/widget/ProfileScreens.xml#EditPartyAttribute"/>
+    <view-map name="editavsoverridePt"    type="screen" page="component://party/widget/ProfileScreens.xml#editavsoverride"/>
+    <view-map name="visitdetailPt"        type="screen" page="component://party/widget/VisitScreens.xml#visitdetail"/>
+    <view-map name="EditPartyIdentificationPt" type="screen" page="component://party/widget/ProfileScreens.xml#EditPartyIdentification"/>
+   <!-- end of view mappings -->
+</site-conf>

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/controller-portlet-party.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/controller-portlet-party.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/controller-portlet-party.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/controller.xml?rev=1403874&r1=1403873&r2=1403874&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/controller.xml (original)
+++ ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/WEB-INF/controller.xml Tue Oct 30 21:19:31 2012
@@ -22,8 +22,10 @@ under the License.
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd">
     <include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
     <include location="component://common/webcommon/WEB-INF/security-controller.xml"/>
+    <include location="component://common/webcommon/WEB-INF/portal-controller.xml"/><!--#Eam# portlet-party-->
     <include location="component://commonext/webapp/WEB-INF/controller.xml"/>
     <include location="component://content/webapp/content/WEB-INF/controller.xml"/>
+    <include location="component://party/webapp/partymgr/WEB-INF/controller-portlet-party.xml"/><!--#Eam# portlet-party-->
     <description>Party Manager Module Site Configuration File</description>
     
     <handler name="service-multi" type="request" class="org.ofbiz.webapp.event.ServiceMultiEventHandler"/>

Added: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/editbillingaccountterm.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/editbillingaccountterm.ftl?rev=1403874&view=auto
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/editbillingaccountterm.ftl (added)
+++ ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/editbillingaccountterm.ftl Tue Oct 30 21:19:31 2012
@@ -0,0 +1,121 @@
+<#--
+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.
+-->
+<#assign termTypes = delegator.findByAnd("TermType",{'parentTypeId':'FINANCIAL_TERM'})>
+<#assign uomIds = delegator.findByAnd("Uom",{'uomTypeId':'CURRENCY_MEASURE'})>
+<div>
+  <table class="basic-table" cellspacing="0">
+    <tr>
+      <td class="label">${uiLabelMap.PartyTerms}</td>
+      <td>
+        <table class="basic-table" cellspacing="0">
+          <#assign billingAccountTerms = delegator.findByAnd("BillingAccountTerm",{'billingAccountId',parameters.billingAccountId})>
+          <#if billingAccountTerms?has_content>
+            <#list billingAccountTerms as billingAccountTerm>
+              <#assign termType = billingAccountTerm.getRelatedOneCache("TermType")>
+              <tr>
+                <#if parameters.billingAccountTermId?has_content && parameters.billingAccountTermId = billingAccountTerm.billingAccountTermId>
+                <td>
+                    <#-- Edit existing term type -->
+                    <form name="update_${billingAccountTerm.billingAccountTermId}" id="update_${billingAccountTerm.billingAccountTermId}"
+                          method="post" action="<@o...@ofbizUrl>" >
+                         <input type="hidden" name="billingAccountId" value="${billingAccountTerm.billingAccountId}" />
+                         <input type="hidden" name="billingAccountTermId" value="${billingAccountTerm.billingAccountTermId}" />
+                         <#if termTypes?has_content>
+                         ${uiLabelMap.PartyTermType}
+                         <select name="termTypeId" class="required">
+                             <option value="">${uiLabelMap.CommonSelectOne}</option>
+                             <#list termTypes as type>
+                                 <option value="${type.termTypeId}" <#if type.termTypeId == billingAccountTerm.termTypeId>selected="selected"</#if>>${type.get("description", locale)?default(type.termTypeId)}</option>
+                             </#list>
+                         </select>
+                         </#if>
+                         ${uiLabelMap.PartyTermValue}
+                         <input type="text" name="termValue" value="${billingAccountTerm.termValue}" size="10" class="required"/>
+                         <#if uomIds?has_content>
+                         ${uiLabelMap.CommonUom}
+                         <select name="uomId">
+                             <option value="">${uiLabelMap.CommonSelectOne}</option>
+                             <#list uomIds as uom>
+                                 <option value="${uom.uomId}" <#if uom.uomId == billingAccountTerm.uomId?if_exists>selected="selected"</#if>>${uom.get("description", locale)?default(uom.uomId)}</option>
+                             </#list>
+                         </select>
+                         </#if>
+                         <a class="buttontext" href="javascript:ajaxSubmitFormUpdateAreas('update_${billingAccountTerm.billingAccountTermId}', '${parameters.editAreaDivId},editPartyBillingAccount,partyId=${parameters.partyId}&amp;billingAccountId=${parameters.billingAccountId}&amp;editAreaDivId=${parameters.editAreaDivId}&amp;portalPageId=${parameters.portalPageId}&amp;portalPortletId=${parameters.portalPortletId}&amp;portletSeqId=${parameters.portletSeqId}&amp;areaId=${parameters.areaId}&amp;idDescription=${parameters.idDescription?if_exists}');">${uiLabelMap.CommonUpdate}</a>
+                         <a class="buttontext" href="javascript:refrshPortlet('editPartyBillingAccount', '${parameters.editAreaDivId}','partyId=${parameters.partyId}&amp;billingAccountId=${parameters.billingAccountId}&amp;editAreaDivId=${parameters.editAreaDivId}&amp;portalPageId=${parameters.portalPageId}&amp;portalPortletId=${parameters.portalPortletId}&amp;portletSeqId=${parameters.portletSeqId}&amp;areaId=${parameters.areaId}&amp;idDescription=${parameters.idDescription?if_exists}','ListPartyPayment','','false','','false');">${uiLabelMap.CommonCancel}</a>
+                    </form>
+                </td>
+                <#else>
+                <td>
+                    <#-- Display existing term type -->
+                    <#if termType?has_content>${termType.get("description",locale)}<#else>${billingAccountTerm.termTypeId}</#if>
+                    (${uiLabelMap.PartyTermValue}:${billingAccountTerm.termValue?if_exists})
+                    <#if billingAccountTerm.uomId?has_content>
+                        <#assign uom = billingAccountTerm.getRelatedOneCache("Uom")>
+                        (${uiLabelMap.CommonUom}:${uom.description?if_exists})
+                    </#if>
+                </td>
+                <td>
+                    <a href="javascript:refrshPortlet('editPartyBillingAccount', '${parameters.editAreaDivId}','partyId=${parameters.partyId}&amp;billingAccountId=${parameters.billingAccountId}&amp;billingAccountTermId=${billingAccountTerm.billingAccountTermId}&amp;editAreaDivId=${parameters.editAreaDivId}&amp;portalPageId=${parameters.portalPageId}&amp;portalPortletId=${parameters.portalPortletId}&amp;portletSeqId=${parameters.portletSeqId}&amp;areaId=${parameters.areaId}&amp;idDescription=${parameters.idDescription?if_exists}','ListPartyPayment','','false','','false');"><img title="${uiLabelMap.IconsTooltips_Edit}" alt="" src="${iconsPurpose.Edit}"></a>
+                </td>
+                </#if>
+                <td>
+                    <form name="remove_${billingAccountTerm.billingAccountTermId}" id="remove_${billingAccountTerm.billingAccountTermId}"
+                          method="post" action="<@o...@ofbizUrl>" >
+                         <input type="hidden" name="billingAccountTermId" value="${billingAccountTerm.billingAccountTermId}" />
+                         <a href="javascript:ajaxSubmitFormUpdateAreas('remove_${billingAccountTerm.billingAccountTermId}', '${parameters.editAreaDivId},editPartyBillingAccount,partyId=${parameters.partyId}&amp;billingAccountId=${parameters.billingAccountId}&amp;editAreaDivId=${parameters.editAreaDivId}&amp;portalPageId=${parameters.portalPageId}&amp;portalPortletId=${parameters.portalPortletId}&amp;portletSeqId=${parameters.portletSeqId}&amp;areaId=${parameters.areaId}&amp;idDescription=${parameters.idDescription?if_exists}');" onclick="return confirm('${uiLabelMap.CommonConfirmDelete}')"><img title="${uiLabelMap.IconsTooltips_Delete}" alt="" src="${iconsPurpose.Delete}"></a>
+                    </form>
+                </td>
+              </tr>
+            </#list>
+          </#if>
+          <tr/>
+          <tr>
+            </table>
+            <form method="post" action="<@o...@ofbizUrl>" name="newtermform" id="newtermform">
+              <table class="basic-table" cellspacing="0">  
+              <input type="hidden" name="billingAccountId" value="${parameters.billingAccountId}" />
+              <td>
+                  <a href="javascript:ajaxSubmitFormUpdateAreas('newtermform', '${parameters.editAreaDivId},editPartyBillingAccount,partyId=${parameters.partyId}&amp;billingAccountId=${parameters.billingAccountId}&amp;editAreaDivId=${parameters.editAreaDivId}&amp;portalPageId=${parameters.portalPageId}&amp;portalPortletId=${parameters.portalPortletId}&amp;portletSeqId=${parameters.portletSeqId}&amp;areaId=${parameters.areaId}&amp;idDescription=${parameters.idDescription?if_exists}');"><img title="${uiLabelMap.IconsTooltips_Add}" alt="" src="/images/icons/famfamfam/add.png"></a>
+                  <#if termTypes?has_content>
+                  ${uiLabelMap.PartyTermType}
+                  <select name="termTypeId" class="required">
+                      <option value="">${uiLabelMap.CommonSelectOne}</option>
+                      <#list termTypes as type>
+                          <option value="${type.termTypeId}">${type.get("description", locale)?default(type.termTypeId)}</option>
+                       </#list>
+                  </select>
+                  </#if>
+                  ${uiLabelMap.PartyTermValue}
+                  <input type="text" name="termValue" value="" size="10" class="required"/>
+                  <#if uomIds?has_content>
+                  ${uiLabelMap.CommonUom}
+                  <select name="uomId">
+                      <option value="">${uiLabelMap.CommonSelectOne}</option>
+                      <#list uomIds as uom>
+                          <option value="${uom.uomId}">${uom.get("description", locale)?default(uom.uomId)}</option>
+                      </#list>
+                  </select>
+                  </#if>
+              </td>
+            </form>
+          </tr>
+        </table><hr>
+      </tr>
+  </table>
+</div>

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/editbillingaccountterm.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/editbillingaccountterm.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/editbillingaccountterm.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/editgivencontactmech.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/editgivencontactmech.ftl?rev=1403874&view=auto
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/editgivencontactmech.ftl (added)
+++ ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/editgivencontactmech.ftl Tue Oct 30 21:19:31 2012
@@ -0,0 +1,296 @@
+<#--
+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.
+-->
+<#if !mechMap.contactMech?exists>
+  <#-- When creating a new contact mech, first select the type, then actually create -->
+  <#if !preContactMechTypeId?has_content>
+    <h1>${uiLabelMap.PartyCreateNewContact}</h1>
+    <form method="post" action="<@o...@ofbizUrl>" name="createcontactmechform">
+      <input type="hidden" name="primaryId" value="${parameters.primaryId}" />
+      <input type="hidden" name="entity" value="${parameters.entity}" />
+      <input type="hidden" name="portalPageId" value="${parameters.portalPageId}" />
+      <input type="hidden" name="portalPortletId" value="${parameters.portalPortletId}" />
+      <input type="hidden" name="portletSeqId" value="${parameters.portletSeqId}" />
+      <table class="basic-table" cellspacing="0">
+        <tr>
+          <td class="label">${uiLabelMap.PartySelectContactType}</td>
+          <td>
+            <select name="preContactMechTypeId">
+              <#list mechMap.contactMechTypes as contactMechType>
+                <option value="${contactMechType.contactMechTypeId}">${contactMechType.get("description",locale)}</option>
+              </#list>
+            </select>
+            <a href="javascript:document.createcontactmechform.submit()" class="smallSubmit">${uiLabelMap.CommonCreate}</a>
+          </td>
+        </tr>
+      </table>
+    </form>
+    </#if>
+<#elseif parameters.entity == "Party" && mechMap.partyContactMech?exists>
+    <#assign entityContactMech = mechMap.partyContactMech>
+<#elseif parameters.entity == "Facility" && mechMap.facilityContactMech?exists>
+    <#assign entityContactMech = mechMap.facilityContactMech>
+<#elseif parameters.entity == "WorkEffort" && mechMap.workEffortContactMech?exists>
+    <#assign entityContactMech = mechMap.workEffortContactMech>
+</#if>
+<#if mechMap.contactMechTypeId?has_content>
+  <#if !mechMap.contactMech?has_content>
+    <h1>${uiLabelMap.PartyCreateNewContact}</h1>
+    <div id="mech-purpose-types">
+    <#if contactMechPurposeType?exists>
+      <p>(${uiLabelMap.PartyMsgContactHavePurpose} <b>"${contactMechPurposeType.get("description",locale)?if_exists}"</b>)</p>
+    </#if>
+    <form method="post" action="<@o...@ofbizUrl>" id="editcontactmechform" onsubmit="javascript:submitFormDisableSubmits(this)" class="basic-form" name="editcontactmechform">
+      <table class="basic-table" cellspacing="0">
+        <input type="hidden" name="DONE_PAGE" value="${donePage?if_exists}" />
+        <input type="hidden" name="contactMechTypeId" value="${mechMap.contactMechTypeId}" />
+        <input type="hidden" name="primaryId" value="${parameters.primaryId}" />
+        <input type="hidden" name="entity" value="${parameters.entity}" />
+        <input type="hidden" name="portalPageId" value="${parameters.portalPageId}" />
+        <input type="hidden" name="portalPortletId" value="${parameters.portalPortletId}" />
+        <input type="hidden" name="portletSeqId" value="${parameters.portletSeqId}" />
+        <#if cmNewPurposeTypeId?has_content><input type="hidden" name="contactMechPurposeTypeId" value="${cmNewPurposeTypeId}" /></#if>
+        <#if preContactMechTypeId?exists><input type="hidden" name="preContactMechTypeId" value="${preContactMechTypeId}" /></#if>
+        <#if contactMechPurposeTypeId?exists><input type="hidden" name="contactMechPurposeTypeId" value="${contactMechPurposeTypeId?if_exists}" /></#if>
+        <#if paymentMethodId?has_content><input type='hidden' name='paymentMethodId' value='${paymentMethodId}' /></#if>
+  <#else>
+    <h1>${uiLabelMap.PartyEditContactInformation}</h1>
+    <div id="mech-purpose-types">
+      <table class="basic-table" cellspacing="0">
+      <#if mechMap.purposeTypes?has_content>
+        <tr>
+          <td class="label">${uiLabelMap.PartyContactPurposes}</td>
+          <td>
+            <table class="basic-table" cellspacing="0">
+              <#if parameters.entity == "Party" && mechMap.partyContactMechPurposes?has_content>
+                  <#assign entityContactMech = mechMap.partyContactMech>
+                  <#assign entityContactMechPurposes = mechMap.partyContactMechPurposes> 
+              <#elseif parameters.entity == "Facility" && mechMap.facilityContactMechPurposes?has_content>
+                  <#assign entityContactMech = mechMap.facilityContactMech>
+                  <#assign entityContactMechPurposes = mechMap.facilityContactMechPurposes>
+              </#if>
+              <#if entityContactMechPurposes?has_content>
+                <#list entityContactMechPurposes as entityContactMechPurpose>
+                  <#assign contactMechPurposeType = entityContactMechPurpose.getRelatedOneCache("ContactMechPurposeType")>
+                  <tr>
+                    <td>
+                      <#if contactMechPurposeType?has_content>
+                        ${contactMechPurposeType.get("description",locale)}
+                      <#else>
+                        ${uiLabelMap.PartyPurposeTypeNotFound}: "${partyContactMechPurpose.contactMechPurposeTypeId}"
+                      </#if>
+                    </td>
+                    <td>
+                     <#assign FromDate = Static["org.ofbiz.base.util.UtilDateTime"].toDateString(entityContactMechPurpose.fromDate, "dd/MM/yyyy")/>  
+                     ${FromDate}
+                     <#if entityContactMechPurpose.thruDate?has_content>(${uiLabelMap.CommonExpire}: ${entityContactMechPurpose.thruDate.toString()}</#if>
+                    </td>
+                    <td>
+                    <#if entityContactMechPurpose.thruDate?has_content>
+                     <#-- Reactivate contactMechPurpose option -->
+                     <a href="javascript:ajaxSubmitFormUpdateAreas('reactivateContactMechPurpose_${entityContactMechPurpose.contactMechPurposeTypeId}', '${parameters.editAreaDivId},editContactMechMgmt,editAreaDivId=${parameters.editAreaDivId}&amp;portalPageId=${parameters.portalPageId}&amp;portalPortletId=${parameters.portalPortletId}&amp;portletSeqId=${parameters.portletSeqId}&amp;primaryId=${parameters.primaryId}&amp;entity=${parameters.entity}&amp;contactMechId=${contactMechId}&amp;idDescription=${parameters.idDescription?if_exists}&amp;SHOW_OLD=${parameters.SHOW_OLD?if_exists}&amp;areaId=${parameters.areaId?if_exists}');"><img title="${uiLabelMap.CommonReactivate}" alt="" src="${iconsLocation}/clock_add.png"></a>
+                     <form name="reactivateContactMechPurpose_${entityContactMechPurpose.contactMechPurposeTypeId}" id="reactivateContactMechPurpose_${entityContactMechPurpose.contactMechPurposeTypeId}"
+                       method="post" action="<@o...@ofbizUrl>" >
+                         <input type="hidden" name="thruDate" value="" />
+                    <#else>
+                     <#-- Deactivate contactMechPurpose option -->
+                     <a href="javascript:ajaxSubmitFormUpdateAreas('deactivateContactMechPurpose_${entityContactMechPurpose.contactMechPurposeTypeId}', '${parameters.editAreaDivId},editContactMechMgmt,editAreaDivId=${parameters.editAreaDivId}&amp;portalPageId=${parameters.portalPageId}&amp;portalPortletId=${parameters.portalPortletId}&amp;portletSeqId=${parameters.portletSeqId}&amp;primaryId=${parameters.primaryId}&amp;entity=${parameters.entity}&amp;contactMechId=${contactMechId}&amp;idDescription=${parameters.idDescription?if_exists}&amp;SHOW_OLD=${parameters.SHOW_OLD?if_exists}&amp;areaId=${parameters.areaId?if_exists}');"><img title="${uiLabelMap.CommonDeactivate}" alt="" src="${iconsLocation}/clock_delete.png"></a>
+                     <form name="deactivateContactMechPurpose_${entityContactMechPurpose.contactMechPurposeTypeId}" id="deactivateContactMechPurpose_${entityContactMechPurpose.contactMechPurposeTypeId}"
+                       method="post" action="<@o...@ofbizUrl>" >
+                    </#if>
+                         <input type="hidden" name="primaryId" value="${parameters.primaryId}" />
+                         <input type="hidden" name="entity" value="${parameters.entity}" />
+                         <input type="hidden" name="contactMechId" value="${contactMechId}" />
+                         <input type="hidden" name="contactMechPurposeTypeId" value="${entityContactMechPurpose.contactMechPurposeTypeId}" />
+                         <input type="hidden" name="fromDate" value="${entityContactMechPurpose.fromDate.toString()}" />
+                         <input type="hidden" name="useValues" value="true"/>
+                      </form>
+                    </td>
+                    <#--
+                    <td>
+                     <#-- Remove contactMechPurpose option -->
+                     <#--
+                     <a href="javascript:ajaxSubmitFormUpdateAreas('removeContactMechPurpose_${entityContactMechPurpose.contactMechPurposeTypeId}', '${parameters.editAreaDivId},editContactMechMgmt,editAreaDivId=${parameters.editAreaDivId}&amp;portalPageId=${parameters.portalPageId}&amp;portalPortletId=${parameters.portalPortletId}&amp;portletSeqId=${parameters.portletSeqId}&amp;primaryId=${parameters.primaryId}&amp;entity=${parameters.entity}&amp;contactMechId=${contactMechId}&amp;idDescription=${parameters.idDescription?if_exists}&amp;SHOW_OLD=${parameters.SHOW_OLD?if_exists}&amp;areaId=${parameters.areaId?if_exists}');"><img title="${uiLabelMap.CommonDelete}" alt="" src="${iconsLocation}/bin.png"></a>
+                     <form name="removeContactMechPurpose_${entityContactMechPurpose.contactMechPurposeTypeId}" id="removeContactMechPurpose_${entityContactMechPurpose.contactMechPurposeTypeId}"
+                       method="post" action="<@o...@ofbizUrl>" >
+                         <input type="hidden" name="primaryId" value="${parameters.primaryId}" />
+                         <input type="hidden" name="entity" value="${parameters.entity}" />
+                         <input type="hidden" name="contactMechId" value="${contactMechId}" />
+                         <input type="hidden" name="contactMechPurposeTypeId" value="${entityContactMechPurpose.contactMechPurposeTypeId}" />
+                         <input type="hidden" name="fromDate" value="${entityContactMechPurpose.fromDate.toString()}" />
+                         <input type="hidden" name="useValues" value="true"/>
+                      </form>
+                    </td>
+                    -->
+                  </tr>
+                </#list>
+              </#if>
+              <tr>
+                </table>
+                <table>
+                  <td>
+                    <a href="javascript:ajaxSubmitFormUpdateAreas('newpurposeform', '${parameters.editAreaDivId},editContactMechMgmt,editAreaDivId=${parameters.editAreaDivId}&amp;portalPageId=${parameters.portalPageId}&amp;portalPortletId=${parameters.portalPortletId}&amp;portletSeqId=${parameters.portletSeqId}&amp;primaryId=${parameters.primaryId}&amp;entity=${parameters.entity}&amp;contactMechId=${contactMechId}&amp;idDescription=${parameters.idDescription?if_exists}&amp;SHOW_OLD=${parameters.SHOW_OLD?if_exists}&amp;areaId=${parameters.areaId?if_exists}');"><img title="${uiLabelMap.CommonAdd}" alt="" src="${iconsLocation}/add.png"></a>
+                  </td>
+                  <td>
+                  <form method="post" action="<@o...@ofbizUrl>" name="newpurposeform" id="newpurposeform">
+                    <input type="hidden" name="primaryId" value="${parameters.primaryId}" />
+                    <input type="hidden" name="entity" value="${parameters.entity}" />
+                    <input type="hidden" name="DONE_PAGE" value="${donePage?if_exists}" />
+                    <input type="hidden" name="useValues" value="true" />
+                    <input type="hidden" name="contactMechId" value="${contactMechId?if_exists}" />
+                      <select name="contactMechPurposeTypeId">
+                        <option></option>
+                        <#list mechMap.purposeTypes as contactMechPurposeType>
+                          <option value="${contactMechPurposeType.contactMechPurposeTypeId}">${contactMechPurposeType.get("description",locale)}</option>
+                        </#list>
+                      </select>
+                  </form>
+                  </td>
+              <hr>
+            </table>
+          </tr>
+      </#if>
+      </table>
+      <hr>
+      <form method="post" action="<@o...@ofbizUrl>" id="editcontactmechform" name="editcontactmechform">
+      <table class="basic-table" cellspacing="0">
+        <input type="hidden" name="contactMechId" value="${contactMechId}" />
+        <input type="hidden" name="contactMechTypeId" value="${mechMap.contactMechTypeId}" />
+        <input type="hidden" name="primaryId" value="${parameters.primaryId}" />
+        <input type="hidden" name="entity" value="${parameters.entity}" />
+        <input type="hidden" name="DONE_PAGE" value="${donePage?if_exists}" />
+  </#if>
+  <#if "POSTAL_ADDRESS" = mechMap.contactMechTypeId?if_exists>
+    <tr>
+      <td class="label">${uiLabelMap.PartyAttentionName}</td>
+      <td>
+        <input type="text" size="50" maxlength="100" name="attnName" value="${(mechMap.postalAddress.attnName)?default(request.getParameter('attnName')?if_exists)}" />
+      </td>
+    </tr>
+    <tr>
+      <td class="label">${uiLabelMap.PartyAddressLine1} *</td>
+      <td>
+        <input type="text" size="100" maxlength="255" name="address1" value="${(mechMap.postalAddress.address1)?default(request.getParameter('address1')?if_exists)}" />
+      </td>
+    </tr>
+    <tr>
+      <td class="label">${uiLabelMap.PartyAddressLine2}</td>
+      <td>
+        <input type="text" size="100" maxlength="255" name="address2" value="${(mechMap.postalAddress.address2)?default(request.getParameter('address2')?if_exists)}" />
+      </td>
+    </tr>
+    <tr>
+        <td class="label">
+            <span id="postalCode_title">${uiLabelMap.PartyZipCode} *</span>
+        </td>
+        <td id="null" colspan="4">
+            <span class="field-lookup">
+                <input type="text" name="postalCode" size="5" id="postalCode" value="${(mechMap.postalAddress.postalCode)?default(request.getParameter('postalCode')?if_exists)}" autocomplete="off">
+            </span>
+        </td>
+    </tr>
+    <tr>
+        <td class="label">
+            <span id="EditCompany_city_title">${uiLabelMap.PartyCity} *</span>
+        </td>
+        <td id="cityArea" colspan="4">
+            <input type="text" name="city" size="30" maxlength="60" value="${(mechMap.postalAddress.city)?default(request.getParameter('city')?if_exists)}">
+        </td>
+    </tr>
+    <tr>
+      <td class="label">${uiLabelMap.PartyState}</td>
+      <td>
+        <select name="stateProvinceGeoId">
+          <option>${(mechMap.postalAddress.stateProvinceGeoId)?if_exists}</option>
+          <option></option>
+          ${screens.render("component://common/widget/CommonScreens.xml#states")}
+        </select>
+      </td>
+    </tr>
+    <tr>
+      <td class="label">${uiLabelMap.CommonCountry}</td>
+      <td>
+        <select name="countryGeoId">
+          <#if (mechMap.postalAddress?exists) && (mechMap.postalAddress.countryGeoId?exists)>
+            <#assign defaultCountryGeoId = (mechMap.postalAddress.countryGeoId)>
+            <option selected="selected" value="${defaultCountryGeoId}">
+          <#else>
+           <#assign defaultCountryGeoId = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties", "country.geo.id.default")>
+           <option selected="selected" value="${defaultCountryGeoId}">
+          </#if>
+          <#assign countryGeo = delegator.findByPrimaryKey("Geo",Static["org.ofbiz.base.util.UtilMisc"].toMap("geoId",defaultCountryGeoId))>
+          ${countryGeo.get("geoName",locale)}
+          </option>
+          <option></option>
+          ${screens.render("component://common/widget/CommonScreens.xml#countries")}
+        </select>
+      </td>
+    </tr>
+    <#assign isUsps = Static["org.ofbiz.party.contact.ContactMechWorker"].isUspsAddress(mechMap.postalAddress)>
+    <tr>
+      <td class="label">${uiLabelMap.PartyIsUsps}</td>
+      <td><#if isUsps>${uiLabelMap.CommonY}<#else>${uiLabelMap.CommonN}</#if>
+      </td>
+    </tr>
+
+  <#elseif "TELECOM_NUMBER" = mechMap.contactMechTypeId?if_exists>
+    <tr>
+      <td class="label">${uiLabelMap.PartyPhoneNumber}</td>
+      <td>
+        <input type="hidden" name="fromDate" value="${(entityContactMech.fromDate)?default(request.getParameter('fromDate')?if_exists)}" />
+      <#if parameters.useCountryCode?has_content && parameters.useCountryCode = 'Y'>
+        <input type="text" size="4" maxlength="10" name="countryCode" value="${(mechMap.telecomNumber.countryCode)?default(request.getParameter('countryCode')?if_exists)}" />
+        -&nbsp;
+      </#if>
+      <#if parameters.useAreaCode?has_content && parameters.useAreaCode = 'Y'>
+        <input type="text" size="4" maxlength="10" name="areaCode" value="${(mechMap.telecomNumber.areaCode)?default(request.getParameter('areaCode')?if_exists)}" />
+        -&nbsp;
+      </#if>
+        <input type="text" size="15" maxlength="15" name="contactNumber" value="${(mechMap.telecomNumber.contactNumber)?default(request.getParameter('contactNumber')?if_exists)}" />
+      <#if parameters.useExtCode?has_content && parameters.useExtCode = 'Y'>
+        &nbsp;${uiLabelMap.PartyContactExt}&nbsp;<input type="text" size="6" maxlength="10" name="extension" value="${(entityContactMech.extension)?default(request.getParameter('extension')?if_exists)}" />
+      </#if>
+      </td>
+    </tr>
+    <tr>
+      <td class="label"></td>
+      <td><#if parameters.useCountryCode?has_content && parameters.useCountryCode = 'Y'>[${uiLabelMap.PartyCountryCode}] </#if><#if parameters.useAreaCode?has_content && parameters.useAreaCode = 'Y'>[${uiLabelMap.PartyAreaCode}] </#if>[${uiLabelMap.PartyContactNumber}]<#if parameters.useExtCode?has_content && parameters.useExtCode = 'Y'> [${uiLabelMap.PartyContactExt}]</#if></td>
+    </tr>
+  <#elseif "EMAIL_ADDRESS" = mechMap.contactMechTypeId?if_exists>
+    <tr>
+      <td class="label">${mechMap.contactMechType.get("description",locale)}</td>
+      <td>
+        <input type="text" size="60" maxlength="255" name="emailAddress" value="${(mechMap.contactMech.infoString)?default(request.getParameter('emailAddress')?if_exists)}" />
+      </td>
+    </tr>
+  <#else>
+    <tr>
+      <td class="label">${mechMap.contactMechType.get("description",locale)}</td>
+      <td>
+        <input type="hidden" name="fromDate" value="${(entityContactMech.fromDate)?default(request.getParameter('fromDate')?if_exists)}" />
+        <input type="text" size="60" maxlength="255" name="infoString" value="${(mechMap.contactMech.infoString)?if_exists}" />
+      </td>
+    </tr>
+  </#if>
+  </table>
+  <input type="button" onclick="ajaxSubmitFormUpdateAreas('editcontactmechform', '${parameters.areaId},showPortlet,portalPageId=${parameters.portalPageId}&amp;portalPortletId=${parameters.portalPortletId}&amp;portletSeqId=${parameters.portletSeqId}&amp;primaryId=${parameters.primaryId}&amp;entity=${parameters.entity}&amp;areaId=${parameters.areaId}&amp;idDescription=${parameters.idDescription?if_exists}&amp;SHOW_OLD=${parameters.SHOW_OLD?if_exists}')" value="${uiLabelMap.CommonSave}" name="submitButton" class="smallSubmit"/>
+  <input type="button" onclick="ajaxUpdateArea('${parameters.areaId}', 'showPortlet', 'portalPageId=${parameters.portalPageId}&amp;portalPortletId=${parameters.portalPortletId}&amp;portletSeqId=${parameters.portletSeqId}&amp;primaryId=${parameters.primaryId}&amp;entity=${parameters.entity}&amp;areaId=${parameters.areaId}&amp;idDescription=${parameters.idDescription?if_exists}&amp;SHOW_OLD=${parameters.SHOW_OLD?if_exists}')" value="${uiLabelMap.CommonReturn}" name="submitButton" class="smallSubmit"/>
+  </form>
+  </div>
+  
+</#if>

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/editgivencontactmech.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/editgivencontactmech.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/editgivencontactmech.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/profileblocks/GivenContact.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/profileblocks/GivenContact.ftl?rev=1403874&view=auto
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/profileblocks/GivenContact.ftl (added)
+++ ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/profileblocks/GivenContact.ftl Tue Oct 30 21:19:31 2012
@@ -0,0 +1,183 @@
+<#--
+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.
+-->
+
+
+  <#if contactMeches?has_content>
+    <table class="basic-table" cellspacing="0">
+      <tr>
+        <th text-align="CENTER">&nbsp;</th>
+        <#if enableGeolocation?has_content && enableGeolocation == 'Y'>
+        <th text-align="CENTER">&nbsp;</th>
+        </#if>
+        <th>${uiLabelMap.PartyContactType}</th>
+        <th>${uiLabelMap.PartyContactInformation}</th>
+        <th>${uiLabelMap.CommonUpdated}</th>
+        <th>&nbsp;</th>
+        <th>&nbsp;</th>
+      </tr>
+      <#assign contactMechNb = 0>
+      <#list contactMeches as contactMechMap>
+        <#assign contactMech = contactMechMap.contactMech>
+        <#if entity == "Party">
+            <#assign entityContactMech = contactMechMap.partyContactMech>
+            <#assign entityContactMechPurposes = contactMechMap.partyContactMechPurposes> 
+        <#elseif entity == "Facility">
+            <#assign entityContactMech = contactMechMap.facilityContactMech>
+            <#assign entityContactMechPurposes = contactMechMap.facilityContactMechPurposes>
+        <#elseif entity == "WorkEffort">
+            <#assign entityContactMech = contactMechMap.workEffortContactMech>
+        </#if>
+        <tr><td colspan="7"><hr /></td></tr>
+        <tr>
+          <td>
+            <#if security.hasEntityPermission("PARTYMGR", "_UPDATE", session)>
+              <a href="javascript:ajaxUpdateArea('${editAreaDivId}', 'editContactMechMgmt', 'portalPortletId=${portalPortletId}&amp;portalPageId=${portalPageId}&amp;portletSeqId=${portletSeqId}&amp;editAreaDivId=${editAreaDivId}&amp;primaryId=${parameters.primaryId}&amp;contactMechId=${contactMech.contactMechId}&amp;entity=${entity}&amp;areaId=${areaId}&amp;idDescription=${parameters.idDescription?if_exists}&amp;SHOW_OLD=${parameters.SHOW_OLD?if_exists}&amp;useAreaCode=${useAreaCode?if_exists}&amp;useCountryCode=${useCountryCode?if_exists}&amp;useExtCode=${useExtCode?if_exists}');"><img title="${uiLabelMap.CommonUpdate}" alt="" src="${iconsLocation}/page_white_edit.png"></a>
+            </#if>
+          </td>
+            <#if enableGeolocation?has_content && enableGeolocation == 'Y'>
+          <td>
+            <#if contactMech.contactMechTypeId == 'POSTAL_ADDRESS'>
+              <a class="label" href="showPortalPage?portalPageId=PostalAddrGeoLoc&idDescription=[${primaryId?if_exists}]&partyId=${primaryId?if_exists}&contactMechId=${contactMech.contactMechId?if_exists}" target="_blank"><img title="${uiLabelMap.IconsTooltips_GeoLoc?if_exists}" alt="${uiLabelMap.IconsTooltips_GeoLoc?if_exists}" src="${iconsPurpose.GeoLoc?if_exists}"></a>
+            </#if>
+          </td>
+            </#if>
+          <td class="label align-top">
+            <#assign cmt = contactMechMap.contactMechType>
+            <#if cmt?has_content>${cmt.get("description",locale)}</#if>
+          </td>
+          <td>
+            <#if entityContactMechPurposes?has_content>
+            <#list entityContactMechPurposes as ContactMechPurpose>
+              <#assign contactMechPurposeType = ContactMechPurpose.getRelatedOneCache("ContactMechPurposeType")>
+              <div>
+                <#if contactMechPurposeType?has_content>
+                  <b>${contactMechPurposeType.get("description",locale)}</b>
+                <#else>
+                  <b>${uiLabelMap.PartyMechPurposeTypeNotFound}: "${ContactMechPurpose.contactMechPurposeTypeId}"</b>
+                </#if>
+                <#if ContactMechPurpose.thruDate?has_content>
+                  (${uiLabelMap.CommonExpire}: ${ContactMechPurpose.thruDate})
+                </#if>
+              </div>
+            </#list>
+            </#if>
+            <#if "POSTAL_ADDRESS" = contactMech.contactMechTypeId>
+              <#assign postalAddress = contactMechMap.postalAddress>
+              <#if postalAddress?has_content>
+              <div>
+                <#if postalAddress.toName?has_content><b>${uiLabelMap.PartyAddrToName}:</b> ${postalAddress.toName}<br /></#if>
+                <#if postalAddress.attnName?has_content><b>${uiLabelMap.PartyAddrAttnName}:</b> ${postalAddress.attnName}<br /></#if>
+                  ${postalAddress.address1?if_exists}<br />
+                <#if postalAddress.address2?has_content>${postalAddress.address2}<br /></#if>
+                <#if postalAddress.postalCodeGeoId?has_content>
+                  <#assign postalCode = postalAddress.getRelatedOneCache("PostalCodeGeo")>
+                  ${postalCode.geoName?default(postalCode.geoName)}
+                  <#else>
+                  ${postalAddress.postalCode?if_exists}
+                </#if>
+                ${postalAddress.city?if_exists},
+                <#if postalAddress.stateProvinceGeoId?has_content>
+                  <#assign stateProvince = postalAddress.getRelatedOneCache("StateProvinceGeo")>
+                  ${stateProvince.abbreviation?default(stateProvince.geoName)}
+                </#if>
+                <#if postalAddress.countryGeoId?has_content><br />
+                  <#assign country = postalAddress.getRelatedOneCache("CountryGeo")>
+                  ${country.geoName?default(country.geoName)}
+                </#if>
+              </div>
+              </#if>
+            <#elseif "TELECOM_NUMBER" = contactMech.contactMechTypeId>
+              <#assign telecomNumber = contactMechMap.telecomNumber>
+              <div>
+                ${telecomNumber.countryCode?if_exists}
+                <#if telecomNumber.areaCode?has_content>${telecomNumber.areaCode?default("000")}-</#if>${telecomNumber.contactNumber?default("000-0000")}
+                <#if entityContactMech.extension?has_content>${uiLabelMap.PartyContactExt}&nbsp;${entityContactMech.extension}</#if>
+              </div>
+            <#elseif "EMAIL_ADDRESS" = contactMech.contactMechTypeId>
+              <div>
+                ${contactMech.infoString?if_exists}
+                <form method="post" action="<@o...@ofbizUrl>" onsubmit="javascript:submitFormDisableSubmits(this)" name="createEmail${contactMech.infoString?replace("&#64;","")?replace(".","")}">
+                  <#if userLogin.partyId?has_content>
+                  <input name="partyIdFrom" value="${userLogin.partyId}" type="hidden"/>
+                  </#if>
+                  <input name="contactMechIdTo" value="${contactMech.contactMechId}" type="hidden"/>
+                  <input name="my" value="My" type="hidden"/>
+                  <input name="statusId" value="COM_PENDING" type="hidden"/>
+                  <input name="communicationEventTypeId" value="EMAIL_COMMUNICATION" type="hidden"/>
+                </form>
+              </div>
+            <#else>
+              <div>${contactMech.infoString?if_exists}</div>
+            </#if>
+            <#-- create cust request -->
+            <#if custRequestTypes?exists>
+              <form name="createCustRequestForm" action="<@o...@ofbizUrl>" method="post" onsubmit="javascript:submitFormDisableSubmits(this)">
+                <input type="hidden" name="partyId" value="${partyId}"/>
+                <input type="hidden" name="fromPartyId" value="${partyId}"/>
+                <input type="hidden" name="fulfillContactMechId" value="${contactMech.contactMechId}"/>
+                <select name="custRequestTypeId">
+                  <#list custRequestTypes as type>
+                    <option value="${type.custRequestTypeId}">${type.get("description", locale)}</option>
+                  </#list>
+                </select>
+                <input type="submit" class="smallSubmit" value="${uiLabelMap.PartyCreateNewCustRequest}"/>
+              </form>
+            </#if>
+          </td>
+          <td>
+             <#assign FromDate = Static["org.ofbiz.base.util.UtilDateTime"].toDateString(entityContactMech.fromDate, "dd/MM/yyyy")/>
+            <div>${FromDate}</div>
+            <#if entityContactMech.thruDate?has_content>
+            <#assign ToDate = Static["org.ofbiz.base.util.UtilDateTime"].toDateString(entityContactMech.thruDate, "dd/MM/yyyy")/>
+            <div><b>${uiLabelMap.PartyContactEffectiveThru} :&nbsp;${ToDate}</b></div></#if>
+          </td>
+          <td>
+            <#if security.hasEntityPermission("PARTYMGR", "_DELETE", session)>
+              <#if entityContactMech.thruDate?has_content>
+              <#-- Reactivate contactMechPurpose option -->
+                  <a href="javascript:ajaxSubmitFormUpdateAreas('partyReactivateContact_${contactMechNb}', '${areaId},showPortlet,portalPortletId=${portalPortletId}&amp;portalPageId=${portalPageId}&amp;portletSeqId=${portletSeqId}&amp;primaryId=${parameters.primaryId}&amp;entity=${parameters.entity}&amp;areaId=${areaId}&amp;idDescription=${parameters.idDescription?if_exists}');"><img title="${uiLabelMap.CommonReactivate}" alt="" src="${iconsLocation}/clock_add.png"></a>
+                  <form name="partyReactivateContact" id="partyReactivateContact_${contactMechNb}" method="post" action="<@o...@ofbizUrl>" onsubmit="javascript:submitFormDisableSubmits(this)">
+                    <input name="thruDate" value="" type="hidden" />
+              <#else>
+                  <a href="javascript:ajaxSubmitFormUpdateAreas('partyDeleteContact_${contactMechNb}', '${areaId},showPortlet,portalPortletId=${portalPortletId}&amp;portalPageId=${portalPageId}&amp;portletSeqId=${portletSeqId}&amp;primaryId=${parameters.primaryId}&amp;entity=${parameters.entity}&amp;areaId=${areaId}&amp;idDescription=${parameters.idDescription?if_exists}');"><img title="${uiLabelMap.CommonDeactivate}" alt="" src="${iconsLocation}/clock_delete.png"></a>
+                  <form name="partyDeleteContact" id="partyDeleteContact_${contactMechNb}" method="post" action="<@o...@ofbizUrl>" onsubmit="javascript:submitFormDisableSubmits(this)">
+              </#if>
+                <input name="primaryId" value="${parameters.primaryId}" type="hidden"/>
+                <input name="entity" value="${entity}" type="hidden"/>
+                <input name="contactMechId" value="${contactMech.contactMechId}" type="hidden"/>
+                <input name="fromDate" value="${entityContactMech.fromDate?if_exists}" type="hidden"/>
+              </form>
+          </td>
+          <td>
+            <form name="partyRemoveContact" id="partyRemoveContact_${contactMechNb}" method="post" action="<@o...@ofbizUrl>" onsubmit="javascript:submitFormDisableSubmits(this)">
+                <input name="primaryId" value="${parameters.primaryId}" type="hidden"/>
+                <input name="entity" value="${entity}" type="hidden"/>
+                <input name="contactMechId" value="${contactMech.contactMechId}" type="hidden"/>
+            </form>
+               <a onclick="return confirm('${uiLabelMap.CommonConfirm}')" href="javascript:ajaxSubmitFormUpdateAreas('partyRemoveContact_${contactMechNb}', '${areaId},showPortlet,portalPortletId=${portalPortletId}&amp;portalPageId=${portalPageId}&amp;portletSeqId=${portletSeqId}&amp;primaryId=${parameters.primaryId}&amp;entity=${parameters.entity}&amp;areaId=${areaId}&amp;idDescription=${parameters.idDescription?if_exists}');"><img title="${uiLabelMap.CommonDelete}" alt="" src="${iconsLocation}/bin.png"></a>
+            </#if>
+          </td>
+        </tr>
+      <#assign contactMechNb = contactMechNb + 1>
+      </#list>
+    </table>
+  <#else>
+    ${uiLabelMap.PartyNoContactInformation}
+  </#if>
+

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/profileblocks/GivenContact.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/profileblocks/GivenContact.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/webapp/partymgr/party/profileblocks/GivenContact.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/20120329_portletWidget/applications/party/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/party/widget/CommonScreens.xml?rev=1403874&view=auto
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/party/widget/CommonScreens.xml (added)
+++ ofbiz/branches/20120329_portletWidget/applications/party/widget/CommonScreens.xml Tue Oct 30 21:19:31 2012
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
+    <!--#Bam# uiLabelDecorator : decorator for portlet, it's uiLabelDecorator of portlet Components which is call by portlet -->
+    <screen name="portletUiLabelDecorator">
+        <section><!-- Decorator use by portlet define in their preference label -->
+            <actions>
+                <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="MarketingUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="WorkEffortUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="SecurityUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="HumanResUiLabels" map-name="uiLabelMap" global="true"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="uiLabelDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <decorator-section-include name="body"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <!--#Eam# uiLabelDecorator  -->
+</screens>

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/widget/CommonScreens.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/widget/CommonScreens.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/branches/20120329_portletWidget/applications/party/widget/CommonScreens.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml