2017 © Pedro Peláez
 

yii2-extension yii2-inspinia

Inspinia template widgets

image

lkk/yii2-inspinia

Inspinia template widgets

  • Wednesday, July 26, 2017
  • by lkk
  • Repository
  • 3 Watchers
  • 8 Stars
  • 1,815 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 3 Open issues
  • 6 Versions
  • 38 % Grown

The README.md

Inspinia Admin Theme

v2.7.1, (*1)

这是一个商业模板,使用前请先购买版权, (*2)

https://wrapbootstrap.com/theme/inspinia-responsive-admin-theme-WB0R5L90S 真心不贵,只要18美刀,程序猿半天的工资。比免费模板强大多了。, (*3)

main.php增加, (*4)

'components' => [
    'view' => [
         'theme' => [
     'pathMap' => [
    '@app/views' => '@vendor/lkk/yii2-inspinia/views'
    ],
        ],
    ],
],

或者 将vendor/lkk/yii2-inspinia/views下的文件,替换自己views下的文件, (*5)

加载AppAsset, (*6)

编辑 backend\assets\AppAsset.php, (*7)

class AppAsset extends AssetBundle
{
    ...
    public $depends = [
        'lkk\inspinia\AppAsset',
    ];
}

views/layouts/sidebar.php的$menu,大体上这样, (*8)

$controllerName = Yii::$app->controller->id;
$actionName = Yii::$app->controller->action->id;
$moduleName = Yii::$app->controller->module->id;

$menu = [
    [
    'url' => '/home',
        'label' => '首页',
        'icon' => 'fa fa-dashboard',
    ],
    [
        'url' => '/money',
        'label' => '财务管理',
        'icon' => 'fa fa-money',
        'options' => ['class' => $controllerName == 'money' ? 'active' : ''],
    ],
    [
        'url' => '#',
        'label' => '项目管理',
        'icon' => 'fa fa-cubes',
        'items' => [
            [
                'url' => '/project/default',
                'label' => '项目列表',
                'options' => ['class' => $controllerName == 'default' && $moduleName == 'project' ? 'active' : ''],
            ],
            [
                'url' => '/project/create',
                'label' => '新增项目',
                'options' => ['class' => $controllerName == 'create' && $moduleName == 'project' ? 'active' : ''],
            ],
        ],
        'options' => ['class' => $moduleName == 'project' ? 'active' : ''],
    ],
]

如指定页面error使用layouts/empty,方法如下, (*9)

public function beforeAction($action)
{
    if (parent::beforeAction($action)) {
        if ($action->id=='error')
    $this->layout ='empty';
        return true;
    } else {
        return false;
    }
}

inspinia Panel使用, (*10)

<?php Panel::begin([
    'title'=>$this->title,
    'description'=> '描述',
    'toolbar'=>[
        ...
    ]
])?>

    <?php echo GridView::widget([
        'dataProvider' => $dataProvider,
        'tableOptions' => ['class' => 'table table-hover']
    ]); ?>

<?php Panel::end()?>

toolbar参数, (*11)

'toolbar'=>[
        [
    'title' => '',
    'link'  => Url::to(['/']),
    'icon'  => 'wrench',
    'items' => [
    [
        'title' => 'Item 1',
        'link'  => Url::to(['/']),
        'icon'  => 'earth',
    ],
    [
        'title' => 'Item 2',
        'link'  => Url::to(['/']),
        'icon'  => 'pencil',
    ],
    ],
        ],
        [
    'title' => 'QQ',
    'link'  => Url::to(['http://qq.com']),
    'icon'  => 'qq',
        ]
    ]

The Versions

26/07 2017

dev-master

9999999-dev

Inspinia template widgets

  Sources   Download

Apache-2.0

The Requires

 

by Avatar caige

yii2 inspinia assets widgets

26/07 2017

1.3

1.3.0.0

Inspinia template widgets

  Sources   Download

Apache-2.0

The Requires

 

by Avatar caige

yii2 inspinia assets widgets

02/04 2017

1.2

1.2.0.0

Inspinia template widgets

  Sources   Download

Apache-2.0

The Requires

 

by Avatar caige

yii2 inspinia assets widgets

08/02 2017

1.1

1.1.0.0

Inspinia template widgets

  Sources   Download

Apache-2.0

The Requires

 

by Avatar caige

yii2 inspinia assets widgets

01/12 2016

1.0

1.0.0.0

Inspinia template widgets

  Sources   Download

Apache-2.0

The Requires

  • yiisoft/yii2 *
  • yiisoft/yii2-jui *
  • bower-asset/fontawesome *
  • bower-asset/ionrangeslider *
  • bower-asset/knob *
  • bower-asset/switchery *
  • bower-asset/cropper *
  • bower-asset/momentjs *
  • bower-asset/chosen *
  • bower-asset/jquery-sparkline *
  • bower-asset/flot *
  • bower-asset/flot.tooltip *
  • bower-asset/flot-spline *
  • bower-asset/jquery-timeago ^1.5

 

by Avatar caige

yii2 inspinia assets widgets

04/10 2016

0.1

0.1.0.0

Inspinia template widgets

  Sources   Download

Apache-2.0

The Requires

  • yiisoft/yii2 *
  • yiisoft/yii2-jui *
  • bower-asset/fontawesome *
  • bower-asset/ionrangeslider *
  • bower-asset/knob *
  • bower-asset/switchery *
  • bower-asset/cropper *
  • bower-asset/momentjs *
  • bower-asset/chosen *
  • bower-asset/jquery-sparkline *
  • bower-asset/flot *
  • bower-asset/flot.tooltip *
  • bower-asset/flot-spline *
  • bower-asset/jquery-timeago ^1.5

 

by Avatar caige

yii2 inspinia assets widgets