<?php

use yii\helpers\Url;
use yii\helpers\Html;
use yii\widgets\DetailView;
use rmrevin\yii\fontawesome\FA;

/* @var $this yii\web\View */
/* @var $model app\models\Screening */

$this->title = Yii::t('app', 'View {modelClass} ', [
    'modelClass' => 'Screening',
]);
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Screenings'), 'url' => ['index']];
$this->params['breadcrumbs'][] = Yii::t('app', 'View');
$this->params['menu'] = [
	['label' => FA::icon('align-justify fa-fw'), 'linkOptions' => ['class'=>'btn btn-default', 'title'=>'List'], 'url' => ['/'.Yii::$app->controller->id]],
	['label' => FA::icon('plus fa-fw'), 'linkOptions' => ['class'=>'btn btn-default', 'title'=>'Create'], 'url' => ['create']],
	['label' => FA::icon('pencil fa-fw'), 'linkOptions' => ['class'=>'btn btn-default', 'title'=>'Update'], 'url' => ['update', 'id' => $model->mem_scrn_id]],
	['label' => FA::icon('trash fa-fw'), 'linkOptions' => ['class'=>'btn btn-default', 'title'=>'Delete', 'data' => ['confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), 'method' => 'post']], 'url' => ['delete', 'id' => $model->mem_scrn_id]],
];
?>
<div class="screening-view">

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

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
			// 'mem_scrn_id',
			'mem_scrn_survey',
			'mem_scrn_part_id',
			'mem_scrn_q1',
			'mem_scrn_q2',
			'mem_scrn_q3',
			'mem_scrn_q4',
			'mem_scrn_q5',
			
	       [
				'attribute' => 'mem_scrn_q6',
				'format' => 'date',				
		   ],	
			
			'mem_scrn_q7',
			'mem_scrn_q8',
			'mem_scrn_q9',
			'mem_scrn_q10',
			'mem_scrn_q11',
			'mem_scrn_q12',
			'mem_scrn_q13',
			'mem_scrn_q14',
			'mem_scrn_q15',
			'mem_scrn_q16',
			[
				'attribute' => 'mem_scrn_q17',
				'format' => 'date',				
		    ],	
			
			'mem_scrn_q18',
			'mem_scrn_q19',
			[
				'attribute' => 'mem_scrn_q20',
				'format' => 'date',				
		    ],
			
			'mem_scrn_q21',
			'mem_scrn_q22',
			'mem_scrn_q23',
			'mem_scrn_q24',
			'mem_scrn_q25',
			'mem_scrn_q26',
			[
				'attribute' => 'status',
				'value' => ($model->status == 1) ? 'Y' : 'N',
				'visible' => ($model->status === null) ? false : true,
			],
			[
				'attribute' => 'create_time',
				'format' => 'datetime',
				'visible' => ($model->update_user !== null) ? false : true,
			],
			[
				'attribute' => 'create_user',
				'visible' => ($model->update_user !== null) ? false : true,
			],
			[
				'attribute' => 'update_time',
				'format' => 'datetime',
				'visible' => ($model->update_user === null) ? false : true,
			],
			[
				'attribute' => 'update_user',
				'visible' => ($model->update_user === null) ? false : true,
			],
        ],
    ]) ?>

</div>
<div class="control-group buttons">
	<?= Html::Button('Back', array('class'=>'btn btn-default', 'onclick' => 'js:document.location.href="../'.Yii::$app->controller->id.'"')); ?>
	<?= Html::Button('View Visit Schedule', array('class'=>'btn btn-default', 'link'=>Url::toRoute(['/visitschedule/indexall', 'ajaxload' => true, 'VisitscheduleallSearch' => ['participant_id' => $model->mem_scrn_part_id]]), 'data-toggle'=>'modal', 'data-target'=>'#modal-popup')); ?>
</div>
<br/>