Hi,
I am trying to place icons in my CGridView to represent boolean data.
I have added a function in User model to do the boolean check and echo out the icon result. The code can be found as below
//CHANGE BOOLEAN IMAGE TO TICK/CROSS
public function booImage($check)
{
$check=Yii::app()->format->formatNumber($check);
if ($check==0)
echo "<img src=/www/images/cross.gif>";
else echo "<img src=/www/images/bluetick.jpg>";
}
Also the View.php of the User model is as follows
<h1>View User : <?php echo $model->username; ?></h1>
<?php
$this->widget('zii.widgets.CDetailView', array(
'data'=>$model,
'attributes'=>array(
'ID',
'username',
'firstname',
'lastname',
'country',
'position',
array(
'name'=>'request_permit',
'data'=>User::booImage($model->request_permit),
),
array(
'name'=>'view_permit',
'data'=>User::booImage($model->view_permit),
),
)
I am however getting the following result.
Is this a CSS related issue?
Thanks in advance