Размер файла: 1.09Kb
<div class="post" id="post-<?= $data->id ?>">
<div class="inline_actions">
<?php if (Yii::app()->user->checkAccess('forums.post.updatePost') || Yii::app()->user->checkAccess('author', array('author' => $data->author_id))): ?>
<?= CHtml::link(Theme::icon(Theme::ICON_IEDIT), array('post/update', 'id' => $data->id)) ?>
<?php endif; ?>
<?php if (!empty($data->update_datetime) && (Yii::app()->user->checkAccess('forums.post.seeHistory'))): ?>
<?= CHtml::link('[h]', array('post/history', 'id' => $data->id)) ?>
<?php endif; ?>
<?php if (Yii::app()->user->checkAccess('forums.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>