[EXTENSION] Bootstrap

will it be cool if you could show me an example of how i can pass it into a variable?

should i be passing it as


CHtml::link(UserModule::t('Create User'),array('create'))

or should i be passing it as


array('label'=>UserModule::t('Create User'), 'url'=>array('create'))

?

and also in the _menu.php, how should be taking and passing in the variable?

sorry and hope you don’t mind me for asking this as i’m just trying to pick up Yii.

Here’s a quick example:




$items = array(

	.....

);


.....


$this->widget('bootstrap.widgets.BootMenu', array(

	.....

	'items'=>$items,

);



Thanks Chris,

That helps! Gotten it working. :)

Hello Chris,

I noticed an error in your demo site.

The code you give for BootGridView, if used as is, gives an error


<?php $this->widget('bootstrap.widgets.BootGridView', array(

    'dataProvider'=>$gridDataProvider,

    'template'=>"{items}",

    'itemsCssClass'=>'table table-striped table-bordered table-condensed',

    'columns'=>array(

        array('name'=>'id', 'header'=>'#'),

        array('name'=>'firstName', 'header'=>'First name'),

        array('name'=>'lastName', 'header'=>'Last name'),

        array('name'=>'language', 'header'=>'Language'),

        array(

            'class'=>'bootstrap.widgets.BootButtonColumn',

            'htmlOptions'=>array('style'=>'width: 50px'),

        ),

    ),

)); ?>

It’s caused by the Button Column missing variables

It should be


 array(

            'class'=>'bootstrap.widgets.BootButtonColumn',

            'htmlOptions'=>array('style'=>'width: 50px'),

                                'viewButtonUrl'=>null,

                                'updateButtonUrl'=>null,

                                'deleteButtonUrl'=>null,

        ),



If these lines are not present I get a 500 - Trying to get property of non-object error.

Hope this helps and thanks for your great extension.

Best,

Ivan

Downloaded bootstrap-0.9.8-beta3.zip…

Fresh webapp ( Yii 1.1.8 ), installed as recommended: http://www.cniska.net/yii-bootstrap/setup.html

BUT:

Chrome: http://upload.slike.com/slike/NF1.jpg

FF: http://upload.slike.com/slike/6Pq9L.jpg

I use bootstrap.widgets.BootNavbar, identically to demo. :)

Are you using Extended Client Script ?

If yes try to set it like this:


        // Extended Client Script for Combining and Compressing CSS and Javascript

        'clientScript' => array(

            'class' => 'ext.ExtendedClientScript.ExtendedClientScript',

            'combineCss' => false, 

            'compressCss' => true,

            'combineJs' => true,

            'compressJs' => false,

        ),

Best,

Ivan

No, I’m just using “skeleton” webapp w/ BootNavbar widget and basic configuration.

I think is because of the version of jQuery included in Yii 1.1.8, try it with the latest Yii 1.1.10.

Yes it is. :)

Tnx lightglitch & Ivan

Yes you should try with at least Yii 1.1.9.

@ivan25: The BootGridView example is merely what it is, an example. You wouldn’t ever want to set the URLs to null or the gridview wouldn’t work. But yes, in the example code I use null for the URLs. :)

I use the bootstrap-0.9.8-beta3

i add this css…

main.php

<head>

<title><?php echo CHtml::encode($this->pageTitle); ?></title>

<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/style.css" rel="stylesheet"/>

</head>

how i can add in <div id="footer">

with style.css




body {

  padding-top: 60px;

  padding-bottom: 40px;

}


.sidebar-nav {

  padding: 9px 0;

}

.footer {

  .....

  .....

}



before I’m sorry, my english is too bad. if I make a mistake on css?

i use firebug on mozilla. display css.how i can add style.css?

In CSS you refer id with ‘#’ instead of ‘.’. In other words you want to use ‘#footer’.

Options can’t worked.


$this->beginWidget('BootModal',array(

    'id'=>'modal',

    'options'=>array(

        'title'=>'Sample title',

Result page without title, buttons and etc.




<div id="modal" class="modal">

 <p>Content...</p>

</div> 

<a href="#" onclick="$('#modal').bootModal('open'); return false;">Open</a>

</div>



You’re probably using the 0.9.7 documentation with the new 0.9.8 BETA3. See the demo page (link on extension page) for info about the new BootModal implementation and how to use it.

is working. thanks

The mouseover and mouseout effect is not working on the Grid: BootGridView, BootDetailView

Yii-Bootstrap 0.9.9 is now live!

http://www.yiiframework.com/extension/bootstrap/files/yii-bootstrap-0.9.9.r119.zip

I have update the extension page and hosted a project page at: http://www.cniska.net/yii-bootstrap/

See the extension page for a list of changes.

There is still a few minor issues that haven’t been fixed, such as the errors for vertical forms, but those will be fixed in time. (I haven’t yet thought of a good solution for that issue.)

Enjoy!

hi chriss, im new here and new using yii frame work, i have an error

Alias "bootstrap.widgets.BootAlert" is invalid. Make sure it points to an existing directory or file.

i extract the bootsrap on my extension then i put this in my index just to view what happened

<?php

Yii::app()->user->setFlash(‘success’, ‘<strong>Well done!</strong> You successfully read this important alert message.’);

Yii::app()->user->setFlash(‘info’, '<strong>Heads up!</strong> This alert needs your attention, but it\‘s not super important.’);

Yii::app()->user->setFlash(‘warning’, '<strong>Warning!</strong> Best check yo self, you\‘re not looking too good.’);

Yii::app()->user->setFlash(‘error’, ‘<strong>Oh snap!</strong> Change a few things up and try submitting again.’);

?>

<?php $this->widget(‘bootstrap.widgets.BootAlert’); ?>

then i got that error… did i miss something to setup? please teach me, after i xtract the bootstrap to my extension what next set up?

I have upgraded my bootstrap extension from previous version to latest (bootstrap 2.01) version. Everything is working good. But i miss the cool form validation in previous version, with changing colors of forms with each input. Is there any way to use it in the current version?