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' => '#',),
    ),
)); ?>