<!--show_tags2
	<span id="the_tags">
        [%=render_partial('static_tags2',{tags:tags,is_editing:false});%]
    </span>
    <span class="add-tags hide">
        [%=render_partial('deletable_tags2',{tags:tags,is_editing:false});%]
    </span>
-->
<!--static_tags2
	<ul class="static-tags">[%
    if(tags!=null && tags.tag!=null && tags.tag.length!=0){
        if(tags.tag.length>0){
        $.each(tags.tag,function(i,n){
            %]<li><span>[%=n.label%]</span></li>[%
        });
        %]
            <li><a class="open-tag-edit edit-tags-action" href="#">[%=resource_string('action.contacts.index.edittags')%]</a></li>
        [%
    }
    }else{
    %]
        <li><a class="open-tag-edit" href="#">[%=resource_string('action.contacts.index.addtags')%]</a></li>
    [%
    }
    %]</ul>   
-->

<!--deletable_tags2
	<ul class="deletable-tags">[%
      if(tags!=null && tags.tag!=null && tags.tag.length!=0){
        $.each(tags.tag,function(i,n){
            %]<li><a href="#" title="delete tag '[%=n.label%]'" rel="[%=n.id%]">[%=n.label%]</a></li>[%
        });
      }%]
      <li class="not-a-tag"><input name="new_tag" type="text"/></li>
     </ul>
     <ul>
     
      <li class="not-a-tag"><a class="add-atag-action" href="#">[%=resource_string('action.contacts.index.addtag')%]</a></li>
      <li class="not-a-tag"><a class="close-tag-action" href="#">[%=resource_string('action.contacts.index.closetag')%]</a></li>
    </ul>
-->

<div class="gen-toolbar toolbar ">

    <ul id="general_toolbar">
        <li><a title="[%=resource_string('action.contacts.index.editcontact')%]" href="#" id="link-contact-edit">[%=resource_string('action.contacts.index.editcontact')%]</a></li>
        <li><a title="[%=resource_string('action.contacts.index.deletecontact')%]" href="#" id="link-contact-delete">[%=resource_string('action.contacts.index.deletecontact')%]</a></li>
    	<li class="export-ui"><a title="[%=resource_string('action.contacts.index.exportcontact')%]" href="/export?exportIds=[%=contact.id%]&format=vcard" id="link-contact-export">[%=resource_string('action.contacts.index.exportcontact')%]</a></li>
    </ul>

	<span class="contact-name">[%=contact.firstName %] [%=contact.lastName %]</span>
         [%
         if(contact.title!='' & contact.title!=null){
             %]<span class="contact-title">[%=contact.title %]</span>[%
         }
         %]

         [% if (contact.companies!=null && contact.companies.company!=null) { %]
         [%
if ((contact.title!='' && contact.title!=null) || (contact.firstName!='' || contact.lastName!='')){
			%]at[%
}
			%]&nbsp;<span class="company-name">[%=contact.companies.company[0].name %]</span>
         [%}%]
 </div>

  <div class="contact-info-header">
  
    <dl>
        

        <dd class="tags">[%=render_partial('show_tags2',{tags:contact.tag,is_editing:false});%]</dd>
        
        <dd class="avatar"><img src="/api/contacts/[%=contact.id%]/avatar" alt="photo" class="photo"/></dd>
    </dl>
  </div>