<?php
$this->breadcrumbs=array(
	'Run Schedules'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'Create RunSchedule','url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('run-schedule-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1><?php echo t('Manage Run Schedules'); ?></h1>

<?php $this->widget('bootstrap.widgets.TbGridView',array(
	'id'=>'run-schedule-grid',
	'dataProvider'=>$model->search(),
	'columns'=>array(
		'name',
		array('name'=>'active', 'type'=>'raw','value'=>'SystemInfoHelper::getSwitchLink("runSchedule","switchActive",$data->ID)." ".SystemInfoHelper::getPosNegLabel($data->active == 1)'),
    array('name'=>'id_gate_group', 'type'=>'raw','value'=>'SystemInfoHelper::getGateGroupCoolName($data->id_gate_group)'),
    array('name'=>'id_time_table', 'type'=>'raw','value'=>'SystemInfoHelper::getTimeScheduleCoolName($data->id_time_table)'),
		array('name'=>'confirmation_required', 'type'=>'raw','value'=>'SystemInfoHelper::getSwitchLink("runSchedule","switchConfirmationRequired",$data->ID)." ".SystemInfoHelper::getPosNegLabel($data->confirmation_required == 1)'),
		array(
			'class'=>'bootstrap.widgets.TbButtonColumn',
		),
	),
)); ?>
