<?php
if(isset($this->entry))
	$contact = $this->entry;
else
	$contact = $this->contact;
?>
<article id="ct<?= $contact->id?>" class="vcard <?= $this->partialCounter%2==1?'':'first' ?><?= $contact->isDefault==1?'first default':'' ?>" alfred:gps="<?= $contact->gps ?>">
<?php if((!isset($this->showMap) || $this->showMap == true ) && !empty($contact->gps)):
	echo $this->map(array('containerStyle'=>''))->simple($contact->gps);
endif;?>
<h3 class="fn"><?= !empty($contact->translation()->label)?$contact->translation()->label:$contact->nickname; ?></h3>

<?php if(!empty($contact->name)):?>
<div class="n">
	<?php if(!empty($contact->title)):?><span class="honorific-prefix"><?= $contact->title?></span> <?php endif;?>
	<span class="given-name"><?= $contact->firstname ?></span>
	<span class="family-name"><?= $contact->name ?></span>
</div>
<?php endif;?>

<?php if(!empty($contact->function)):?>
<div class="role"><?= $contact->function ?></div>
<?php endif;?>

<?php if(!empty($contact->address) && !empty($contact->locality)):?>
<div class="adr">
	<span class="street-address"><?= $contact->address . ', ' . $contact->number ?></span><br />
	<span class="postal-code"><?= $contact->zipcode?></span> <span class="locality"><?= $contact->locality?></span><br />
	<span class="country-name"><?= Zend_Locale::getTranslation($contact->country,'Country') ?></span>
</div>
<?php
endif;?>

<?php if(!empty($contact->phone)):?>
<div class="tel icon-phone">
	<span class="type phone"><?= $this->translate('#phone#')?></span>
	<span class="value"><?= $contact->phone ?></span>
</div>
<?php endif;?>
<?php if(!empty($contact->fax)):?>
<div class="tel icon-print">
	<span class="type fax"><?= $this->translate('#fax#')?></span>
	<span class="value"><?= $contact->fax ?></span>
</div>
<?php endif;?>
<?php if(!empty($contact->mobile)):?>
<div class="tel icon-phone">
	<span class="type mobile"><?= $this->translate('#mobile#')?></span>
	<span class="value"><?= $contact->mobile ?></span>
</div>
<?php endif;?>
<?php if(!empty($contact->tax)):?>
<div class="tax icon-briefcase">
	<span class="type tax"><?= $this->translate('#tva##')?></span>
	<span class="value"><?= $contact->tax ?></span>
</div>
<?php endif;?>
<?php if(!empty($contact->email)):?>
<div class="mail  icon-envelope">
<a href="mailto:<?= $contact->email ?>" class="email" alfred:id="<?= $contact->id ?>"><?= $contact->email ?></a>
</div>
<?php endif;?> <?php if(!empty($contact->website)):?>
<div class="web icon-link">
<a class="url" href="<?= $contact->website ?>"><?= $contact->website ?></a>
</div>
<?php endif; ?>

<?php /*?><br /><a href="<?= $this->url(array('module'=>'contact','controller'=>'index','action'=>'vcard','id'=>$contact->id)) ?>"
	class="dlVcard"><?= $this->translate('#get as vcard#') ?></a> <?php */ ?>
	<?= $contact->comment ?>
</article>