<?php

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

$this->title = Yii::t('app', 'Ostvisits');
$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="ostvisit-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
 <?php // Pjax::begin(['enablePushState' => false, 'clientOptions' => ['method' => 'POST']]); ?>  
  <?= GridView::widget([
        'dataProvider' => $dataProvider,
         'filterModel' => $searchModel,
        'columns' => [
      //      ['class' => 'yii\grid\SerialColumn'],
      ['class' => 'yii\grid\SerialColumn',
			 'contentOptions' => ['style' => 'width:30px;  min-width:30px;']
			 ],
			 

			// 'ost_visit_id',
		//	'ost_visit_survey',
			
			 [
		    'attribute' => 'ost_visit_part_id',			
			'contentOptions' => ['style' => 'width:160px;  min-width:100px;'],
		],
		[
		     'attribute' => 'ost_visit_q1',
				'label'=>'OST ID',		
			'contentOptions' => ['style' => 'width:160px;  min-width:100px;'],
		],
		[
				'attribute' => 'ost_visit_q2',
				'label'=>'2mg',
				'contentOptions' => ['style' => 'width:80px;  min-width:50px;'],
				
			],
			[
				'attribute' => 'ost_visit_q3',
				'label'=>'0.4mg',
				'contentOptions' => ['style' => 'width:80px;  min-width:50px;'],
				
			],
			[
				'attribute' => 'ost_visit_q4',
				'label'=>'0.2mg',
				'contentOptions' => ['style' => 'width:80px;  min-width:50px;'],
				
			],
			[
				'attribute' => 'ost_visit_q5',
				'label'=>'Total mg',
				'contentOptions' => ['style' => 'width:120px;  min-width:50px;'],
				
			],
			//[
			//	'attribute' => 'ost_visit_q7',
			//	'format' => 'date',
		//	],
			// 'status',
			// 'create_time:datetime',
			// 'create_user',
			// 'update_time:datetime',
			// 'update_user',
			 [
					'attribute' => 'record_date',
					'format' => 'date',
					'contentOptions' => ['style' =>'width:270px;  min-width:100px;'],
					// 'contentOptions' => ['class' => 'col-md-1'],
		            'filterType'=>GridView::FILTER_DATE,
		            'filterWidgetOptions' => ['pluginOptions' => ['autoclose' => true, 'startDate' => '01-01-1900', 'endDate' => '0', 'format' => strtolower(Yii::$app->formatter->dateFormat), 'orientation' => 'bottom']],
				],
			

            ['class' => 'app\behaviours\ActionColumns'],
        ],
    ]); ?>
<?php // Pjax::end(); ?>
</div>