title;
$this->title = $title;
$this->params['breadcrumbs'][] = ['label' => Yii::t('blog', 'Posts'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $title;
?>
= Html::a(Yii::t('blog', 'All Posts'), ['index'], ['class' => 'btn btn-default']) ?>
isActive()): ?>
= Html::a(Yii::t('blog', 'Draft'), ['draft', 'id' => $post->id], ['class' => 'btn btn-primary', 'data-method' => 'post']) ?>
= Html::a(Yii::t('blog', 'Activate'), ['activate', 'id' => $post->id], ['class' => 'btn btn-success', 'data-method' => 'post']) ?>
= Html::a(Yii::t('buttons', 'Edit'), ['update', 'id' => $post->id], ['class' => 'btn btn-primary']) ?>
= Html::a(Yii::t('buttons', 'Delete'), ['delete', 'id' => $post->id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => Yii::t('buttons', 'Are you sure you want to delete this item?'),
'method' => 'post',
],
]) ?>
= DetailView::widget([
'model' => $post,
'attributes' => [
'id',
[
'attribute' => 'status',
'value' => BlogPostHelper::statusLabel($post->status),
'format' => 'raw',
],
'title',
[
'attribute' => 'category_id',
'value' => ArrayHelper::getValue($post, 'category.name'),
],
[
'label' => Yii::t('post', 'Tags'),
'format' => 'raw',
'value' => ' ' . implode(' ', ArrayHelper::getColumn($post->tags, 'name')),
],
],
]) ?>
image): ?>
= Html::img($post->getThumbFileUrl('image', 'thumb_gallery_view'), [
'class' => 'thumbnail',
'width' => 300,
]) ?>
image && $post->video): ?>
= Html::img(\core\helpers\VideoHelper::getThumb($post->video), [
'width' => 300,
'class' => 'thumbnail',
]) ?>
video): ?>
= \core\widgets\VideoWidget::widget([
'src' => $post->video,
'style' => '',
]) ?>
= Yii::$app->formatter->asNtext($post->description) ?>
= Yii::$app->formatter->asHtml($post->content, [
'Attr.AllowedRel' => array('nofollow'),
'HTML.SafeObject' => true,
'Output.FlashCompat' => true,
'HTML.SafeIframe' => true,
'URI.SafeIframeRegexp'=>'%^(https?:)?//(www\.youtube(?:-nocookie)?\.com/embed/|player\.vimeo\.com/video/)%',
]) ?>
= DetailView::widget([
'model' => $post,
'attributes' => [
[
'attribute' => 'meta.title',
'value' => $post->meta->title,
],
[
'attribute' => 'meta.description',
'value' => $post->meta->description,
],
[
'attribute' => 'meta.keywords',
'value' => $post->meta->keywords,
],
],
]) ?>
-
revision_id): ?>
= date('d.m.Y H:i', $item->revision_at) ?>
→
= Html::a(Yii::t('blog', 'View'), \yii\helpers\Url::to(Yii::$app->get('frontendUrlManager')->createAbsoluteUrl(['/blog/post/preview', 'id' => $item->id])), [
'style' => 'font-size:11px;',
'target' => '_blank',
]) ?>
|
= Html::a(Yii::t('blog', 'Restore'), ['/blog/manage/post/restore-history', 'id' => $item->id], [
'style' => 'font-size:11px; color: red',
'data' => [
'confirm' => Yii::t('blog', 'Are you sure you want to restore this history item?'),
'method' => 'post',
],
]) ?>
= Yii::t('blog', 'Current Edition') ?>
= Html::a(Yii::t('blog', 'Clear History'), ['/blog/manage/post/clear-history', 'id' => $post->id], [
'class' => 'btn btn-danger btn-sm pull-right',
'data' => [
'confirm' => Yii::t('blog', 'Are you sure you want to remove this history?'),
'method' => 'post',
],
]) ?>
= Yii::t('blog', 'History is empty') ?>