<?php
$this->breadcrumbs=array(
	'Calllists'=>array('index'),
	'Manage',
);
/*
$this->menu=array(
	array('label'=>'List Calllist', 'url'=>array('index')),
	array('label'=>'Create Calllist', '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('calllist-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Manage Calllists</h1>


<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('bootstrap.widgets.TbGridView', array(
	'id'=>'calllist-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
                        array('name'=>'type',
                                'value'=>array($model, 'renderState')),
                        'calluuid',
                        array(  'name' => 'timestamp',
                                'value' => array($model, 'renderDateTime')),
                        'remotecid',
                        'duration',
                        'meta',
                        'comment',
                        //'user',//FIXME : nach user filtern
                        //'state',
                        //'hidden',
                        //'id',

                array(
			'class'=>'CButtonColumn',
                        'template'=>'{delete}',
		),
	),
)); ?>
