index.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\grid\GridView;
  4. /* @var $this yii\web\View */
  5. /* @var $searchModel backend\models\search\LeaveSearch */
  6. /* @var $dataProvider yii\data\ActiveDataProvider */
  7. $this->title = Yii::t('common', 'Leaves');
  8. $this->params['breadcrumbs'][] = $this->title;
  9. ?>
  10. <?php $this->beginBlock('content-header') ?>
  11. <?= $this->title ?>
  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. 'user_id:user',
  21. 'title',
  22. 'created_at:datetime',
  23. [
  24. 'class' => 'backend\widgets\grid\SwitcherColumn',
  25. 'attribute' => 'status'
  26. ],
  27. [
  28. 'class' => 'common\helpers\DiyActionColumn',
  29. 'template' => '{delete}',
  30. ]
  31. ],
  32. ]); ?>
  33. </div>
  34. </div>