2017 © Pedro Peláez
 

yii2-extension yii2-adminview

Yii2 开源后台模板。使用非常简单,只需要简单几步就可完成!

image

yiioctopus/yii2-adminview

Yii2 开源后台模板。使用非常简单,只需要简单几步就可完成!

  • Tuesday, January 23, 2018
  • by wang-zhong-lin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • CSS
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

yii2-adminview

Yii2 开源后台模板。使用非常简单,只需要简单几步就可完成!, (*1)

安装

安装这个扩展的首选方法是通过 composer。, (*2)

可以运行, (*3)

composer require --prefer-dist yiioctopus/yii2-adminview "*"

也可以添加, (*4)

"yiioctopus/yii2-adminview": "*"

到你的 composer.json 文件的包含部分。, (*5)

使用

一旦扩展安装完成,你可以简单的使用它如以下代码:, (*6)

Setting

Edit @app/assets/AppAsset.php, (*7)


class AppAsset extends AssetBundle { public $basePath = '@webroot'; public $baseUrl = '@web'; public $css = [ 'css/site.css', ]; public $js = [ ]; public $depends = [ 'yii\web\YiiAsset', 'yiioctopus\adminview\AdminviewAsset', ]; }

Add 'yiioctopus\adminview\AdminviewAsset' to $depends, (*8)

Setting layouts

The layouts @app/views/layouts/main.php code:, (*9)


beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode($this->title) ?></title>
    <?php $this->head() ?>
</head>
<body class="theme-blue">
beginBody() ?>

    <?php
        MainHeader::begin([
            'brandName' => 'Yii Octopus',
            //'brandUrl' => 'http://www.hostname.com',
            'userName' => 'yiioctopus',
            'options' => [
                'account' => [
                    'name' => '个人中心',
                    'url' => Url::to(['user/userinfo'],true),
                ],
                'panel' => [
                    [
                        'name' => 'Users',
                        'url' => Url::to(['user/index'],true),
                    ],
                    [
                        'name' => 'Security',
                        'url' => Url::to(['user/security'],true),
                    ],
                ],
                'logout' => [
                    'name' => '退出',
                    'url' => Url::to(['user/logout'],true),
                ],
            ]
        ]);

        MainMenu::begin([
            'items' => [
                [
                    'label' => Html::tag('i','',['class'=>'fa fa-fw fa-dashboard']).' Dashboard',
                    'target' => 'dashboard-menu',
                    'items' => [
                        [
                            'label' => 'Login',
                            'url' => ['site/login'],
                        ],
                        [
                            'label' => 'media',
                            'url' => ['site/media'],
                        ],
                    ],
                ],
            ],
            'options' => [
                'active' => [Yii::$app->controller->id .'/'. Yii::$app->controller->action->id],
            ]
        ]);
    ?>

    <div class="content">

        <?= $content ?>

        <footer>
            <hr>
            <p class="pull-right">Collect from <a href="#" title="首页" target="_blank">首页</a></p>
            <p>© <?= date('Y-m-d') ?> <a href="#" target="_blank">Portnine</a></p>
        </footer>
    </div>

endBody() ?>
</body>
</html>
endPage() ?>

Usage & Document demo

http://octopus.aimeen.com/yii2-adminview, (*10)

The Versions

23/01 2018

dev-master

9999999-dev http://octopus.aimeen.com

Yii2 开源后台模板。使用非常简单,只需要简单几步就可完成!

  Sources   Download

BSD-3-Clause

The Requires

 

by wzl

yii2 jquery bootstrap yii2-extension google-api

09/01 2018

1.0.0.0

1.0.0.0 http://yiioctopus.aimeen.com

Yii2 开源后台模板。使用非常简单,只需要简单几步就可完成!

  Sources   Download

BSD 3-Clause

The Requires

 

by wzl

yii2 jquery bootstrap yii2-extension google-api