<?php

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

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

$this->title = Yii::t('app', 'View {modelClass} ', [
    'modelClass' => 'Hivcounseling',
]);
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Hivcounselings'), '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_counseling_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_counseling_id]],
];
?>
<div class="hivcounseling-view">

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

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
			// 'hiv_counseling_id',
			'hiv_counseling_survey',
			'hiv_counseling_loc',
			'hiv_counseling_part_id',
			'hiv_counseling_q1',			
			[
				'attribute' => 'hiv_counseling_q2',
				'visible' => ($model->hiv_counseling_q2 !== null && $model->hiv_counseling_q2 !="" ) ? true : false,
			],
				
			[
				'attribute' => 'hiv_counseling_q3',
				'visible' => ($model->hiv_counseling_q3 !== null && $model->hiv_counseling_q3 !="" ) ? true : false,
			],
           [
				'attribute' => 'hiv_counseling_q4',
				'visible' => ($model->hiv_counseling_q4 !== null && $model->hiv_counseling_q4 !="" ) ? true : false,
			],
            [
				'attribute' => 'hiv_counseling_q5',
				'visible' => ($model->hiv_counseling_q5 !== null && $model->hiv_counseling_q5 !="" ) ? true : false,
			],	
            [
				'attribute' => 'hiv_counseling_q6',
				'visible' => ($model->hiv_counseling_q6 !== null && $model->hiv_counseling_q6 !="" ) ? true : false,
			],	
             'hiv_counseling_q7',			
			[
				'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/>