<?php $cs = Yii::app()->clientScript; $cs->registerScriptFile('/js/social/friends.js'); $users_status = Friend::getUsersStatus($model->id, Yii::app()->user->id); ?> <div class='profile-head'> <?php echo $model->getPhotoHtml(User::PHOTO_SIZE_BIG); ?> <h1><?php echo $model->name; ?> </h1> <div class="label <?php echo $model->rating_css_class; ?> ">рейтинг <?php echo $model->rating; ?> </div> </div> <br clear="all" /> <div style="clear:left;margin-top: 10px !important;margin-bottom: 5px;"> <?php if (!Yii::app()->user->isGuest && Yii::app()->user->id != $model->id) { ?> <?php
echo $data->rating_css_class; ?> " style="float: right;">рейтинг <?php echo $data->rating; ?> </span> <?php echo $data->link; ?> <br/> <?php if (!Yii::app()->user->isGuest && Yii::app()->user->id != $data->id) { ?> <?php switch (Friend::getUsersStatus(Yii::app()->user->id, $data->id)) { case Friend::USERS_STATUS_FRIENDS: $users_status = "<span class='badge badge-small'>" . t('У Вас в друзьях') . "</span>"; break; case Friend::USERS_STATUS_NOT_FRIENDS: $users_status = CHtml::button(t('добавить в друзья'), array('class' => 'btn btn-mini add-friend-btn', 'friend_id' => $data->id)); break; case Friend::USERS_STATUS_USER_A_WAITING: $users_status = "<span class='badge badge-small'>" . t('Вы подали заявку в друзья') . "</span>"; break; case Friend::USERS_STATUS_USER_B_WAITING: $users_status = "<span class='badge badge-small'>" . t('Подал заявку к вам в друзья') . "</span> "; $users_status .= CHtml::button(t('принять'), array('class' => 'btn btn-mini confirm-friend-btn btn-success', 'friend_id' => $data->id)); break; } ?>