<?php
/* @var $this UsersController */
/* @var $model Users */

$this->breadcrumbs = array(
	'Users' => array('admin'),
	'Kelola',
);

$this->pageTitle = 'Daftar Penilai';
?>

<span class="visible-xs">

	<?php echo CHtml::link(
		'<i class="icon mdi mdi-plus"></i>',
		array('create'),
		array('class' => 'btn btn-primary pull-right btn-md', 'title' => 'Tambah Penilai')
	);
	?>

</span>

<span class="hidden-xs">

	<?php echo CHtml::link(
		'Tambah Penilai',
		array('create'),
		array('class' => 'btn btn-primary pull-right btn-flat', 'title' => 'Tambah Penilai')
	);
	?>

</span>

<HR>

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id' => 'users-grid',
	'dataProvider' => $dataProvider,
	// 'filter'=>$model,
	'itemsCssClass' => 'table-responsive table table-striped table-hover table-vcenter',
	'columns' => array(

		array(
			'header' => 'No',
			'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1',
			'htmlOptions' => array(
				'width' => '10px',
				'style' => 'text-align: center;'
			)
		),


		'fullname',
		'email',
		'phone',
		'username',
		'visit_time',

		array(
			'header' => 'Edit Password',
			'class' => 'CButtonColumn',
			'template' => '{Edit Password}',
			'htmlOptions' => array('width' => '70px', 'style' => 'text-align: center;'),
			'buttons' => array(
				'Edit Password' =>
				array(
					'url' => 'Yii::app()->createUrl("integration/users/editpassword", array("id"=>$data->id_user))',
					'imageUrl' => YII::app()->baseUrl . '/image/setting/lock.png',
				),
			),
		),

		array(
			'class' => 'CButtonColumn',
			'template' => '{update}',
			'htmlOptions' => array('width' => '70px', 'style' => 'text-align: center;'),
			'buttons' => array(
				'update' =>
				array(
					'url' => 'Yii::app()->createUrl("integration/users/edit", array("id"=>$data->id_user))',
				),
			),
		),

		// array(
		// 	'header' => '',
		// 	'class' => 'CButtonColumn',
		// 	'template' => '{Detail}',
		// 	'htmlOptions' => array('width' => '70px', 'style' => 'text-align: center;'),
		// 	'buttons' => array(
		// 		'Detail' =>
		// 		array(
		// 			'visible' => '$data->status==1',
		// 			'url' => 'Yii::app()->createUrl("main/paper/update", array("id"=>$data->id_user))',
		// 			'imageUrl' => YII::app()->baseUrl . '/image/setting/eye.png',
		// 		),
		// 	),
		// ),

	),
	)); ?>