<#-- 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 extInfo = parameters.extInfo?default("N")>

<#if parameters.hideFields?default("N") != "Y">
<#-- NOTE: this form is setup to allow a search by partial partyId or userLoginId; to change it to go directly to the viewprofile page when these are entered add the follow attribute to the form element: onsubmit="javascript:lookupparty('<@ofbizUrl>viewprofile');" -->
<#if extInfo == "P"> <#if extInfo == "T"> <#if extInfo == "O">
${uiLabelMap.PartyContactInformation}        
${uiLabelMap.PartyPartyId} <@htmlTemplate.lookupField value='${requestParameters.partyId!}' formName="lookupparty" name="partyId" id="partyId" fieldFormName="LookupPerson"/>
${uiLabelMap.PartyUserLogin}
${uiLabelMap.PartyLastName}
${uiLabelMap.PartyFirstName}

${uiLabelMap.CommonAddress1}
${uiLabelMap.CommonAddress2}
${uiLabelMap.CommonCity}
${uiLabelMap.CommonStateProvince}
${uiLabelMap.PartyPostalCode}

${uiLabelMap.CommonCountryCode}
${uiLabelMap.PartyAreaCode}
${uiLabelMap.PartyContactNumber}

${uiLabelMap.PartyContactInformation}

  ${uiLabelMap.CommonShowAllRecords}
<#if parameters.hideFields?default("N") != "Y"> <#if partyList??>

<#if partyList?has_content> <#if extInfo?default("") == "P" > <#if extInfo?default("") == "P"> <#if extInfo?default("") == "T"> <#assign alt_row = false> <#list partyList as partyRow> <#assign partyType = partyRow.getRelatedOne("PartyType", false)!> class="alternate-row"> <#if extInfo?default("") == "T"> <#if extInfo?default("") == "P" > <#if extInfo?default("") == "P"> <#-- toggle the row color --> <#assign alt_row = !alt_row>
${uiLabelMap.PartyPartyId} ${uiLabelMap.PartyUserLogin} ${uiLabelMap.PartyName}${uiLabelMap.PartyCity} ${uiLabelMap.PartyPostalCode} ${uiLabelMap.PartyAreaCode} ${uiLabelMap.PartyType}  
${partyRow.partyId} <#if partyRow.containsKey("userLoginId")> ${partyRow.userLoginId?default("N/A")} <#else> <#assign userLogins = partyRow.getRelated("UserLogin", null, null, false)> <#if (userLogins.size() > 0)> <#if (userLogins.size() > 1)> (${uiLabelMap.CommonMany}) <#else> <#assign userLogin = userLogins.get(0)> ${userLogin.userLoginId} <#else> (${uiLabelMap.CommonNone}) <#if partyRow.getModelEntity().isField("lastName") && lastName?has_content> ${partyRow.lastName}<#if partyRow.firstName?has_content>, ${partyRow.firstName} <#elseif partyRow.getModelEntity().isField("groupName") && partyRow.groupName?has_content> ${partyRow.groupName} <#else> <#assign partyName = Static["org.apache.ofbiz.party.party.PartyHelper"].getPartyName(partyRow, true)> <#if partyName?has_content> ${partyName} <#else> (${uiLabelMap.PartyNoNameFound}) ${partyRow.areaCode!} ${partyRow.city!}, ${partyRow.stateProvinceGeoId!} ${partyRow.postalCode!} <#if partyType.description??>${partyType.get("description", locale)}<#else>??? ${uiLabelMap.CommonDetails}
<#else>
${uiLabelMap.PartyNoPartiesFound}
<#if lookupErrorMessage??>

${lookupErrorMessage}