Размер файла: 1.23Kb
<div class="post">
<?php if ($type == 'incoming'): ?>
<?= CHtml::image(Yii::app()->baseUrl.'/images/inbox.png', 'incoming request', array('class' => 'favicon_image')) ?>
<strong><?= Yii::t('Users', '{user} wants to be your friend.', array('{user}' => CHtml::link(CHtml::encode($data->user->name), array('/users/user/index', 'id' => $data->user->id)))) ?></strong><br />
<?php if (!empty($data->request_message)): ?>
<?= CHtml::encode($data->request_message) ?><br />
<?php endif; ?>
<strong><?= CHtml::link(Yii::t('Users', 'Add'), array('addToFriends', 'user' => $data->user->id)) ?> | <?= CHtml::link(Yii::t('Users', 'Refuse'), array('deleteFromFriends', 'user' => $data->user->id)) ?></strong>
<?php else: ?>
<?= CHtml::image(Yii::app()->baseUrl.'/images/outbox.png', 'outgoing request', array('class' => 'favicon_image')) ?>
<strong><?= CHtml::link(CHtml::encode($data->friend->name), array('/users/user/index', 'id' => $data->friend->id)) ?></strong><br />
<?php if (!empty($data->request_message)): ?>
<?= CHtml::encode($data->request_message) ?><br />
<?php endif; ?>
<strong><?= CHtml::link(Yii::t('Users', 'Cancel request'), array('deleteFromFriends', 'user' => $data->friend->id)) ?></strong>
<?php endif; ?>
</div>