echo CHtml::link(Yii::t('app', 'Message'), array('message/thread', 'recipient' => $user->id), array('class' => 'message')); } ?> </div> <?php } $this->endWidget(); ?> <a id="notifications"></a> <?php $this->renderPartial('_notifications', array('userId' => $user->id, 'onlyUnviewed' => true)); $this->beginWidget('application.widgets.OuterBoxWidget', array('class' => 'recent-contributions feed', 'title' => Yii::t('app', 'Recent Contributions'))); ?> <ul class="posts"> <?php $contributionLogs = RecordOperationLog::model()->findAll(array('condition' => 'user_id = :user_id AND model = :model AND action = :action', 'params' => array(':user_id' => $user->id, ':model' => get_class(Post::model()), ':action' => RecordOperationLog::INSERT), 'order' => 'time DESC', 'limit' => Yii::app()->params['userProfile']['numberOfRecentContributions'])); ?> <?php foreach ($contributionLogs as $contributionLog) { ?> <?php $post = Post::model()->findByPk($contributionLog->model_id); if (!$post) { continue; } else { if ($post->feed->region) { $url = array('/resource/list', 'id' => $post->feed->region->id, '#' => 'post-' . $post->id); $feedName = $post->feed->region->name; $feedUrl = $this->createUrl('/resource/list', array('region' => $post->feed->region->id)); } else { if ($post->feed->location) {