<?php

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

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

$this->title = 'Master Kompetensi Units';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="master-kompetensi-unit-index">

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

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

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

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

            'MASKOM_UUID',
            'MASKOMU_UUID',
            'MASKOMU_URUT',
            'MASKOMU_ELEMEN:ntext',
            'MASKOMU_KRITERIA:ntext',
            //'CREATED',
            //'USERNAME',
            [
                'class' => ActionColumn::className(),
                'urlCreator' => function ($action, MasterKompetensiUnit $model, $key, $index, $column) {
                    return Url::toRoute([$action, 'MASKOMU_UUID' => $model->MASKOMU_UUID]);
                 }
            ],
        ],
    ]); ?>


</div>
