tried it but doesnt work for me.
here is my view.php
<?php $this->widget('bootstrap.widgets.TbDetailView',array(
'data'=>$model,
'attributes'=>array(
'id_day',
array(
'name'=>'mon',
'value'=>$model->monday->name,
),
array(
'name'=>'tue',
'value'=>$model->tuesday->name,
),
and here is my relations
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'monday'=>array(self::BELONGS_TO,'Shift','mon'),
'tuesday'=>array(self::BELONGS_TO,'Shift','tue'),
'wednesday'=>array(self::BELONGS_TO,'Shift','wed'),
'thursday'=>array(self::BELONGS_TO,'Shift','thurs'),
'friday'=>array(self::BELONGS_TO,'Shift','fri'),
'saturday'=>array(self::BELONGS_TO,'Shift','sat'),
'sunday'=>array(self::BELONGS_TO,'Shift','sun'),
);
}
then here is my admin.php
<?php $this->widget('bootstrap.widgets.TbGridView',array(
'id'=>'day-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'id_day',
array(
'name'=>'monday',
'value'=>'$data->monday->name',
),
'tue',
'wed',
'thurs',
'fri',
/*
'sat',
'sun',
*/
array(
'class'=>'bootstrap.widgets.TbButtonColumn',
),
),
)); ?>
it says Trying to get property of non-object
can you help me with this?