<?php

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

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

$this->title = Yii::t('app', 'View {modelClass} ', [
    'modelClass' => 'Hivtesting',
]);
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Hivtestings'), '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->hiv_test_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->hiv_test_id]],
];
?>
<div class="hivtesting-view">

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

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
			// 'hiv_test_id',
			'hiv_test_survey',
			'hiv_test_loc',
			'hiv_test_part_id',
			[
				'attribute' => 'hiv_test_q1',
				'format' => 'date',
			],
			'hiv_test_q2',
			'hiv_test_q3',
			[
				'attribute' => 'hiv_test_q4',
				'format' => 'date',
				'visible' => ($model->hiv_test_q3 === 0) ? false : true,
			],
			[
				'attribute' => 'hiv_test_q5',
				'visible' => ($model->hiv_test_q3 === 0) ? false : true,
			],
			[
				'attribute' => 'hiv_test_q6',
				'visible' => ($model->hiv_test_q3 === 0 || $model->hiv_test_q5 === 0) ? false : true,
			],
			'hiv_test_q7',
			[
				'attribute' => 'hiv_test_q8',
				'visible' => ($model->hiv_test_q7 === 0) ? false : true,
			],
			[
				'attribute' => 'hiv_test_q9',
				'visible' => ($model->hiv_test_q7 === 0 || $model->hiv_test_q8 === 0) ? false : true,
			],
			[
				'attribute' => 'hiv_test_q10',
				'visible' => ($model->hiv_test_q7 === 0 || $model->hiv_test_q8 === 0) ? false : true,
			],
			'hiv_test_q11',
			[
				'attribute' => 'hiv_test_q12',
				'visible' => ($model->hiv_test_q11 === 0) ? false : true,
			],
			[
				'attribute' => 'hiv_test_q13',
				'visible' => ($model->hiv_test_q11 === 0 || $model->hiv_test_q12 === 0) ? false : true,
			],
			[
				'attribute' => 'hiv_test_q14',
				'visible' => ($model->hiv_test_q11 === 0 || $model->hiv_test_q12 === 0) ? false : true,
			],
			'hiv_test_q15',
			[
				'attribute' => 'hiv_test_q16',
				'visible' => ($model->hiv_test_q15 === 0) ? false : true,
			],
			[
				'attribute' => 'hiv_test_q17',
				'visible' => ($model->hiv_test_q15 === 0 || $model->hiv_test_q16 === 0) ? false : true,
			],
			[
				'attribute' => 'hiv_test_q18',
				'visible' => ($model->hiv_test_q15 === 0 || $model->hiv_test_q16 === 0) ? false : true,
			],
			'hiv_test_q19',
			'hiv_test_q20',
			'hiv_test_q21',
			[
				'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.'"')); ?>
</div>
<br/>