<?php
/* @var $this ReviewController */
/* @var $model Review */

$this->breadcrumbs = array(
	'Reviews' => array('index'),
	$model->id_rating,
);

$this->pageTitle = Users::model()->showFullname($model->Paper->researchers_id);
?>
<?php if (YII::app()->user->record->level == 2) { ?>

	<span class="visible-xs">

		<?php echo CHtml::link(
			'<i class="mdi mdi-edit"></i>',
			array(
				'update', 'id' => $model->id_rating,
			),
			array('class' => 'btn btn-info btn-flat', 'title' => 'Edit Review')
		);
		?>


	</span>

	<span class="hidden-xs">

		<?php echo CHtml::link(
			'Edit',
			array(
				'update', 'id' => $model->id_rating,
			),
			array('class' => 'btn btn-info btn-flat', 'title' => 'Edit Review')
		);
		?>


	</span>

	<HR>

<?php } ?>

<TABLE class="table table-responsive table-striped">
	<TR>
		<TD>Tanggal Penilaian</TD>
		<TD><b><?php echo $model->created_date; ?></b></TD>
	</TR>
	<TR>
		<TD>Penilai</TD>
		<TD><b><?php echo $model->Evaluator == NULL ? '' : $model->Evaluator->fullname; ?></b></TD>
	</TR>
	<TR>
		<TD>Nama Lengkap</TD>
		<TD><b><?php echo Users::model()->showFullname($model->Paper->researchers_id); ?></b></TD>
	</TR>
</TABLE>

<HR>

<TABLE class="table table-responsive table-striped">
	<TR class="primary text-white">
		<TD><b>NO</b></TD>
		<TD><b>KRITERIA PENILAIAN</b></TD>
		<TD><b>SCORE</b></TD>
		<TD><b>BOBOT %</b></TD>
		<TD><b>NILAI (SCORE x BOBOT)</b></TD>
	</TR>
	<TR>
		<TD>1</TD>
		<TD>Kesesuaian Tema</TD>
		<TD><?php echo $model->value_satu; ?></TD>
		<TD><?php echo $weight->kriteria_tema; ?></TD>
		<TD><?php echo $model->value_satu * $weight->kriteria_tema / 100; ?></TD>
	</TR>
	<TR>
		<TD>2</TD>
		<TD>Sistematika Penulisan</TD>
		<TD><?php echo $model->value_dua; ?></TD>
		<TD><?php echo $weight->kriteria_penulisan; ?></TD>
		<TD><?php echo $model->value_dua * $weight->kriteria_penulisan / 100; ?></TD>
	</TR>
	<TR>
		<TD>3</TD>
		<TD>Inovasi dan Gagasan Karya</TD>
		<TD><?php echo $model->value_tiga; ?></TD>
		<TD><?php echo $weight->kriteria_inovasi; ?></TD>
		<TD><?php echo $model->value_tiga * $weight->kriteria_inovasi / 100; ?></TD>
	</TR>
	<TR>
		<TD>4</TD>
		<TD>Penguasaan Masalah dan Kedalaman Analisis</TD>
		<TD><?php echo $model->value_empat; ?></TD>
		<TD><?php echo $weight->kriteria_masalah; ?></TD>
		<TD><?php echo $model->value_empat * $weight->kriteria_masalah / 100; ?></TD>
	</TR>
	<TR>
		<TD>5</TD>
		<TD>Rekomendasi Kebijakan</TD>
		<TD><?php echo $model->value_lima; ?></TD>
		<TD><?php echo $weight->kriteria_rekomendasi_kebijakan; ?></TD>
		<TD><?php echo $model->value_lima * $weight->kriteria_rekomendasi_kebijakan / 100; ?></TD>
	</TR>
	<TR class="primary text-white">
		<TD></TD>
		<TD><B>NILAI TERTIMBANG</B></TD>
		<TD><?php echo Review::model()->getTotal($model->id_rating, 2); ?></TD>
		<TD><?php echo Review::model()->getTotal($model->id_rating, 3); ?></TD>
		<TD><?php echo Review::model()->getTotal($model->id_rating, 1); ?></TD>
	</TR>
</TABLE>
<small class="text-center">Dewan Juri memberikan nilai pada kolom score 10-100, dimana Nilai 10 paling rendah dan nilai 100 paling tinggi</small>
