<?php
/* @var $this HtmlblockController */
/* @var $model Htmlblock */
$this->breadcrumbs = array(
    'Content Blocks' => array('admin'),
    'Manage',
);
$this->menu = array(
    array('label' => 'List Content Block', 'url' => array('admin')),
    array('label' => 'Create Content Block', 'url' => array('create')),
);
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#htmlblock-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>
<div class="page-header"><h1>Manage Content Blocks</h1></div>
<?php
$this->widget('ext.widgets.FGridView', array(
    'id' => 'htmlblock-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',
        ),
        'slug',
//	'content',
//	'language',
        array(
            'class' => 'CButtonColumn',
        ),
    ),
));
?>