<?php

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

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

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

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

    <p>
        <?= Html::a('Create Master Syarat', ['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',
            'MASSYA_ID',
            'MASSYA_UUID',
            'MASSYA_SYARAT',
            'MASSYA_ISI',
            //'CREATED',
            //'USERNAME',
            [
                'class' => ActionColumn::className(),
                'urlCreator' => function ($action, MasterSyarat $model, $key, $index, $column) {
                    return Url::toRoute([$action, 'MASSYA_ID' => $model->MASSYA_ID]);
                 }
            ],
        ],
    ]); ?>


</div>
