<?php

$keys = array(
    $model->facebook_profile_url,
    $model->twitter_profile_url,
    $model->google_profile_url,
    $model->xing_profile_url,
    $model->linkedin_profile_url,
    $model->contact_note
);

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

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

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

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

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

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

if ($model->contact_note) {
    echo "<li>";
    echo "<h2>" . $model->getAttributeLabel('contact_note') . "</h2>";
    echo "</li>";

    echo "<li>";
    echo $model->contact_note;
    echo "</li>";
}