File size: 0.98Kb
<div class="post" id="post-<?= $data->id ?>">
<div class="inline_actions">
<?php if (Yii::app()->user->checkAccess('publics.post.updatePost') || Yii::app()->user->checkAccess('author', array('model' => $data))): ?>
<?= CHtml::link(CHtml::image(Yii::app()->baseUrl.'/images/iedit.png', 'edit', array('class' => 'favicon_image')), array('post/update', 'id' => $data->id)) ?>
<?php endif; ?>
<?php if (Yii::app()->user->checkAccess('publics.post.deletePost')): ?>
<?= CHtml::link(CHtml::image(Yii::app()->baseUrl.'/images/idelete.png', 'delete', array('class' => 'favicon_image')), array('post/confirm', 'id' => $data->id)) ?>
<?php endif; ?>
</div>
<strong><?= CHtml::link($data->public->name, array('index', 'id' => $data->public_id)) ?></strong><br />
<?= nl2br(CHtml::encode($data->text)) ?><br />
<?= CHtml::link(CHtml::tag('span', array('class' => 'datetime'), Yii::app()->dateFormatter->formatDateTimeReadable($data->created_at)), array('post/index', 'id' => $data->id)) ?>
</div>