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

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

<div id="communbox" style="width:885px; float:left;">
<div id="headlines" style="width: 99%; padding-left:2%;"><img src="images/admin/bg.png" width="12" height="7" class="right5"/>Manage Product Categories <?php /* echo CHtml::link('Add new',Yii::app()->createUrl('ProductCategory/create') ); */ ?></div>
<div id="communicationsbox" style="height:525px; background-color:#f7eee1;">
<div id="form_wrapper">
<?php
    foreach(Yii::app()->user->getFlashes() as $key => $message) {
        echo '<div class="flash-' . $key . '">' . $message . "</div>\n";
    }
?>
<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'product-category-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		array(
			'header'=>'Sl.No.',
			'value'=>'$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)',
			'htmlOptions'=>array('width'=>'5px'),
		),
		'product_category',
		array(
		//'name'=>'user_group_id',
		//'filter'=>UserGroup::getGroups(),
		'header' => 'Main Category',
		'value'=>'$data->maincategory->main_category'
		),
		array(
		'header' => 'Category',
		'value'=>'$data->category->category',
		//'filter'=>ProductGroup::getProductGroup(null,true),
		),
		//'isActive',
		/* array(
			  'header'=>'Actions',
			  'template'=>'{create}{update}{delete}',
			  'buttons'=>array
				(
					'create' => array
					(
						'label'=>'Add product category',
						'imageUrl'=>Yii::app()->request->baseUrl.'/images/admin/add_small.png',
						'url'=>'Yii::app()->createUrl("ProductCategory/create")',
					),
					
				),
				'class'=>'CButtonColumn',
		), */
	),
)); ?>
</div>
</div>
</div>