index.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\grid\GridView;
  4. /* @var $this yii\web\View */
  5. /* @var $searchModel backend\models\search\CircleCatSearch */
  6. /* @var $dataProvider yii\data\ActiveDataProvider */
  7. $this->title = Yii::t('common', 'Circle Cats');
  8. $this->params['breadcrumbs'][] = $this->title;
  9. ?>
  10. <?php $this->beginBlock('content-header') ?>
  11. <?= $this->title . ' ' . Html::a(Yii::t('common', 'Create Circle Cat'), ['create'], ['class' => 'btn btn-success']) ?>
  12. <?php $this->endBlock() ?>
  13. <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
  14. <div class="box box-success">
  15. <div class="box-body">
  16. <?= GridView::widget([
  17. 'dataProvider' => $dataProvider,
  18. 'filterModel' => $searchModel,
  19. 'columns' => [
  20. 'id',
  21. 'title',
  22. 'slug',
  23. // 'pid',
  24. // 'created_at',
  25. // 'updated_at',
  26. 'description',
  27. [
  28. 'class' => 'backend\widgets\grid\PositionColumn',
  29. 'attribute' => 'sort'
  30. ],
  31. [
  32. 'class' => 'backend\widgets\grid\SwitcherColumn',
  33. 'attribute' => 'status'
  34. ],
  35. [
  36. 'class' => 'common\helpers\DiyActionColumn',
  37. 'template' => '{update} {delete}',
  38. ]
  39. ],
  40. ]); ?>
  41. </div>
  42. </div>