Yii 1.1: bootprogresscolumn

Progress Bar Inside GridView Column compatible with 'bootstrap' extension
9 followers

This progress bar is based on this wiki article.

Requirements

  • Yii 1.1.x
  • A column in a CGridview widget ;)

Usage

  • Download the extension
  • Extract to protected/extensions/ directory
  • In your view use the widget CGridView/BootGridView like this:
$this->widget('bootstrap.widgets.BootGridView', array(
    'id' => 'model-grid',
    'dataProvider' => $model->search(),
    'filter' => $model,
    'columns' => array(
        'id',
        'name',
        array(
            'class' => 'ext.BootProgressColumn.BootProgressColumn',
            'name' => 'percentage',
            'percent' => 'percentage',
        ),
    ),
));

Resources

Thanks

to @Luiz

Total 4 comments

#15069 report it
Totto Roncone at 2013/10/04 08:26am
Undefined variable: model

In my case, the action controller return only need one parameter which isn't a model:

$this->render('viewmagazine', array('this_magazine'=>$params));

What do I need to adjust the code to this functionality?

#11774 report it
Luiz at 2013/02/02 09:09pm
Great!

Great idea to turn in a wiki extension. I also liked the suggestion to renomera 'Tb' for compatibility and standards.

#11144 report it
robregonm at 2012/12/19 01:17pm
Good idea to rename

@yiqing95 Good idea, I'll rename it in the next release :) Thanks for your suggestion.

#11142 report it
yiqing95 at 2012/12/19 11:27am
nice one , can merger to yii-Booster extension

why not change the "Boot" prefix to "Tb" . just a suggestion ! and because the yii-bootstrap do not include any other additional extension except wich come from twitter bootstrap. so this extension can merge to the YiiBooster . the "Boot" prefix is no longer used by yii-bootstrap extension from 1.0 . and all of us who use twitter bootstrap have accepted this "Naming Convention" .

Leave a comment

Please to leave your comment.

Create extension