guild/backend/modules/document/views/document-field/index.php

39 lines
1.0 KiB
PHP
Raw Normal View History

2021-12-27 16:50:17 +03:00
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\document\models\DocumentFieldSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Поля документов';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="document-field-index">
2022-01-07 15:04:11 +03:00
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
2021-12-27 16:50:17 +03:00
<p>
2022-01-07 15:04:11 +03:00
<?= Html::a('Создать новое поле', ['create'], ['class' => 'btn btn-success']) ?>
2021-12-27 16:50:17 +03:00
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'title',
2022-01-07 15:04:11 +03:00
[
'attribute' => 'field_template',
'value' => function($model) {
return '${' . $model->field_template . '}';
},
],
2021-12-27 16:50:17 +03:00
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>