Display Status image on CGridView column

Comparing #6 with #7

Revision #7 was created by samdark samdark on Jan 20, 2019, 9:07:16 PM.

Set version

Yii version

1.1

Tags

Status, admin, image,CGridView, gridview, imageadmin,Status

Content

[...]
First you can create the **UtilityHtml.php** file in componet folder. (Otherwise which call a common file)

Put the below function in UtilityHtml.php file:


```php

public static function getImagetitle($status) {
if ($status == 1 || strtolower($status) == 'yes') {
[...]
and display the grid view on admin.php file


```php

array(
'name'=>'is_active',
'filter'=>array('1'=>'Active', '0'=>'Inactive'),
'type'=>'html',
'value'=>'CHtml::tag("div", array(
[...]