crisu83 / yiistrap

Twitter Bootstrap for the Yii PHP framework.
http://www.getyiistrap.com
BSD 3-Clause "New" or "Revised" License
286 stars 176 forks source link

Where is TbDetailView widget? Does it merge somewhere? #32

Closed almix closed 11 years ago

almix commented 11 years ago

It was in yii-auth, I implement yiistrap there, what need use instead TbDetailView?

ghost commented 11 years ago

I believe it was moved out of of yiistrap and into 2amigos/yiiwheels. I was actually looking for the same widget and using https://github.com/2amigos/yiiwheels/blob/master/widgets/detail/WhDetailView.php seems to work fine:

<?php $this->widget('yiiwheels.widgets.detail.WhDetailView',array(
    'data' => $model,
    'attributes' => array(
        'id',
        'username',
        'password',
        'email',
    ),
)); ?>
ghost commented 11 years ago

Also see Issue #21 for the official answer...

crisu83 commented 11 years ago

This issue seems to be fixed.

kachar commented 11 years ago

@dmccorry, the easiest way to migrate this is to use the default zii.widgets.CDetailView widget with custom class attributes. The TbDetailView widget is doing the exact same thing.

<?php $this->widget('zii.widgets.CDetailView',array(
    'htmlOptions' => array(
        'class' => 'table table-striped table-condensed table-hover',
    ),
    'data' => $model,
    'attributes' => array(
        'id',
        'username',
        'password',
        'email',
    ),
)); ?>