<#-- 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> <#list contactMeches as contactMechMap> <#assign contactMech = contactMechMap.contactMech> <#assign partyContactMech = contactMechMap.partyContactMech>
${uiLabelMap.PartyContactType} ${uiLabelMap.PartyContactInformation} ${uiLabelMap.PartyContactSolicitingOk}  

${contactMechMap.contactMechType.get("description",locale)} <#list contactMechMap.partyContactMechPurposes as partyContactMechPurpose> <#assign contactMechPurposeType = partyContactMechPurpose.getRelatedOneCache("ContactMechPurposeType")>
<#if contactMechPurposeType?has_content> ${contactMechPurposeType.get("description",locale)} <#else> ${uiLabelMap.PartyMechPurposeTypeNotFound}: "${partyContactMechPurpose.contactMechPurposeTypeId}" <#if partyContactMechPurpose.thruDate?has_content> (${uiLabelMap.CommonExpire}: ${partyContactMechPurpose.thruDate})
<#if "POSTAL_ADDRESS" = contactMech.contactMechTypeId> <#assign postalAddress = contactMechMap.postalAddress> <#if postalAddress?has_content>
<#if postalAddress.toName?has_content>${uiLabelMap.PartyAddrToName}: ${postalAddress.toName}
<#if postalAddress.attnName?has_content>${uiLabelMap.PartyAddrAttnName}: ${postalAddress.attnName}
${postalAddress.address1?if_exists}
<#if postalAddress.address2?has_content>${postalAddress.address2}
${postalAddress.city?if_exists}, <#if postalAddress.stateProvinceGeoId?has_content> <#assign stateProvince = postalAddress.getRelatedOneCache("StateProvinceGeo")> ${stateProvince.abbreviation?default(stateProvince.geoId)} ${postalAddress.postalCode?if_exists} <#if postalAddress.countryGeoId?has_content>
<#assign country = postalAddress.getRelatedOneCache("CountryGeo")> ${country.geoName?default(country.geoId)}
<#if (postalAddress?has_content && !postalAddress.countryGeoId?has_content) || postalAddress.countryGeoId = "USA"> <#assign addr1 = postalAddress.address1?if_exists> <#if addr1?has_content && (addr1.indexOf(" ") > 0)> <#assign addressNum = addr1.substring(0, addr1.indexOf(" "))> <#assign addressOther = addr1.substring(addr1.indexOf(" ")+1)> ${uiLabelMap.CommonLookupWhitepages} <#if postalAddress.geoPointId?has_content> <#if contactMechPurposeType?has_content> <#assign popUptitle = contactMechPurposeType.get("description",locale) + uiLabelMap.CommonGeoLocation> ${uiLabelMap.CommonGeoLocation} <#elseif "TELECOM_NUMBER" = contactMech.contactMechTypeId> <#assign telecomNumber = contactMechMap.telecomNumber>
${telecomNumber.countryCode?if_exists} <#if telecomNumber.areaCode?has_content>${telecomNumber.areaCode?default("000")}-${telecomNumber.contactNumber?default("000-0000")} <#if partyContactMech.extension?has_content>${uiLabelMap.PartyContactExt} ${partyContactMech.extension} <#if (telecomNumber?has_content && !telecomNumber.countryCode?has_content) || telecomNumber.countryCode = "011"> ${uiLabelMap.CommonLookupAnywho} ${uiLabelMap.CommonLookupWhitepages}
<#elseif "EMAIL_ADDRESS" = contactMech.contactMechTypeId>
${contactMech.infoString?if_exists} <#--a href="<@ofbizUrl>EditCommunicationEvent?partyIdFrom=${userLogin.partyId}&partyIdTo=${partyId}&communicationEventTypeId=EMAIL_COMMUNICATION&contactMechIdTo=${contactMech.contactMechId}&contactMechTypeId=EMAIL_ADDRESS<#if thisUserPrimaryEmail?has_content>&contactMechIdFrom=${thisUserPrimaryEmail.contactMechId}" class="buttontext">${uiLabelMap.CommonSendEmail}
<#elseif "WEB_ADDRESS" = contactMech.contactMechTypeId>
${contactMech.infoString?if_exists} <#assign openAddress = contactMech.infoString?default("")> <#if !openAddress?starts_with("http") && !openAddress?starts_with("HTTP")><#assign openAddress = "http://" + openAddress> ${uiLabelMap.CommonOpenPageNewWindow}
<#else>
${contactMech.infoString?if_exists}
(${uiLabelMap.CommonUpdated}: ${partyContactMech.fromDate})
<#if partyContactMech.thruDate?has_content>
${uiLabelMap.PartyContactEffectiveThru}: ${partyContactMech.thruDate}
<#-- create cust request --> <#if custRequestTypes?exists>
(${partyContactMech.allowSolicitation?if_exists}) <#--if security.hasEntityPermission("PARTYMGR", "_UPDATE", session) || userLogin.partyId == partyId> ${uiLabelMap.CommonUpdate} <#if security.hasEntityPermission("PARTYMGR", "_DELETE", session) || userLogin.partyId == partyId>
<#else> ${uiLabelMap.PartyNoContactInformation}