Yiistrap是流行的yii-bootstrap扩展的完全重写。 Yii-Bootstrap或多或少是一个小部件的集合,使它几乎可以扩展。 我们从我们的错误中学到了建立强大的帮助类的Yiistrap,使其易于使用。你可以立即开始使用Yiistrap,即使没有任何预先知识在Twitter Bootstrap本身。 Yiistrap为所有Bootstrap组件提供了辅助方法,为更复杂的组件提供了小部件。 您还可以使用助手来构建自己的小部件。Yiistrap有自己的扩展库yiistrap-widgets,它已经包括一些有用的小部件为Select2,DateTime Picker,Wysihtml5和jQuery文件上传。 2amigOS! 还保持自己的扩展库称为YiiWheels,包括更多的小部件。
Yiistrap
Yiistrap是流行的yii-bootstrap扩展的完全重写。 (Yiistrap is a complete rewrite of the popular yii-bootstrap extension. )
Github stars Tracking Chart
Overview
Name With Owner | crisu83/yiistrap |
---|---|
Primary Language | PHP |
Program language | JavaScript (Language Count: 3) |
Platform | |
License: | BSD 3-Clause "New" or "Revised" License |
Release Count | 25 |
Last Release Name | 2.0.4 (Posted on ) |
First Release Name | 1.0.0-beta (Posted on 2013-05-14 14:23:54) |
Created At | 2013-01-28 12:33:06 |
Pushed At | 2018-02-04 21:03:18 |
Last Commit At | 2018-01-22 23:14:30 |
Stargazers Count | 286 |
Watchers Count | 55 |
Fork Count | 177 |
Commits Count | 573 |
Has Issues Enabled | |
Issues Count | 166 |
Issue Open Count | 10 |
Pull Requests Count | 87 |
Pull Requests Open Count | 0 |
Pull Requests Close Count | 59 |
Has Wiki Enabled | |
Is Archived | |
Is Fork | |
Is Locked | |
Is Mirror | |
Is Private |
Yiistrap
Twitter Bootstrap for Yii.
NOTE!
We have re-arranged the repository for this project to make it easier for people to choose the right version. Please make sure you do the following changes if they apply to you:
- If you are using the old
bs3
branch you should switch to use the2.0.0
tag (or2.0.x-dev
alias). - If you are using the old
master
branch you should switch to use the1.x
branch.
Installation
With Composer
The easiest way to install Yiistrap is to use Composer.
Add the following to your composer.json file:
"require": {
"crisu83/yiistrap": "2.0.x-dev"
}
Run the following command to download the extension:
php composer.phar update
Add the following to your application configuration:
.....
'components' => array(
.....
'bootstrap' => array(
'class' => '\TbApi',
),
),
.....
'modules' => array(
.....
'gii' => array(
'class' => 'system.gii.GiiModule',
'generatorPaths' => array('vendor.crisu83.yiistrap.gii'),
),
),
.....
Add the following line to your main layout in protected/views/layouts/main.php
to register the necessary CSS and JavaScript files:
<?php Yii::app()->bootstrap->register(); ?>
Without Composer
Follow the above steps first, but download and unzip Yiistrap instead of requiring it through Composer.
Then you also need to add the following to your application configuration:
'aliases' => array(
'yiistrap' => __DIR__ . '/relative/path/to/yiistrap',
),
.....
'import' => array(
.....
'yiistrap.behaviors.*',
'yiistrap.components.*',
'yiistrap.form.*',
'yiistrap.helpers.*',
'yiistrap.widgets.*',
),
.....
Usage
Documentation not updated yet, but use the current docs as a guideline:
http://www.getyiistrap.com
Use the following command to generate ApiGen documentation:
php vendor\bin\apigen generate
Note: When you use a widget, prepend a \
to the filename to use autoload it through Composer:
<?php $this->widget('\TbNav', array(
'type' => TbHtml::NAV_TYPE_TABS,
'items' => array(
array('label' => 'Home', 'url' => '#', 'active' => true),
array('label' => 'Profile', 'url' => '#',),
array('label' => 'Messages', 'url' => '#',),
),
)); ?>