<?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', 'Departments');
$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="departments-index">

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

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

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