 <?php

use yii\helpers\Html;
use kartik\grid\GridView;
use rmrevin\yii\fontawesome\FA;
use yii\widgets\Pjax;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel app\models\AttandanceSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

?>
<div class="enrollstatus-index">

  <?= GridView::widget([
        'dataProvider' => $dataProvider,
		'formatter' => ['class' => 'yii\i18n\Formatter','nullDisplay' => '-', 'dateFormat' => 'dd-MM-Y'],
        'layout' => '<div class="box"><div class="box-header with-border"><b>Cohort Participant HIV Care Status Summary </b></div><div class="box-body">{items}</div><div class="box-footer clearfix">{pager}</div></div>',
		'panel' => ['type' => GridView::TYPE_PRIMARY,'heading' => '<b>Cohort Participant HIV Care Status Summary on Screening </b>','beforeOptions'=>['class'=>'grid_panel_remove'],'afterOptions'=>['class'=>'grid_panel_remove']],
    	'toolbar' => false,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],
            
            [
				'attribute' => 'enrCnt',
				'label' => 'Enrolled',
				'format' => 'raw',
				'value' => function($data) {                
				   return $data->enrCnt.' <a href="#" link="'.Url::to(['/dashboard/enrolledlist']).'" header="List" data-link="'.Url::to(['/dashboard/enrolledlist']).'" data-toggle="modal" data-target="#modal-popup">'.FA::icon('lg fa-info-circle text-danger').'</a>';;			
                }
			],
			[
				'attribute' => 'unlinkedCnt',
				'label' => 'Not linked',
				'format' => 'raw',
				'value' => function($data) {                 
				   return $data->unlinkedCnt;			
                }
				
			],		
			
			
			[
				'attribute' => 'onpreartCnt',
				'label' => 'Only on Pre-ART',
				'format' => 'raw',
				'value' => function($data) {               
				   return $data->onpreartCnt;			
                }
				
			],
			
			
			[
				'attribute' => 'onartCnt',
				'label' => 'On ART',
				'format' => 'raw',
				'value' => function($data) {                
				   return $data->onartCnt;			
                }
				
			],
			
                        
        ],
    ]); ?>
</div>
