|
|
|
<?php
|
|
|
|
|
|
|
|
use core\entities\post\PostCategory;
|
|
|
|
use core\entities\post\PostType;
|
|
|
|
use yii\helpers\Html;
|
|
|
|
use yii\widgets\DetailView;
|
|
|
|
|
|
|
|
/* @var $this yii\web\View */
|
|
|
|
/* @var $category PostCategory */
|
|
|
|
/* @var $type PostType */
|
|
|
|
|
|
|
|
$title = $category->name;
|
|
|
|
$this->title = $type->plural . ' > ' . $title;
|
|
|
|
$this->params['breadcrumbs'][] = ['label' => Yii::t('post', 'Categories'), 'url' => ['index', 'tid' => $type->id]];
|
|
|
|
$this->params['breadcrumbs'][] = $title;
|
|
|
|
?>
|
|
|
|
<div class="user-view">
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<?= Html::a(Yii::t('post', 'Categories'), ['index', 'tid' => $type->id], ['class' => 'btn btn-default']) ?>
|
|
|
|
<?= Html::a(Yii::t('buttons', 'Edit'), ['update', 'id' => $category->id], ['class' => 'btn btn-primary']) ?>
|
|
|
|
<?= Html::a(Yii::t('buttons', 'Delete'), ['delete', 'id' => $category->id], [
|
|
|
|
'class' => 'btn btn-danger',
|
|
|
|
'data' => [
|
|
|
|
'confirm' => Yii::t('buttons', 'Are you sure you want to delete this item?'),
|
|
|
|
'method' => 'post',
|
|
|
|
],
|
|
|
|
]) ?>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<div class="box">
|
|
|
|
<div class="box-header with-border"><?= Yii::t('post', 'Common') ?></div>
|
|
|
|
<div class="box-body">
|
|
|
|
<?= DetailView::widget([
|
|
|
|
'model' => $category,
|
|
|
|
'attributes' => [
|
|
|
|
'id',
|
|
|
|
'name',
|
|
|
|
'slug',
|
|
|
|
'title',
|
|
|
|
'sort',
|
|
|
|
],
|
|
|
|
]) ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="box">
|
|
|
|
<div class="box-header with-border"><?= Yii::t('post', 'Description') ?></div>
|
|
|
|
<div class="box-body">
|
|
|
|
<?= Yii::$app->formatter->asHtml($category->description, [
|
|
|
|
'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/)%',
|
|
|
|
]) ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="box">
|
|
|
|
<div class="box-header with-border"><?= Yii::t('post', 'SEO') ?></div>
|
|
|
|
<div class="box-body">
|
|
|
|
<?= DetailView::widget([
|
|
|
|
'model' => $category,
|
|
|
|
'attributes' => [
|
|
|
|
'meta.title',
|
|
|
|
'meta.description',
|
|
|
|
'meta.keywords',
|
|
|
|
],
|
|
|
|
]) ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|