social_list.php 1.16 KB
<?php
use yii\helpers\Html;
    use yii\helpers\Url;

    if(!empty($params['company'])) {
        $type = 'company';
    } elseif(!empty($params['user'])) {
        $type = 'user';
    }
?>
<div class="performer-vacancy-sidebar-soc style">
    <ul>
        <?php if(!empty($params[$type]->userInfo->social_fb)){?>
        <li>
            <?= Html::a(Html::img('/images/ico-fb.png'),$params[$type]->userInfo->social_fb,['target'=>'_blank']); ?>
        </li>
        <?php } ?>

        <?php if(!empty($params[$type]->userInfo->social_t)){?>
        <li>
            <?= Html::a(Html::img('/images/ico-tw.png'),$params[$type]->userInfo->social_t,['target'=>'_blank']); ?>
        </li>
        <?php } ?>

        <?php if(!empty($params[$type]->userInfo->social_in)){?>
        <li>
            <?= Html::a(Html::img('/images/ico-in.png'),$params[$type]->userInfo->social_in,['target'=>'_blank']); ?>
        </li>
        <?php } ?>

        <?php if(!empty($params[$type]->userInfo->social_vk)){?>
        <li>
            <?= Html::a(Html::img('/images/ico-vk.png'),$params[$type]->userInfo->social_vk,['target'=>'_blank']); ?>
        </li>
        <?php } ?>
    </ul>
</div>