Yiistrap

Yiistrap是流行的yii-bootstrap扩展的完全重写。 (Yiistrap is a complete rewrite of the popular yii-bootstrap extension. )

  • 所有者: crisu83/yiistrap
  • 平台:
  • 许可证: BSD 3-Clause "New" or "Revised" License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

Yiistrap是流行的yii-bootstrap扩展的完全重写。 Yii-Bootstrap或多或少是一个小部件的集合,使它几乎可以扩展。 我们从我们的错误中学到了建立强大的帮助类的Yiistrap,使其易于使用。你可以立即开始使用Yiistrap,即使没有任何预先知识在Twitter Bootstrap本身。 Yiistrap为所有Bootstrap组件提供了辅助方法,为更复杂的组件提供了小部件。 您还可以使用助手来构建自己的小部件。Yiistrap有自己的扩展库yiistrap-widgets,它已经包括一些有用的小部件为Select2,DateTime Picker,Wysihtml5和jQuery文件上传。 2amigOS! 还保持自己的扩展库称为YiiWheels,包括更多的小部件。

主要指标

概览
名称与所有者crisu83/yiistrap
主编程语言PHP
编程语言JavaScript (语言数: 3)
平台
许可证BSD 3-Clause "New" or "Revised" License
所有者活动
创建于2013-01-28 12:33:06
推送于2018-02-04 21:03:18
最后一次提交2018-01-22 23:14:30
发布数25
最新版本名称2.0.4 (发布于 )
第一版名称1.0.0-beta (发布于 2013-05-14 14:23:54)
用户参与
星数286
关注者数53
派生数173
提交数573
已启用问题?
问题数166
打开的问题数10
拉请求数87
打开的拉请求数0
关闭的拉请求数59
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?

Yiistrap

Build Status

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 the 2.0.0 tag (or 2.0.x-dev alias).
  • If you are using the old master branch you should switch to use the 1.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' => '#',),
    ),
)); ?>