drmabuse / yii-bootstrap-3-module
Yii Web Widgets
0.0.7
2013-10-31 20:05 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2024-09-21 23:15:38 UTC
README
最新稳定版本 0.0.9
每月下载 
总下载 
演示页面
类参考
演示页面示例 Bitbucket
变更记录
代码
[Bitbucket]0
在此 下载 bootstrap 包。
在布局中附加
<?php
$cs = Yii::app()->clientScript;
$themePath = Yii::app()->theme->baseUrl;
/**
* StyleSHeets
*/
$cs
->registerCssFile($themePath.'/assets/css/bootstrap.css')
->registerCssFile($themePath.'/assets/css/bootstrap-theme.css');
/**
* JavaScripts
*/
$cs
->registerCoreScript('jquery',CClientScript::POS_END)
->registerCoreScript('jquery.ui',CClientScript::POS_END)
->registerScriptFile($themePath.'/assets/js/bootstrap.min.js',CClientScript::POS_END)
->registerScript('tooltip',
"$('[data-toggle=\"tooltip\"]').tooltip();
$('[data-toggle=\"popover\"]').tooltip()"
,CClientScript::POS_READY);
?>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="<?php echo Yii::app()->theme->baseUrl ?>/assets/js/html5shiv.js"></script>
<script src="<?php echo Yii::app()->theme->baseUrl ?>/assets/js/respond.min.js"></script>
<![endif]-->
下载扩展
扩展 将包移动到您的
protected/extensions/
文件夹或使用 Composer 安装
"drmabuse/yii-bootstrap-3-module": "dev-master"
- 按照以下说明设置 Git:这里.
- 更新
app/config/
中的配置以满足您的需求。默认情况下,common/config/main.php
配置为使用 sqlite。将您的common/config/env/dev.php
修改为满足您的数据库需求。 - 需要 Composer。该包已包含
composer.phar
文件。 - 浏览
composer.json
并删除您不需要的依赖项,同时更新扩展所需的版本。 - 如果您已全局安装
composer
- 运行
composer self-update
以确保您拥有最新的 composer 版本。 - 运行
composer install
以下载所有依赖项。 - 如果在项目模板中工作
composer.phar
库。- 运行
php composer.phar self-update
以确保您拥有最新的 composer 版本。 - 运行
php composer.phar install
以下载所有依赖项。
- 运行
- 更新
配置
配置
config/main.php
使用
<?php
'aliases' => array(
'bootstrap' => 'ext.bootstrap',
),
'import'=>array(
...
'bootstrap.behaviors.*',
'bootstrap.helpers.*',
'bootstrap.widgets.*'
),
'modules' => array(
...
'gii' => array(
...
'generatorPaths' => array('bootstrap.gii'),
),
),
'components' => array(
...
'bootstrap' => array(
'class' => 'bootstrap.components.BsApi'
),
)