<?php
/* @var $this ProductDownloadableController */
/* @var $model ProductDownloadable */

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

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

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

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'product-downloadable-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'),
		),
		'item_name',
		array(
                'name'=>'show_in_partner',
                'header'=>'Shown in resource',
                'filter'=>array(''=>'All','Y'=>'Yes','N'=>'No'),
                'htmlOptions'=>array('width'=>'10px'),
                'value'=>'($data->show_in_partner=="Y")?"Yes":"No"',
                        
                ),
            array(
                'name'=>'isActive',
                'header'=>'Status',
                'filter'=>array(''=>'All','Y'=>'Active','N'=>'Inactive'),
                'htmlOptions'=>array('width'=>'10px'),
                'value'=>'CHtml::link(($data->isActive=="Y")?CHtml::image("images/admin/active.png",""):CHtml::image("images/admin/inactive.png",""),"#",array("class"=>"doChangeStatus","id"=>$data->id,"title"=>"Change status"))',
                        'type'=>'raw'
                ),
		array(
			'header'=>'Actions',
			'class'=>'CButtonColumn',
			'template'=>'{add}{update}{delete}',
			'buttons'=>array
			(
				'add' => array
				(
					'label'=>'Add',
					'imageUrl'=>Yii::app()->request->baseUrl.'/images/admin/add_small.png',
					'url'=>'Yii::app()->createUrl("productDownloadable/create")',
				),
				
			),
		),
	),
)); ?>
</div>
