<?php

if (!empty($model->tel_work)) {
    echo "<li>";
    echo $model->tel_work;
    echo "<div class='callPhoneNumber'>";
    echo "<a href='tel:$model->tel_work'><i class='icon-phone' style='font-size:30px'></i></a>";
    echo "</div>";
    echo "<div class='addressKey'><p>" . $model->getAttributeLabel('tel_work') . "</p></div>";
    echo "</li>";
}

if (!empty($model->tel_cell)) {
    echo "<li>";
    echo $model->tel_cell;
    echo "<div class='callPhoneNumber'>";
    echo "<a href='tel:$model->tel_cell'><i class='icon-phone' style='font-size:30px'></i></a>";
    echo "</div>";
    echo "<div class='addressKey'><p>" . $model->getAttributeLabel('tel_cell') . "</p></div>";
    echo "</li>";
}

if (!empty($model->tel_fax)) {
    echo "<li>";
    echo $model->tel_fax;
    echo "<div class='addressKey'><p>" . $model->getAttributeLabel('tel_fax') . "</p></div>";
    echo "</li>";
}

if (!empty($model->contact_email)) {
    
    
    echo "<li>";
    echo "<div class='callPhoneNumber'>";
    echo "<a href='mailto:$model->contact_email'><i class='icon-envelope-alt' style='font-size:30px'></i></a>";
    echo "</div>";
    echo $model->contact_email;
    echo "<div class='addressKey'><p>" . $model->getAttributeLabel('contact_email') . "</p></div>";
    echo "</li>";
}

$keys = array(
    $model->tel_home,
    $model->tel_cell_private,
    $model->tel_fax_home,
    $model->contact_email_home,
    $model->contact_url_home
);

if (!empty(array_sum($keys))) {

    echo "<li>";
    echo "<h2>" . __('ADDRESSESS_FORM_HEADER_PRIVATE') . "</h2>";
    echo "</li>";
}

if (!empty($model->tel_home)) {
    echo "<li>";
    echo $model->tel_home;
    echo "<div class='callPhoneNumber'>";
    echo "<a href='tel:$model->tel_home'><i class='icon-phone' style='font-size:30px'></i></a>";
    echo "</div>";
    echo "<div class='addressKey'><p>" . $model->getAttributeLabel('tel_home') . "</p></div>";
    echo "</li>";
}

if (!empty($model->tel_cell_private)) {
    echo "<li>";
    echo $model->tel_cell_private;
    echo "<div class='callPhoneNumber'>";
    echo "<a href='tel:$model->tel_cell_private'><i class='icon-phone' style='font-size:30px'></i></a>";
    echo "</div>";
    echo "<div class='addressKey'><p>" . $model->getAttributeLabel('tel_cell_private') . "</p></div>";
    echo "</li>";
}

if (!empty($model->tel_fax_home)) {
    echo "<li>";
    echo $model->tel_fax_home;
    echo "<div class='addressKey'><p>" . $model->getAttributeLabel('tel_fax_home') . "</p></div>";
    echo "</li>";
}

if (!empty($model->contact_email_home)) {
    echo "<li>";
    echo "<div class='callPhoneNumber'>";
    echo "<a href='mailto:$model->contact_email_home'><i class='icon-envelope-alt' style='font-size:30px'></i></a>";
    echo "</div>";
    echo $model->contact_email_home;
    echo "<div class='addressKey'><p>" . $model->getAttributeLabel('contact_email_home') . "</p></div>";
    echo "</li>";
}

if (!empty($model->contact_url_home)) {
    echo "<li>";
    echo "<a href='".$model->contact_url_home. "' target='_blank'  >";
    echo $model->contact_url_home;
    echo "<div class='addressKey'><p>" . $model->getAttributeLabel('contact_url_home') . "</p></div>";
    echo "</a>";
    echo "</li>";
}