<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'works-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'id',
'department',
'descofwork',
'typeofwork',
'workstatusrem',
array(
'header' => 'WORK Agreement Copy', // Header for the column
'name' => 'workagreement', // Name of the database field
'value' => '($data->workagreement === "NIL" ? $data->workagreement :CHtml::link($data->workagreement,Yii::app()->baseUrl."/uploads/".$data->workagreement,array("target"=>"_blank")))',
'type'=>'raw',
),
'place',
'village',
array(
'class'=>'CButtonColumn',
'template'=>$format,
),
),
)); ?>
'id'=>'works-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'id',
'department',
'descofwork',
'typeofwork',
'workstatusrem',
array(
'header' => 'WORK Agreement Copy', // Header for the column
'name' => 'workagreement', // Name of the database field
'value' => '($data->workagreement === "NIL" ? $data->workagreement :CHtml::link($data->workagreement,Yii::app()->baseUrl."/uploads/".$data->workagreement,array("target"=>"_blank")))',
'type'=>'raw',
),
'place',
'village',
array(
'class'=>'CButtonColumn',
'template'=>$format,
),
),
)); ?>
No comments:
Post a Comment