<?php

$keys = array(
    $model->org_unit,
    $model->contact_role,
    $model->contact_room,
    $model->contact_url,
    $model->tel_assistent
);

if (!empty(array_sum($keys))) {
    echo "<li>";
    echo "<h2>" . __('ADDRESSESS_FORM_HEADER_BUSINESS') . "</h2>";
    echo "</li>";
}

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

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

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

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

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