yii-bootstrap-widgets Collection of widgets and classes to apply the look&feel of bootstrap to yii.

  1. Requirements
  2. Installation
  3. Resources
  4. Changelog

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;) )

Requirements

I don't think there are any special requirements...

Installation

Bootstrap

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.

  1. Download Bootstrap
  2. Copy the the css and and img folder to your theme directory.
  3. Include the css in your layouts/main.php
<?php Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl.'/css/bootstrap.min.css'); ?>
Extension
  1. Download the extension
  2. Copy the widgets folder to your protected folder
  3. Import it in your config
'import'=>array(
	'application.models.*',
	'application.components.*',
	...
	'application.widgets.bootstrap.*',
),
How to use

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.

Bug Tracker

Please report your bugs to the github bug tracker.

Resources

Changelog

0.5.0
  • Updated JS to bootstrap 2.3.0
  • Created shorthands for the text- and passwordfield.
//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'); ?>
0.4.4
  • Important The default color of the navbar is now white! Set the option dark to true to keep the old design.
  • Updated js to bootstrap 2.1.0
  • Added the submenu to the button dropdowns
  • Added block support for buttons
  • See the github wiki page for help on how to use the new features.
0.4.3
0.4.2
  • Added ability to add links to the carousel images.
0.4.1
  • Added title for EBootstrapButtonColumn icons
0.4.0
  • Updated the JS to bootstrap 2.0.2
0.3.9
0.3.8
0.3.7
0.3.6
0.3.4
  • Added Button -groups, -toolbars and -dropdowns
  • Added prepend/append text fields
  • Added search field (rounded corners)
  • Right align navigation bar elements (Small change in the syntax, you have to specify dropdown elements with "dropdown" => true)
0.3.2
  • Added widget to display code with syntax highlighting. (Google code prettify)
  • Added collapse widget.
  • Changed EBootstrapListViewItem Class. Now extends CDetailView.
  • Added missing class to EBootstrapSidebar
  • Added comments to the source code
  • Several small bugs
  • Added source code to the demo website
0.2.1
  • Minified JS
  • Carousel widget
0.2.0
  • CListView wrapper
  • CGridView wrapper
  • CDetailView wrapper
  • Updated to Bootstrap 2.0.1
0.1.0
  • Initial commit
21 0
38 followers
7 374 downloads
Yii Version: 1.1
License: Apache-2.0
Category: User Interface
Developed by: thelfensdrfer
Created on: Feb 18, 2012
Last updated: 11 years ago

Downloads

show all

Related Extensions