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

$this->menu=array(
	array('label'=>'List ProductGroup', 'url'=>array('index')),
	array('label'=>'Create ProductGroup', 'url'=>array('create')),
);
?>

<div id="headlines" style="width: 99%; padding-left:2%;">
<img class="right5" width="12" height="7" src="images/admin/bg.png">
Product Group | <?php echo CHtml::link('Add new',Yii::app()->createUrl('ProductGroup/create') ); ?>
</div>
<div id="communicationsbox" style="height:525px; background-color:#f7eee1;">
<div id="form_wrapper">
<div id="row">
<fieldset id="current">

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'product-group-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_group_name',
		array(
			'name'=>'userGroup_search_groupname',
			'value'=>'$data->userGroup->group_name',
			'filter'=>UserGroup::getGroups(),
			'type'=>'raw'
		),		
		array(
			  'header'=>'Action',
				'class'=>'CButtonColumn',
				'template'=>'{create}{update}{delete}',
				'buttons'=>array
				(
					'create' => array
					(
						'label'=>'Add new product group',
						'imageUrl'=>Yii::app()->request->baseUrl.'/images/admin/add_small.png',
						'url'=>'Yii::app()->createUrl("ProductGroup/create")',
					),
					
				),
		),
	),
)); ?>
</fieldset>
</div>
</div>
</div>
