This extension is a collection of widgets that apply the look and feel of Twitter Bootstrap to Yii.
Please visit the demo to see what is possible until now. The aim is to transform all bootstrap components into yii widgets and vice versa.
I know there are already a few very good extension like this, but either it does not cover all components or its outdated. (And I had to do this anyway;) )
I don't think there are any special requirements...
You can skip this step if you already included bootstrap. You also should give less a try, but you don't need to. To get the bootstrap less files you have to download it from github.
css and and img folder to your theme directory.layouts/main.phpYii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl.'/css/bootstrap.min.css');
widgets folder to your protected folder'import'=>array( 'application.models.*', 'application.components.*', ... 'application.widgets.bootstrap.*', ),
Please notice that you have to include the css (or less files) and icons by yourself. If you would like to add some responsive widgets you also have to include the responsive css/less file. The javascript is included in the project.
Please refer to the github wiki. There is also a demo available.
Please report your bugs to the github bug tracker.
//Replace this: <?php echo $form->beginControlGroup($model, 'title'); <?php echo $form->labelEx($model,'title'); <?php echo $form->beginControls(); <?php echo $form->textField($model,'title'); <?php echo $form->error($model,'title'); <?php echo $form->endControls(); <?php echo $form->endControlGroup(); //with that: <?php echo $form->bootstrapTextField($model, 'title'); //or <?php echo $form->bootstrapPasswordField($model, 'password');
dark to true to keep the old design.
Total 20 comments
Just a small notice, for those, who hasn't get to know this yet (I was surprised): Popovers doesn't work under Internet Explorer 9 and earlier.
Tested them to work like a charm under newest FF and Chrome, but no luck under IE.
@kmindi
fixed
the hero unit should not wrap the body in a p tag, because i would not be able to use p tags inside that p tag or other block elements (to have valid html)
Please try again with
'filter' => false. I think you can't resize the rows because of the input fields.I'm trying to resize column width in EBootstrapGridView, Here is my code in admin.php :
I'm also trying to use
But it won't resize. Anyone have solutions? Thanks!
You can change the style by adding custom css code and overwrite the default styles.
First, thanks for your amazing extension.
I have a question about how to customize the views...
If i have 10 controller, that means, more than 40 views, do I have to change them one by one? For example, the nab or operation panel or even the Breadcrumbs...
What should I do? Is there a way to regulates them in the same time?
Good work done on these widgets.. thanks.
Hi, the search input is already integrated (not in the demo), the progress bar will follow next;)
Thanks for linking my LESS extension. :) And idd, sure the extensions can co-exist. However, if you change your mind and want to merge the Bootstrap extensions to provide the Yii community with a single polished Bootstrap integration, I'd gladly discuss it.
Keep up the good work!
Isn't it possible to create un-ended slideshow? Please update the GitHub demo with progressbar,search
I am eagerly waiting for every update. Sorry for disturbing through continious questioning.
You have to replace 'EBootstrap::thumbnailSrc()' with the src of the image. For example:
or
EBootstrap::thumbnailSrc does nothing other than returning a link to an image.
I am with trouble to give the url of picture.
This example only show the placeholder of image without the link ofpicture. Where to give the url of picture for slideshow? Thanks in advance.
I've started a new topic in the forum. If you have any questions feel free to post your questions there.
you see the bootstap is so popular , and many people watch it . you should open a topic to discuss it . the comments are too much ! ^-^
I'm very sure that they can coexist without problems.
are this extension and Yii-Bootstrap exclusive or they can go togerther ? i v used the yii-Bootstrap extension so want to know that !
Thanks so much for this - I was looking for a simple way to enhance a website without much effort and this did the trick!
Special thanks to you. i have got the point.
That means you have to download bootstrap and include it in your theme. Because it is very likely that you use bootstrap not only in combination with the widgets i've decided to not integrate it into the download.
I'm working on the slideshow widget in this moment, give me a few hours and I will upload a new version;) You can see what I will add in the near future at the github wiki.
Leave a comment
Please login to leave your comment.