File size: 1.12Kb
<?php
$this->pageHeader = $this->pageTitle = Yii::t('Users', 'Friends');
?>
<?php if (max($incomingRequestsCount, $outgoingRequestsCount) > 0): ?>
<div class="blue_block">
<?php if ($incomingRequestsCount > 0): ?>
<?= CHtml::image(Yii::app()->baseUrl.'/images/friends.png', 'friends', array('class' => 'favicon_image')) ?>
<?= CHtml::link(Yii::t('Users', '{n} incoming request|{n} incoming requests', array($incomingRequestsCount)), array('requests', 'type' => 'incoming')) ?><br />
<?php endif; ?>
<?php if ($outgoingRequestsCount > 0): ?>
<?= CHtml::image(Yii::app()->baseUrl.'/images/friends.png', 'friends', array('class' => 'favicon_image')) ?>
<?= CHtml::link(Yii::t('Users', '{n} outgoing request|{n} outgoing requests', array($outgoingRequestsCount)), array('requests', 'type' => 'outgoing')) ?><br />
<?php endif; ?>
</div>
<?php endif; ?>
<?php $this->widget('zii.widgets.CListView', array(
'dataProvider' => $friends,
'itemView' => '_friend',
'template' => "{items}\n{pager}",
'viewData' => array('user' => $user),
'emptyText' => CHtml::tag('div', array('class' => 'text'), Yii::t('Users', 'No friends found')),
)); ?>