<?php

use backend\models\MasterSkema;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\grid\ActionColumn;
use yii\grid\GridView;

/** @var yii\web\View $this */
/** @var backend\models\MasterSkemaSearch $searchModel */
/** @var yii\data\ActiveDataProvider $dataProvider */

$this->title = 'Master Skemas';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="master-skema-index">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a('Create Master Skema', ['create'], ['class' => 'btn btn-success']) ?>
    </p>

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

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'SKEMA_UUID',
            'SKEMA_NOMOR',
            'SKEMA_NAMA',
            'SKEMA_JENIS',
            'SKEMA_BIAYA',
            //'CREATED',
            //'USERNAME',
            [
                'class' => ActionColumn::className(),
                'urlCreator' => function ($action, MasterSkema $model, $key, $index, $column) {
                    return Url::toRoute([$action, 'SKEMA_UUID' => $model->SKEMA_UUID]);
                 }
            ],
        ],
    ]); ?>


</div>
