2022-11-08 18:01:42 +03:00
|
|
|
<?php
|
|
|
|
|
2022-11-10 16:00:43 +03:00
|
|
|
use common\helpers\StatusHelper;
|
2022-11-08 18:01:42 +03:00
|
|
|
use yii\helpers\Html;
|
|
|
|
use yii\grid\GridView;
|
|
|
|
|
|
|
|
/* @var $this yii\web\View */
|
|
|
|
/* @var $searchModel backend\modules\document\models\DocumentTemplateSearch */
|
|
|
|
/* @var $dataProvider yii\data\ActiveDataProvider */
|
|
|
|
|
2022-11-10 16:00:43 +03:00
|
|
|
$this->title = 'Шаблоны документов';
|
2022-11-08 18:01:42 +03:00
|
|
|
$this->params['breadcrumbs'][] = $this->title;
|
|
|
|
?>
|
|
|
|
<div class="document-template-index">
|
|
|
|
|
|
|
|
<p>
|
2022-11-10 16:00:43 +03:00
|
|
|
<?= Html::a('Создать шаблон', ['create'], ['class' => 'btn btn-success']) ?>
|
2022-11-08 18:01:42 +03:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<?= GridView::widget([
|
|
|
|
'dataProvider' => $dataProvider,
|
|
|
|
'filterModel' => $searchModel,
|
|
|
|
'columns' => [
|
|
|
|
['class' => 'yii\grid\SerialColumn'],
|
|
|
|
|
|
|
|
'title',
|
2022-11-10 16:00:43 +03:00
|
|
|
[
|
|
|
|
'attribute' => 'status',
|
|
|
|
'format' => 'raw',
|
|
|
|
'filter' => StatusHelper::statusList(),
|
|
|
|
'value' => function($model){
|
|
|
|
return StatusHelper::statusLabel($model->status);
|
|
|
|
}
|
|
|
|
],
|
|
|
|
|
|
|
|
'created_at',
|
|
|
|
//'updated_at',
|
|
|
|
// 'template_body:ntext',
|
2022-11-08 18:01:42 +03:00
|
|
|
|
|
|
|
['class' => 'yii\grid\ActionColumn'],
|
|
|
|
],
|
|
|
|
]); ?>
|
|
|
|
</div>
|