<?php
/* @var $this SessionController */
/* @var $model Session */

$this->breadcrumbs=array(
	'Sessions'=>array('index'),
	$model->id_session_user,
);

$this->pageTitle='Detail Sesi Kuesioner';
?>

<?php
if(date("Y-m-d") < $model->QuestionSession->expire_date){
	echo CHtml::link('Mulai Evaluasi Inovasi',
		array('detail',
			'sessionid'=>$model->id_session_user,
			'token'=>$model->token,
			'user_id'=>$model->user_id,
		), array('class' => 'btn btn-lg btn-block btn-info btn-flat', 'title'=>'Mulai Isi Evaluasi Inovasi'));

	echo CHtml::link('Cetak Jawaban',
		array('print',
			'sessionid'=>$model->id_session_user,
			'token'=>$model->token,
		), array('class' => 'btn btn-lg btn-block btn-success btn-flat', 'title'=>'Cetak Jawaban Hasil Inovasi'));
}else{
	echo "<div class='alert alert-danger'>Maaf, Sesi Kuesioner telah Berakhir tanggal ".Yii::app()->dateFormatter->format("dd MMM yyyy", $model->QuestionSession->expire_date).", klik tombol dibawah untuk menampilkan hasil Jawaban Kuesioner Anda.</div>";

	echo CHtml::link('Cetak Jawaban',
		array('print',
			'sessionid'=>$model->id_session_user,
			'token'=>$model->token,
		), array('class' => 'btn btn-lg btn-block btn-success btn-flat', 'title'=>'Cetak Jawaban Hasil Inovasi'));
}
?>

<STYLE>
	th{width:150px;}
</STYLE>

