I have the table users that have a column "active".
So there is a CListView with a cdataprovider of users at the index of users controller.
How can I write "active" or "unactive" for the values 1 or 0 of the "active" field at CListView?
I have also at users model
public function retactive() {
return array($this::ACTIVE=>'active' , $this::UNACTIVE=>'unactive' );
}
the view
$this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_view',
));
....
<b><?php echo CHtml::encode($data->getAttributeLabel('us_active')); ?>:</b>
<?php echo CHtml::encode($data->us_active); ?>
<br />