File size: 841B
<div class="post" id="post-<?= $data->id ?>">
<div class="inline_actions">
<?php if (Yii::app()->user->checkAccess('groups.post.updatePost')): ?>
<?= CHtml::link(Theme::icon(Theme::ICON_IEDIT), array('post/update', 'id' => $data->id)) ?>
<?php endif; ?>
<?php if (Yii::app()->user->checkAccess('groups.post.deletePost')): ?>
<?= CHtml::link(Theme::icon(Theme::ICON_IDELETE), array('post/confirm', 'id' => $data->id)) ?>
<?php endif; ?>
</div>
<?= CHtml::link(CHtml::tag('span', array('class' => 'datetime'), '#'.($index + 1)), '#post-'.$data->id) ?>
<strong><?= CHtml::link($data->author->name, array('/users/user', 'id' => $data->author_id)) ?></strong><br />
<?= nl2br(CHtml::encode($data->text)) ?><br />
<span class="datetime"><?= Yii::app()->dateFormatter->formatDateTimeReadable($data->created_at) ?></span>
</div>