index.php 966 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. use yii\grid\GridView;
  3. use yii\helpers\Html;
  4. /* @var $this yii\web\View */
  5. /* @var $dataProvider yii\data\ActiveDataProvider */
  6. $this->title = '配置';
  7. $this->params['breadcrumbs'][] = $this->title;
  8. ?>
  9. <?php $this->beginBlock('content-header') ?>
  10. <?= $this->title . ' ' . Html::a('新建配置', ['create'], ['class' => 'btn btn-success']) ?>
  11. <?php $this->endBlock() ?>
  12. <div class="box box-success">
  13. <div class="box-body">
  14. <?= GridView::widget([
  15. 'dataProvider' => $dataProvider,
  16. 'columns' => [
  17. 'id',
  18. 'name',
  19. 'description',
  20. [
  21. 'attribute' => 'type',
  22. 'value' => function ($model) {
  23. return $model->getTypeList()[$model->type];
  24. },
  25. ],
  26. 'group',
  27. ['class' => 'yii\grid\ActionColumn'],
  28. ],
  29. ]); ?>
  30. </div>
  31. </div>