<?php
if(isset($this->entry))
	$contact = $this->entry;
else
	$contact = $this->contact;

$contactLabel = !empty($contact->translation()->label)?$contact->translation()->label:$contact->nickname;
?>
<address id="vcard-<?= $contact->id ?>" class="vcard <?= $this->partialCounter%2==0?'':'first' ?>" data-gps="<?= $contact->gps?>" >
<?php if(!empty( $contact->logo )): ?>
<div class="logo"><img src="<?= $contact->logo ?>" alt="<?= $contactLabel ?>" /></div>
<?php endif; ?>
<div class="fn"><?= $contactLabel ?></div>

<?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>
	(<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->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->comment)):?>
<div class="comment">
<?= $contact->comment ?></a>
</div>
<?php endif; ?>



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