Yiistrap

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

  • Owner: crisu83/yiistrap
  • Platform:
  • License:: BSD 3-Clause "New" or "Revised" License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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

Overview

Name With Ownercrisu83/yiistrap
Primary LanguagePHP
Program languageJavaScript (Language Count: 3)
Platform
License:BSD 3-Clause "New" or "Revised" License
Release Count25
Last Release Name2.0.4 (Posted on )
First Release Name1.0.0-beta (Posted on 2013-05-14 14:23:54)
Created At2013-01-28 12:33:06
Pushed At2018-02-04 21:03:18
Last Commit At2018-01-22 23:14:30
Stargazers Count286
Watchers Count55
Fork Count177
Commits Count573
Has Issues Enabled
Issues Count166
Issue Open Count10
Pull Requests Count87
Pull Requests Open Count0
Pull Requests Close Count59
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

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