<?php

use yii\helpers\Html;
use yii\grid\GridView;
use rmrevin\yii\fontawesome\FA;

/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = Yii::t('app', 'Labmasters');
$this->params['breadcrumbs'][] = $this->title;
$this->params['menu'] = [
	['label' => FA::icon('plus fa-fw'), 'linkOptions' => ['class'=>'btn btn-default', 'title'=>'Create'], 'url' => ['create']],
];
?>
<div class="labmaster-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            // 'lab_id',
            'lab_dept_code',
            'lab_test_code:ntext',
            'lab_test_name:ntext',
            [
				'attribute' => 'lab_spot_test',
				'value' => function($model, $key, $index, $widget) {
					return ($model->lab_spot_test == 1) ? 'Y' : 'N';
				},
			],
            [
				'attribute' => 'status',
				'value' => function($model, $key, $index, $widget) {
					return ($model->status == 1) ? 'Y' : 'N';
				},
			],
            // 'lab_spot_test',
            // 'status',
            // 'del_status',
            // 'create_time:datetime',
            // 'create_user',
            // 'update_time:datetime',
            // 'update_user',

            ['class' => 'app\behaviours\ActionColumns'],
        ],
    ]); ?>
</div>
