Hi,
i will show an image in a CGridView Column based on a field.
This will show me different utf-8 symbols depending on the job_active column.
array(
'name' => 'job_active',
'value' => '($data->job_active === TRUE) ? "✔" : "✗"', // output CHECK MARK or X
'htmlOptions' => array('style' => 'text-align: center;'),
),
but this does not work on IE6.
now i tested different methods to solve this problem. But nothing worked.
array(
'name' => 'job_active',
'value' => '($data->job_active === TRUE) ? CHtml::image('check.png') : CHtml::image('error.png'), // output CHECK MARK or X
'htmlOptions' => array('style' => 'text-align: center;'),
),
this will ouput encoded html chars -> no nimage shows, just text
array(
'class' => 'CButtonColumn',
'header' => 'Active',
'template' => '{btnActive} {btnInactive}',
'buttons' => array(
'btnActive' => array(
'label' => 'Active',
'imageUrl' => Yii::app()->baseUrl . '/images/symbols/check_16x16.png',
'visible' => ($data->job_active === TRUE) ? TRUE : FALSE,
),
'btnInactive' => array(
'label' => 'Inactive',
'imageUrl' => Yii::app()->baseUrl . '/images/symbols/error_16x16.png',
'visible' => ($data->job_active === TRUE) ? TRUE : FALSE,
),
),
),
this throws an error:
any ideas?
thx