<?php
    $baseUrl = Yii::app()->theme->baseUrl; 
    $cs = Yii::app()->getClientScript();
    Yii::app()->clientScript->registerCoreScript('jquery');
?>


<div class="panel panel-primary">
 
  <div class="panel-body"> 
<center>

<?php
echo CHtml::link("<span class='glyphicon glyphicon-transfer' aria-hidden='true'></span> KEMBALI KE PEMBAYARAN",array(Yii::app()->controller->id.'/admin'),array('class'=>'btn btn-warning btn-lg'));
?>



</center>
<table class="table table-bordered table-striped table-hover" >
<thead>
<th width="20px">NOMER</th>

<th width="">JENIS ANTRIAN</th>
<th width="120px">STATUS</th>

<th width="20px;">AKSI</th>
</thead>
<tbody>
<?php
$i = 0;
foreach($data  as $row):
$i++;
 ?>
<tr>


<td><?php echo $row->nomor ;?></td>
<td>
	<?php
if(!empty($row->rel_jenis->nama_loket))
{echo $row->rel_jenis->nama_loket;}
?>
</td>
<td>
<?php
if($row->status=="waiting")
{
 echo "<span class='label label-danger'>Waiting......</span>";
}
else
{
	
 echo "<span class='label label-success'>Finish......</span>";
}
?>
	
</td>



<td>
<?php
echo CHtml::link("<span class='glyphicon glyphicon-earphone' aria-hidden='true'></span> Panggil Ulang",array(Yii::app()->controller->id.'/Panggilulang','id'=>$row->id,'id_jenis'=>$row->id_jenis,'nomor'=>$row->nomor),array('class'=>'btn btn-info btn-xs'));
?>
</td>
</tr>
<?php endforeach ?>
</tbody>
</table>



<div style="float: right;">
<?php
$this->widget('CLinkPager', array(
'pages'=>$halaman,
));
?>
</div>

</div>
</div>