<?php
/* @var $this ClusterController */
/* @var $data Cluster */
?>


<div class="row">
	<div class="col-md-7">

		<p><?php echo CHtml::encode($data->name); ?></p>

	</div>
	<div class="col-md-1">
		<div class="label label-primary">( <?php echo Question::model()->countPointMY($data->id_sub,$user_id,$sessionid); ?> / <?php echo Question::model()->countPoint($data->id_sub); ?> )</div>
	</div>
	<div class="col-md-1">
		<div class="label label-success"> <?php echo Question::model()->sumPointMY($data->id_sub,$user_id,$sessionid); ?> </div>
	</div>
	<div class="col-md-2">
		<div class="label label-info"> Nilai Maksimal <?php echo $data->max_point; ?> </div>
	</div>
	<div class="col-md-1">
		<?php 
		if(YII::app()->user->record->level==1){
			echo CHtml::link('Lihat Data',
				array('master/sub/view', 'id'=>$data->id_sub,'u'=>$user_id,'token'=>$token,'sessionid'=>$sessionid),
				array('class' => 'tombol btn btn-info','title'=>'Proses'));
		}else{
			echo CHtml::link('Proses',
				array('master/sub/view', 'id'=>$data->id_sub,'u'=>$user_id,'token'=>$token,'sessionid'=>$sessionid),
				array('class' => 'tombol btn btn-info','title'=>'Proses'));
		}
		?>
	</div>

</div>


