<%
if(attrs.photo){
imgURL = "../contacts/image.action?cdRequest.contactId="+attrs.contactId+"&version="+attrs.version+"&cdRequest.photoreference="+attrs.photoreference + "&csrf_string=" + csrfToken;
%>

<% }else{ %>
<% } %>
<%if(attrs.favorite){ %>
<%}%>
<%= _.escape(attrs.displayName) %>
<%if(attrs.phones == undefined || attrs.phones.length ===1){%>
<%=attrs.defaultPhone %>
<%}else if(attrs.phones.length !==0){
var preferedNumber="",liElem="",selectedValue,className,phoneType,selectedIcon, currentPhone;
%>
<% for(var phoneCount = 0; phoneCount < attrs.phones.length;phoneCount++){
currentPhone = attrs.phones[phoneCount];
preferedNumber = "";
phoneType = currentPhone.type;
if(phoneCount === 0){
selectedValue = currentPhone.number;
selectedIcon = phoneType === 'business' ? 'dropdown-icon-work' : phoneType === 'mobile' ? 'dropdown-icon-mobile' : 'dropdown-icon-home';
}
if(currentPhone.preference === "2" || currentPhone.number === attrs.defaultPhone){
preferedNumber = "selected";
selectedValue = currentPhone.number;
selectedIcon = phoneType === 'business' ? 'dropdown-icon-work' : phoneType === 'mobile' ? 'dropdown-icon-mobile' : 'dropdown-icon-home';
}
className = phoneType === 'business' ? 'dropdown-icon-work' : phoneType === 'mobile' ? 'dropdown-icon-mobile' : 'dropdown-icon-home';
liElem += "