title = $model->title; $this->params['breadcrumbs'][] = ['label' => 'Document Templates', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; \yii\web\YiiAsset::register($this); ?>
= Html::a('Список', ['index', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> = Html::a('Изменить', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> = Html::a('Удалить', ['delete', 'id' => $model->id], [ 'class' => 'btn btn-danger', 'data' => [ 'confirm' => 'Are you sure you want to delete this item?', 'method' => 'post', ], ]) ?>
= DetailView::widget([ 'model' => $model, 'attributes' => [ 'id', 'title', [ 'attribute' => 'status', 'format' => 'raw', 'value' => StatusHelper::statusLabel($model->status), ], 'created_at', 'updated_at', [ 'attribute' => 'template_body', 'format' => 'raw' ], [ 'attribute' => 'Переменные в шаблоне', 'value' => function(DocumentTemplate $model){ return implode(", ", $model->getFields()); }, ], ], ]) ?>