<?php
/* @var $this TabberController */
/* @var $model Tabber */
$this->breadcrumbs = array(
    'Tabbers' => array('admin'),
    'Manage',
);
$this->menu = array(
    array('label' => 'Create Tabber', 'url' => array('create')),
);
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#tabber-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>
<div class="page-header"><h1>Manage Tabbers</h1></div>
<?php
$this->widget('ext.widgets.FGridView', array(
    'id' => 'tabber-grid',
    'dataProvider' => $model->search(),
    'filter' => $model,
    'columns' => array(
        array(
            'name' => 'id',
            'htmlOptions' => array('style' => 'width:50px;'),
        ),
        array(
            'name' => 'title',
            'value' => 'CHtml::link($data->title,array("update","id"=>$data->id))',
            'type' => 'raw',
        ),
        array(
            'header' => '',
            'value' => 'CHtml::link(Yii::t("admin", "Create Tabs"), array("tabberTab/create", "tabber_id" => $data->id,), array("class" => "btn btn-xs btn-primary"))." ".CHtml::link(Yii::t("admin", "Manage Tabs"), array("tabberTab/admin", "tabber_id" => $data->id,), array("class" => "btn btn-xs"))." ".CHtml::link(Yii::t("admin", "Reorder Tabs"), array("tabber/view", "id" => $data->id,), array("class" => "btn btn-xs"))',
            'type' => 'html',
        ),
        array(
            'class' => 'CButtonColumn',
            'template' => '{update} {delete}',
        ),
    ),
));
?>
