<?php
/* @var $this ResourceController */
/* @var $model Resource */

$this->breadcrumbs=array(
	'Resources'=>array('index'),
	'Manage',
);

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

<div id="headlines" style="width: 99%; padding-left:2%;">
<img class="right5" width="12" height="7" src="images/admin/bg.png">
Product Resources
</div>
<div id="communicationsbox" style="height:525px; background-color:#f7eee1;">
<div id="form_wrapper">
<div id="row">
<!--<?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> -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'resource-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'),
		),
		array(
			'name'=>'resourceType_search_resource_type',
			'value'=>'$data->resourceType->resource_type',
			'filter'=>ResourceType::getResourceType(),
			'type'=>'raw'
		),
		'resource_title',
		//'source_file',
		array(
		'name'=>'description',
		'type'=>'html'
		),
		/*
		'user_group_id',		
		'product_group_id',
		'product_category_id',
		'product_id',
		'isActive',
		*/
		array(
			'class'=>'CButtonColumn',
			'header'=>'Actions',
			'template'=>'{update}{delete}'
		),
	),
)); ?>
</div>
</div>
</div>
