title;
$this->title = $type->plural . ' > ' . $title;
$this->params['breadcrumbs'][] = ['label' => Yii::t('post', $type->plural), 'url' => ['index', 'tid' => $type->id]];
$this->params['breadcrumbs'][] = $type->singular;
?>
= Html::a(Yii::t('post', 'All Posts'), ['index', 'tid' => $type->id], ['class' => 'btn btn-default']) ?>
isActive()): ?>
= Html::a(Yii::t('post', 'Draft'), ['draft', 'id' => $post->id], ['class' => 'btn btn-primary', 'data-method' => 'post']) ?>
= Html::a(Yii::t('post', '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' => PostHelper::statusLabel($post->status),
'format' => 'raw',
],
'title',
[
'attribute' => 'category_id',
'value' => ArrayHelper::getValue($post, 'category.name'),
],
[
'label' => Yii::t('post', 'Tags'),
'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('https://i.ytimg.com/vi/' . PostHelper::parseYoutubeUrl($post->video) . '/maxresdefault.jpg', [
'width' => 300,
'class' => 'thumbnail',
]) ?>
video): ?>
= 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,
],
],
]) ?>