<?php

use yii\helpers\Html;
use common\widgets\GridView;

/* @var $this yii\web\View */
/* @var $searchModel frontend\models\Dt022dataSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Dt022datas';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="dt022data-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <?= Html::a('Create Dt022data', ['create'], ['class' => 'btn btn-success']) ?>
    </p>
    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'id',
            'item',
            'description',
            'created_at',
            'created_by',
            // 'updated_at',
            // 'updated_by',

            ['class' => 'common\widgets\ActionColumn',
            'template' => '{view}{update}{delete}{undelete}',
  			'buttons' => [
  				'undelete' => function ($url, $model, $key) { return $model->deleted == true ? Html::a('<i class="fa fa-undo"></i>', $url) : '';},
  				'update' => function ($url, $model, $key) {return Html::a('<i class="fa fa-pencil"></i>', $url);},
  				'view' => function ($url, $model, $key) {return Html::a('<i class="fa fa-eye"></i>', $url);},
  				'delete' => function ($url, $model, $key) {return Html::a('<i class="fa fa-trash"></i>', $url, ['data-method' => 'POST']);},
				 ],
            ]
        ],
    ]); ?>
</div>
