593851ec
Alexey Boroda
First commit
|
1
2
|
<?php
|
ee588281
Alexey Boroda
-Blog backend ready
|
3
|
use artbox\weblog\models\Category;
|
593851ec
Alexey Boroda
First commit
|
4
5
6
|
use yii\helpers\Html;
use yii\web\View;
use yii\widgets\DetailView;
|
ee588281
Alexey Boroda
-Blog backend ready
|
7
|
use yiister\gentelella\widgets\Panel;
|
593851ec
Alexey Boroda
First commit
|
8
9
|
/**
|
ee588281
Alexey Boroda
-Blog backend ready
|
10
11
|
* @var View $this
* @var Category $model
|
593851ec
Alexey Boroda
First commit
|
12
13
14
15
16
17
18
19
20
21
22
|
*/
$this->title = $model->lang->title;
$this->params[ 'breadcrumbs' ][] = [
'label' => \Yii::t('blog', 'Blog Categories'),
'url' => [ 'index' ],
];
$this->params[ 'breadcrumbs' ][] = $this->title;
?>
<div class="blog-category-view">
|
ee588281
Alexey Boroda
-Blog backend ready
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
<?php $panel = Panel::begin(
[
'header' => $this->title,
]
); ?>
<p>
<?= Html::a(
'Update',
[
'update',
'id' => $model->id,
],
[ 'class' => 'btn btn-primary' ]
) ?>
<?= Html::a(
'Delete',
[
'delete',
'id' => $model->id,
],
[
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]
) ?>
</p>
|
593851ec
Alexey Boroda
First commit
|
53
54
55
56
57
58
|
<?= DetailView::widget(
[
'model' => $model,
'attributes' => [
'id',
|
ee588281
Alexey Boroda
-Blog backend ready
|
59
|
'lang.title',
|
593851ec
Alexey Boroda
First commit
|
60
|
'sort',
|
593851ec
Alexey Boroda
First commit
|
61
62
|
[
'attribute' => 'parent_id',
|
ee588281
Alexey Boroda
-Blog backend ready
|
63
|
'value' => ( !empty($model->parent) ) ? $model->parent->lang->title : '',
|
593851ec
Alexey Boroda
First commit
|
64
|
],
|
593851ec
Alexey Boroda
First commit
|
65
66
67
68
69
70
71
72
|
'lang.description:text',
[
'attribute' => 'status',
'value' => ( $model->status ) ? \Yii::t('blog', 'Active') : \Yii::t('blog', 'Not active'),
],
],
]
) ?>
|
ee588281
Alexey Boroda
-Blog backend ready
|
73
74
|
<?php $panel::end(); ?>
|
593851ec
Alexey Boroda
First commit
|
75
76
|
</div>
|