<?php
if(!$this->contact){ echo $this->translate('#missing contact#'); return; }
$contact = $this->contact;

if(!isset($this->class))
	$class = '';
else
	$class = ' '.$this->class;
?>
<div class="vcard<?= $class ?>">


<?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 else: ?>
<div class="fn"><?= !empty($contact->translation()->label)?$contact->translation()->label:$contact->nickname; ?></div>
<?php endif;?>


<?php if(!empty($contact->address) && !empty($contact->locality)):?>
<div class="adr">
	<span class="street-address"><?= $contact->address . ', ' . $contact->number ?></span>
	<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->email)):?>
<a href="mailto:<?= $contact->email ?>" class="email"><?= $contact->email ?></a>
<?php endif; ?>

<?php if(!empty($contact->phone)):?>
<div class="tel">
	<span class="type phone">Tel.</span>
	<span class="value"><?= $contact->phone ?></span>
</div>
<?php endif;?>
<?php if(!empty($contact->fax)):?>
<div class="tel">
	<span class="type fax">Fax.</span>
	<span class="value"><?= $contact->fax ?></span>
</div>
<?php endif;?>
<?php if(!empty($contact->mobile)):?>
<div class="tel">
	<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">
	<span class="type tax"><?= $this->translate('#tva##')?></span>
	<span class="value"><?= $contact->tax ?></span>
</div>
<?php endif; ?>

</div>

