From c6c69b97525d8fc4e6516a2f13cf0f39795c7c02 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 16 Nov 2019 09:31:39 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=8D=87=E7=BA=A7adminlte3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/models/Category.php | 12 +- composer.json | 2 +- composer.lock | 259 +- kcadmin/assets/AppAsset.php | 6 +- kcadmin/views/category/_search.php | 23 +- kcadmin/views/category/index.php | 5 +- kcadmin/views/layouts/breadcrumb.php | 30 +- kcadmin/views/layouts/header.php | 95 +- kcadmin/views/layouts/main.php | 2 - kcadmin/views/layouts/sidebar.php | 9 +- kcadmin/views/site/login.php | 2 +- kcadmin/web/img/logo.jpeg | Bin 0 -> 5580 bytes vendor/blobt/assets/grid/css/grid.css | 12 +- vendor/blobt/web/DataTablesAsset.php | 2 +- vendor/blobt/web/DatepickBootstrapAsset.php | 2 +- vendor/blobt/web/DaterangeBootstrapAsset.php | 2 +- .../blobt/web/DatetimepickBootstrapAsset.php | 2 +- vendor/iron/assets/adminlte/css/adminlte.css | 28485 ++++++++++++++++ .../iron/assets/adminlte/css/adminlte.css.map | 1 + .../iron/assets/adminlte/css/adminlte.min.css | 12 + .../assets/adminlte/css/adminlte.min.css.map | 1 + .../adminlte/css/alt/adminlte.components.css | 5013 +++ .../css/alt/adminlte.components.css.map | 126 + .../css/alt/adminlte.components.min.css | 8 + .../css/alt/adminlte.components.min.css.map | 1 + .../assets/adminlte/css/alt/adminlte.core.css | 15398 +++++++++ .../adminlte/css/alt/adminlte.core.css.map | 242 + .../adminlte/css/alt/adminlte.core.min.css | 13 + .../css/alt/adminlte.core.min.css.map | 1 + .../css/alt/adminlte.extra-components.css | 1049 + .../css/alt/adminlte.extra-components.css.map | 120 + .../css/alt/adminlte.extra-components.min.css | 8 + .../alt/adminlte.extra-components.min.css.map | 1 + .../adminlte/css/alt/adminlte.pages.css | 444 + .../adminlte/css/alt/adminlte.pages.css.map | 124 + .../adminlte/css/alt/adminlte.pages.min.css | 8 + .../css/alt/adminlte.pages.min.css.map | 1 + .../adminlte/css/alt/adminlte.plugins.css | 5977 ++++ .../adminlte/css/alt/adminlte.plugins.css.map | 130 + .../adminlte/css/alt/adminlte.plugins.min.css | 8 + .../css/alt/adminlte.plugins.min.css.map | 1 + vendor/iron/assets/adminlte/js/adminlte.js | 1790 + .../iron/assets/adminlte/js/adminlte.js.map | 1 + .../iron/assets/adminlte/js/adminlte.min.js | 7 + .../assets/adminlte/js/adminlte.min.js.map | 1 + vendor/iron/assets/adminlte/js/demo.js | 413 + .../assets/adminlte/js/pages/dashboard.js | 264 + .../assets/adminlte/js/pages/dashboard2.js | 267 + .../assets/adminlte/js/pages/dashboard3.js | 140 + vendor/iron/assets/font-awesome/css/all.css | 4423 +++ .../assets/font-awesome/css/font-awesome.css | 2337 ++ .../font-awesome/css/font-awesome.min.css | 4 + .../assets/font-awesome/fonts/FontAwesome.otf | Bin 0 -> 134808 bytes .../fonts/fontawesome-webfont.eot | Bin 0 -> 165742 bytes .../fonts/fontawesome-webfont.svg | 2671 ++ .../fonts/fontawesome-webfont.ttf | Bin 0 -> 165548 bytes .../fonts/fontawesome-webfont.woff | Bin 0 -> 98024 bytes .../fonts/fontawesome-webfont.woff2 | Bin 0 -> 77160 bytes .../font-awesome/webfonts/fa-brands-400.eot | Bin 0 -> 130906 bytes .../font-awesome/webfonts/fa-brands-400.svg | 3496 ++ .../font-awesome/webfonts/fa-brands-400.ttf | Bin 0 -> 130600 bytes .../font-awesome/webfonts/fa-brands-400.woff | Bin 0 -> 88428 bytes .../font-awesome/webfonts/fa-brands-400.woff2 | Bin 0 -> 75336 bytes .../font-awesome/webfonts/fa-regular-400.eot | Bin 0 -> 34394 bytes .../font-awesome/webfonts/fa-regular-400.svg | 803 + .../font-awesome/webfonts/fa-regular-400.ttf | Bin 0 -> 34096 bytes .../font-awesome/webfonts/fa-regular-400.woff | Bin 0 -> 16804 bytes .../webfonts/fa-regular-400.woff2 | Bin 0 -> 13584 bytes .../font-awesome/webfonts/fa-solid-900.eot | Bin 0 -> 192758 bytes .../font-awesome/webfonts/fa-solid-900.svg | 4667 +++ .../font-awesome/webfonts/fa-solid-900.ttf | Bin 0 -> 192472 bytes .../font-awesome/webfonts/fa-solid-900.woff | Bin 0 -> 98384 bytes .../font-awesome/webfonts/fa-solid-900.woff2 | Bin 0 -> 75728 bytes vendor/iron/assets/grid/css/grid.css | 65 + .../ionicons/css/open-iconic-bootstrap.css | 952 + .../ionicons/css/open-iconic-bootstrap.less | 960 + .../css/open-iconic-bootstrap.min.css | 1 + .../ionicons/css/open-iconic-bootstrap.scss | 958 + .../ionicons/css/open-iconic-bootstrap.styl | 954 + .../ionicons/css/open-iconic-foundation.css | 1395 + .../ionicons/css/open-iconic-foundation.less | 1397 + .../css/open-iconic-foundation.min.css | 1 + .../ionicons/css/open-iconic-foundation.scss | 1398 + .../ionicons/css/open-iconic-foundation.styl | 1392 + .../iron/assets/ionicons/css/open-iconic.css | 511 + .../iron/assets/ionicons/css/open-iconic.less | 962 + .../assets/ionicons/css/open-iconic.min.css | 1 + .../iron/assets/ionicons/css/open-iconic.scss | 963 + .../iron/assets/ionicons/css/open-iconic.styl | 733 + .../assets/ionicons/fonts/open-iconic.eot | Bin 0 -> 28196 bytes .../assets/ionicons/fonts/open-iconic.otf | Bin 0 -> 20996 bytes .../assets/ionicons/fonts/open-iconic.svg | 543 + .../assets/ionicons/fonts/open-iconic.ttf | Bin 0 -> 28028 bytes .../assets/ionicons/fonts/open-iconic.woff | Bin 0 -> 14984 bytes .../generators/crud/default/views/_search.php | 8 +- .../generators/crud/default/views/index.php | 4 +- vendor/iron/grid/ActionColumn.php | 6 +- vendor/iron/grid/GridView.php | 697 + vendor/iron/web/AdminlteAsset.php | 55 + vendor/iron/web/FontAwesomeAsset.php | 48 + vendor/iron/web/GridViewAsset.php | 57 + vendor/iron/web/IoniconsAsset.php | 48 + vendor/iron/widgets/Menu.php | 337 + 103 files changed, 93138 insertions(+), 229 deletions(-) create mode 100644 kcadmin/web/img/logo.jpeg create mode 100755 vendor/iron/assets/adminlte/css/adminlte.css create mode 100755 vendor/iron/assets/adminlte/css/adminlte.css.map create mode 100755 vendor/iron/assets/adminlte/css/adminlte.min.css create mode 100755 vendor/iron/assets/adminlte/css/adminlte.min.css.map create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.components.css create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.components.css.map create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.components.min.css create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.components.min.css.map create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.core.css create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.core.css.map create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.core.min.css create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.core.min.css.map create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.extra-components.css create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.extra-components.css.map create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.extra-components.min.css create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.extra-components.min.css.map create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.pages.css create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.pages.css.map create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.pages.min.css create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.pages.min.css.map create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.plugins.css create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.plugins.css.map create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.plugins.min.css create mode 100644 vendor/iron/assets/adminlte/css/alt/adminlte.plugins.min.css.map create mode 100644 vendor/iron/assets/adminlte/js/adminlte.js create mode 100644 vendor/iron/assets/adminlte/js/adminlte.js.map create mode 100644 vendor/iron/assets/adminlte/js/adminlte.min.js create mode 100644 vendor/iron/assets/adminlte/js/adminlte.min.js.map create mode 100644 vendor/iron/assets/adminlte/js/demo.js create mode 100644 vendor/iron/assets/adminlte/js/pages/dashboard.js create mode 100644 vendor/iron/assets/adminlte/js/pages/dashboard2.js create mode 100644 vendor/iron/assets/adminlte/js/pages/dashboard3.js create mode 100644 vendor/iron/assets/font-awesome/css/all.css create mode 100644 vendor/iron/assets/font-awesome/css/font-awesome.css create mode 100644 vendor/iron/assets/font-awesome/css/font-awesome.min.css create mode 100644 vendor/iron/assets/font-awesome/fonts/FontAwesome.otf create mode 100644 vendor/iron/assets/font-awesome/fonts/fontawesome-webfont.eot create mode 100644 vendor/iron/assets/font-awesome/fonts/fontawesome-webfont.svg create mode 100644 vendor/iron/assets/font-awesome/fonts/fontawesome-webfont.ttf create mode 100644 vendor/iron/assets/font-awesome/fonts/fontawesome-webfont.woff create mode 100644 vendor/iron/assets/font-awesome/fonts/fontawesome-webfont.woff2 create mode 100644 vendor/iron/assets/font-awesome/webfonts/fa-brands-400.eot create mode 100644 vendor/iron/assets/font-awesome/webfonts/fa-brands-400.svg create mode 100644 vendor/iron/assets/font-awesome/webfonts/fa-brands-400.ttf create mode 100644 vendor/iron/assets/font-awesome/webfonts/fa-brands-400.woff create mode 100644 vendor/iron/assets/font-awesome/webfonts/fa-brands-400.woff2 create mode 100644 vendor/iron/assets/font-awesome/webfonts/fa-regular-400.eot create mode 100644 vendor/iron/assets/font-awesome/webfonts/fa-regular-400.svg create mode 100644 vendor/iron/assets/font-awesome/webfonts/fa-regular-400.ttf create mode 100644 vendor/iron/assets/font-awesome/webfonts/fa-regular-400.woff create mode 100644 vendor/iron/assets/font-awesome/webfonts/fa-regular-400.woff2 create mode 100644 vendor/iron/assets/font-awesome/webfonts/fa-solid-900.eot create mode 100644 vendor/iron/assets/font-awesome/webfonts/fa-solid-900.svg create mode 100644 vendor/iron/assets/font-awesome/webfonts/fa-solid-900.ttf create mode 100644 vendor/iron/assets/font-awesome/webfonts/fa-solid-900.woff create mode 100644 vendor/iron/assets/font-awesome/webfonts/fa-solid-900.woff2 create mode 100644 vendor/iron/assets/grid/css/grid.css create mode 100644 vendor/iron/assets/ionicons/css/open-iconic-bootstrap.css create mode 100644 vendor/iron/assets/ionicons/css/open-iconic-bootstrap.less create mode 100644 vendor/iron/assets/ionicons/css/open-iconic-bootstrap.min.css create mode 100644 vendor/iron/assets/ionicons/css/open-iconic-bootstrap.scss create mode 100644 vendor/iron/assets/ionicons/css/open-iconic-bootstrap.styl create mode 100644 vendor/iron/assets/ionicons/css/open-iconic-foundation.css create mode 100644 vendor/iron/assets/ionicons/css/open-iconic-foundation.less create mode 100644 vendor/iron/assets/ionicons/css/open-iconic-foundation.min.css create mode 100644 vendor/iron/assets/ionicons/css/open-iconic-foundation.scss create mode 100644 vendor/iron/assets/ionicons/css/open-iconic-foundation.styl create mode 100644 vendor/iron/assets/ionicons/css/open-iconic.css create mode 100644 vendor/iron/assets/ionicons/css/open-iconic.less create mode 100644 vendor/iron/assets/ionicons/css/open-iconic.min.css create mode 100644 vendor/iron/assets/ionicons/css/open-iconic.scss create mode 100644 vendor/iron/assets/ionicons/css/open-iconic.styl create mode 100644 vendor/iron/assets/ionicons/fonts/open-iconic.eot create mode 100644 vendor/iron/assets/ionicons/fonts/open-iconic.otf create mode 100644 vendor/iron/assets/ionicons/fonts/open-iconic.svg create mode 100644 vendor/iron/assets/ionicons/fonts/open-iconic.ttf create mode 100644 vendor/iron/assets/ionicons/fonts/open-iconic.woff create mode 100644 vendor/iron/grid/GridView.php create mode 100644 vendor/iron/web/AdminlteAsset.php create mode 100644 vendor/iron/web/FontAwesomeAsset.php create mode 100644 vendor/iron/web/GridViewAsset.php create mode 100644 vendor/iron/web/IoniconsAsset.php create mode 100644 vendor/iron/widgets/Menu.php diff --git a/common/models/Category.php b/common/models/Category.php index 150f849..e54bd84 100644 --- a/common/models/Category.php +++ b/common/models/Category.php @@ -81,32 +81,32 @@ class Category extends \yii\db\ActiveRecord ], [ 'attribute' => 'id', - 'width' => '5%', + 'width' => '10%', 'align' => 'center' ], [ 'attribute' => 'created_at', - 'width' => '7%', + 'width' => '10%', 'format' => 'date' ], [ 'attribute' => 'cat_name', - 'width' => '13%', + 'width' => '10%', ], [ 'attribute' => 'icon', - 'width' => '5%', + 'width' => '10%', ], [ 'attribute' => 'icon_type', - 'width' => '7%', + 'width' => '10%', 'showConstText' => true ], [ 'attribute' => 'description', 'enableSorting' => false, 'format' => 'ntext', - 'width' => '50%', + 'width' => '20%', ], [ 'class' => 'iron\grid\ActionColumn', diff --git a/composer.json b/composer.json index 3719903..0c1c701 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "require": { "php": ">=7.1.0", "yiisoft/yii2": "~2.0.14", - "yiisoft/yii2-bootstrap": "^2.0@dev", + "yiisoft/yii2-bootstrap4": "~2.0.6", "moonlandsoft/yii2-phpexcel": "*" }, "repositories": { diff --git a/composer.lock b/composer.lock index d760883..4717707 100644 --- a/composer.lock +++ b/composer.lock @@ -4,58 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3f23bd556b4acf6c2728200635bf4eb6", + "content-hash": "0b877f5de588db414192c9663665b6d1", "packages": [ - { - "name": "bower-asset/bootstrap", - "version": "v3.4.1", - "source": { - "type": "git", - "url": "git@github.com:twbs/bootstrap.git", - "reference": "68b0d231a13201eb14acd3dc84e51543d16e5f7e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twbs/bootstrap/zipball/68b0d231a13201eb14acd3dc84e51543d16e5f7e", - "reference": "68b0d231a13201eb14acd3dc84e51543d16e5f7e", - "shasum": "" - }, - "require": { - "bower-asset/jquery": ">=1.9.1,<4.0" - }, - "type": "bower-asset-library", - "extra": { - "bower-asset-main": [ - "less/bootstrap.less", - "dist/js/bootstrap.js" - ], - "bower-asset-ignore": [ - "/.*", - "_config.yml", - "CNAME", - "composer.json", - "CONTRIBUTING.md", - "docs", - "js/tests", - "test-infra" - ] - }, - "license": [ - "MIT" - ], - "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", - "keywords": [ - "css", - "framework", - "front-end", - "js", - "less", - "mobile-first", - "responsive", - "web" - ], - "time": "2019-02-13T15:55:38+00:00" - }, { "name": "bower-asset/inputmask", "version": "3.3.11", @@ -121,7 +71,7 @@ "version": "3.4.1", "source": { "type": "git", - "url": "https://github.com/jquery/jquery-dist.git", + "url": "git@github.com:jquery/jquery-dist.git", "reference": "15bc73803f76bc53b654b9fdbbbc096f56d7c03d" }, "dist": { @@ -153,7 +103,7 @@ "version": "v1.3.2", "source": { "type": "git", - "url": "git@github.com:bestiejs/punycode.js.git", + "url": "https://github.com/bestiejs/punycode.js.git", "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3" }, "dist": { @@ -277,23 +227,23 @@ }, { "name": "ezyang/htmlpurifier", - "version": "v4.10.0", + "version": "v4.12.0", "source": { "type": "git", "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "d85d39da4576a6934b72480be6978fb10c860021" + "reference": "a617e55bc62a87eec73bd456d146d134ad716f03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d85d39da4576a6934b72480be6978fb10c860021", - "reference": "d85d39da4576a6934b72480be6978fb10c860021", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/a617e55bc62a87eec73bd456d146d134ad716f03", + "reference": "a617e55bc62a87eec73bd456d146d134ad716f03", "shasum": "" }, "require": { "php": ">=5.2" }, "require-dev": { - "simpletest/simpletest": "^1.1" + "simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd" }, "type": "library", "autoload": { @@ -306,7 +256,7 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "LGPL" + "LGPL-2.1-or-later" ], "authors": [ { @@ -320,7 +270,7 @@ "keywords": [ "html" ], - "time": "2018-02-23T01:58:20+00:00" + "time": "2019-10-28T03:44:26+00:00" }, { "name": "markbaker/complex", @@ -531,18 +481,30 @@ ], "time": "2019-01-31T14:14:03+00:00" }, + { + "name": "npm-asset/bootstrap", + "version": "4.3.1", + "dist": { + "type": "tar", + "url": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.3.1.tgz" + }, + "type": "npm-asset", + "license": [ + "MIT" + ] + }, { "name": "phpoffice/phpspreadsheet", "version": "dev-master", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "13eaeb39cfaed16409f7fd9d1968e08be7bfd7e5" + "reference": "75dfcb5a364a33ecc1f7e57e636dda86c617aa78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/13eaeb39cfaed16409f7fd9d1968e08be7bfd7e5", - "reference": "13eaeb39cfaed16409f7fd9d1968e08be7bfd7e5", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/75dfcb5a364a33ecc1f7e57e636dda86c617aa78", + "reference": "75dfcb5a364a33ecc1f7e57e636dda86c617aa78", "shasum": "" }, "require": { @@ -560,19 +522,19 @@ "ext-zip": "*", "ext-zlib": "*", "markbaker/complex": "^1.4", - "markbaker/matrix": "^1.1", + "markbaker/matrix": "^1.2", "php": "^7.1", "psr/simple-cache": "^1.0" }, "require-dev": { - "dompdf/dompdf": "^0.8.0", - "friendsofphp/php-cs-fixer": "@stable", + "dompdf/dompdf": "^0.8.3", + "friendsofphp/php-cs-fixer": "^2.16", "jpgraph/jpgraph": "^4.0", - "mpdf/mpdf": "^7.0.0", - "phpcompatibility/php-compatibility": "^8.0", + "mpdf/mpdf": "^8.0", + "phpcompatibility/php-compatibility": "^9.3", "phpunit/phpunit": "^7.5", - "squizlabs/php_codesniffer": "^3.3", - "tecnickcom/tcpdf": "^6.2" + "squizlabs/php_codesniffer": "^3.5", + "tecnickcom/tcpdf": "^6.3" }, "suggest": { "dompdf/dompdf": "Option for rendering PDF with PDF Writer", @@ -622,7 +584,7 @@ "xls", "xlsx" ], - "time": "2019-10-31T23:52:20+00:00" + "time": "2019-11-10T21:59:09+00:00" }, { "name": "psr/simple-cache", @@ -678,12 +640,12 @@ "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-framework.git", - "reference": "f61cfa2ab22ddf82377f5c3428066689123b50e5" + "reference": "e5aa7e91f3c310cd47aaeb0eee05d69b2e8c7ed0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/f61cfa2ab22ddf82377f5c3428066689123b50e5", - "reference": "f61cfa2ab22ddf82377f5c3428066689123b50e5", + "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/e5aa7e91f3c310cd47aaeb0eee05d69b2e8c7ed0", + "reference": "e5aa7e91f3c310cd47aaeb0eee05d69b2e8c7ed0", "shasum": "" }, "require": { @@ -770,38 +732,39 @@ "framework", "yii2" ], - "time": "2019-07-10T18:16:39+00:00" + "time": "2019-11-12T18:18:10+00:00" }, { - "name": "yiisoft/yii2-bootstrap", - "version": "dev-master", + "name": "yiisoft/yii2-bootstrap4", + "version": "2.0.8", "source": { "type": "git", - "url": "https://github.com/yiisoft/yii2-bootstrap.git", - "reference": "40a00e20b66057cd32d0c8bbc9377dc0223e541a" + "url": "https://github.com/yiisoft/yii2-bootstrap4.git", + "reference": "c67ae3f3624c35d977841f6b18d0d752ebed6420" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/40a00e20b66057cd32d0c8bbc9377dc0223e541a", - "reference": "40a00e20b66057cd32d0c8bbc9377dc0223e541a", + "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap4/zipball/c67ae3f3624c35d977841f6b18d0d752ebed6420", + "reference": "c67ae3f3624c35d977841f6b18d0d752ebed6420", "shasum": "" }, "require": { - "bower-asset/bootstrap": "3.4.* | 3.3.* | 3.2.* | 3.1.*", - "yiisoft/yii2": "~2.0.6" + "npm-asset/bootstrap": "^4.3", + "yiisoft/yii2": "~2.0" }, "require-dev": { - "phpunit/phpunit": "<7" + "phpunit/phpunit": "<7", + "yiisoft/yii2-coding-standards": "~2.0" }, "type": "yii2-extension", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "yii\\bootstrap\\": "src" + "yii\\bootstrap4\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -810,8 +773,9 @@ ], "authors": [ { - "name": "Paul Klimov", - "email": "klimov.paul@gmail.com" + "name": "Qiang Xue", + "email": "qiang.xue@gmail.com", + "homepage": "http://www.yiiframework.com/" }, { "name": "Alexander Makarov", @@ -823,17 +787,21 @@ "email": "amigo.cobos@gmail.com" }, { - "name": "Qiang Xue", - "email": "qiang.xue@gmail.com", - "homepage": "http://www.yiiframework.com/" + "name": "Paul Klimov", + "email": "klimov.paul@gmail.com" + }, + { + "name": "Simon Karlen", + "email": "simi.albi@outlook.com" } ], "description": "The Twitter Bootstrap extension for the Yii framework", "keywords": [ "bootstrap", + "bootstrap4", "yii2" ], - "time": "2019-05-23T16:20:29+00:00" + "time": "2019-10-08T11:01:37+00:00" }, { "name": "yiisoft/yii2-composer", @@ -841,12 +809,12 @@ "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-composer.git", - "reference": "fa0856bb95beb49d30f408639224b0e0ed26b4f3" + "reference": "602673880e00bc2cc6d874b0714382775b372ac2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/fa0856bb95beb49d30f408639224b0e0ed26b4f3", - "reference": "fa0856bb95beb49d30f408639224b0e0ed26b4f3", + "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/602673880e00bc2cc6d874b0714382775b372ac2", + "reference": "602673880e00bc2cc6d874b0714382775b372ac2", "shasum": "" }, "require": { @@ -888,7 +856,7 @@ "extension installer", "yii2" ], - "time": "2019-05-28T08:14:44+00:00" + "time": "2019-07-16T13:22:50+00:00" } ], "packages-dev": [ @@ -898,12 +866,12 @@ "source": { "type": "git", "url": "https://github.com/kint-php/kint.git", - "reference": "339b24fc0439d61644ddcc5d5f52cf5fdfbe3fa3" + "reference": "5cc6ac40c3b8aed404ee65a6b98a7c7ef6e6ffbb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kint-php/kint/zipball/339b24fc0439d61644ddcc5d5f52cf5fdfbe3fa3", - "reference": "339b24fc0439d61644ddcc5d5f52cf5fdfbe3fa3", + "url": "https://api.github.com/repos/kint-php/kint/zipball/5cc6ac40c3b8aed404ee65a6b98a7c7ef6e6ffbb", + "reference": "5cc6ac40c3b8aed404ee65a6b98a7c7ef6e6ffbb", "shasum": "" }, "require": { @@ -940,14 +908,14 @@ "MIT" ], "authors": [ - { - "name": "Rokas Šleinius", - "homepage": "https://github.com/raveren" - }, { "name": "Jonathan Vollebregt", "homepage": "https://github.com/jnvsor" }, + { + "name": "Rokas Šleinius", + "homepage": "https://github.com/raveren" + }, { "name": "Contributors", "homepage": "https://github.com/kint-php/kint/graphs/contributors" @@ -960,7 +928,68 @@ "kint", "php" ], - "time": "2019-07-11T17:29:14+00:00" + "time": "2019-10-14T18:57:03+00:00" + }, + { + "name": "opis/closure", + "version": "3.4.1", + "source": { + "type": "git", + "url": "https://github.com/opis/closure.git", + "reference": "e79f851749c3caa836d7ccc01ede5828feb762c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/opis/closure/zipball/e79f851749c3caa836d7ccc01ede5828feb762c7", + "reference": "e79f851749c3caa836d7ccc01ede5828feb762c7", + "shasum": "" + }, + "require": { + "php": "^5.4 || ^7.0" + }, + "require-dev": { + "jeremeamia/superclosure": "^2.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Opis\\Closure\\": "src/" + }, + "files": [ + "functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marius Sarca", + "email": "marius.sarca@gmail.com" + }, + { + "name": "Sorin Sarca", + "email": "sarca_sorin@hotmail.com" + } + ], + "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", + "homepage": "https://opis.io/closure", + "keywords": [ + "anonymous functions", + "closure", + "function", + "serializable", + "serialization", + "serialize" + ], + "time": "2019-10-19T18:38:51+00:00" }, { "name": "phpspec/php-diff", @@ -1002,20 +1031,21 @@ }, { "name": "yiisoft/yii2-debug", - "version": "2.1.5", + "version": "2.1.11", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-debug.git", - "reference": "a6bbf55093e154e2eeb2c778af8717989495270e" + "reference": "72e7c6c454028366f14ccef5a93d6c18fc9dcd63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/a6bbf55093e154e2eeb2c778af8717989495270e", - "reference": "a6bbf55093e154e2eeb2c778af8717989495270e", + "url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/72e7c6c454028366f14ccef5a93d6c18fc9dcd63", + "reference": "72e7c6c454028366f14ccef5a93d6c18fc9dcd63", "shasum": "" }, "require": { "ext-mbstring": "*", + "opis/closure": "^3.3", "php": ">=5.4", "yiisoft/yii2": "~2.0.13" }, @@ -1055,20 +1085,20 @@ "debugger", "yii2" ], - "time": "2019-06-04T14:21:49+00:00" + "time": "2019-11-05T13:56:49+00:00" }, { "name": "yiisoft/yii2-gii", - "version": "2.1.0", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-gii.git", - "reference": "d1c18f0dcbd72ab285acd320c56b1aa2554e06fa" + "reference": "cf3e81953a9e9796eed4021f3065bc5c18ee3356" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-gii/zipball/d1c18f0dcbd72ab285acd320c56b1aa2554e06fa", - "reference": "d1c18f0dcbd72ab285acd320c56b1aa2554e06fa", + "url": "https://api.github.com/repos/yiisoft/yii2-gii/zipball/cf3e81953a9e9796eed4021f3065bc5c18ee3356", + "reference": "cf3e81953a9e9796eed4021f3065bc5c18ee3356", "shasum": "" }, "require": { @@ -1106,13 +1136,12 @@ "gii", "yii2" ], - "time": "2019-03-17T19:23:15+00:00" + "time": "2019-10-08T10:28:42+00:00" } ], "aliases": [], "minimum-stability": "dev", "stability-flags": { - "yiisoft/yii2-bootstrap": 20, "yiisoft/yii2-debug": 20, "kint-php/kint": 20, "yiisoft/yii2-gii": 20 diff --git a/kcadmin/assets/AppAsset.php b/kcadmin/assets/AppAsset.php index 64d62bb..d4f192e 100644 --- a/kcadmin/assets/AppAsset.php +++ b/kcadmin/assets/AppAsset.php @@ -19,8 +19,8 @@ class AppAsset extends AssetBundle ]; public $depends = [ 'yii\web\YiiAsset', - 'yii\bootstrap\BootstrapAsset', - 'yii\bootstrap\BootstrapPluginAsset', - 'blobt\web\AdminlteAsset', + 'yii\bootstrap4\BootstrapAsset', + 'yii\bootstrap4\BootstrapPluginAsset', + 'iron\web\AdminlteAsset', ]; } diff --git a/kcadmin/views/category/_search.php b/kcadmin/views/category/_search.php index 03e5587..96eb2a9 100644 --- a/kcadmin/views/category/_search.php +++ b/kcadmin/views/category/_search.php @@ -12,14 +12,14 @@ use blobt\widgets\DateRangePicker; ['index'], - 'method' => 'get', - 'validateOnType' => true, - ]); + 'action' => ['index'], + 'method' => 'get', + 'validateOnType' => true, +]); ?> -
-
+
+
field($model, 'cat_name', [ "template" => "{input}{error}", @@ -32,7 +32,8 @@ $form = ActiveForm::begin([ ] ]) ?> - +
+
field($model, "created_at_range", [ "template" => "{input}{error}", @@ -44,10 +45,10 @@ $form = ActiveForm::begin([ ] ])->widget(DateRangePicker::className()); ?> -
- ', ['class' => 'btn btn-default']) ?> - ', ['class' => 'btn btn-default']) ?> -
+
+
+ ', ['class' => 'btn btn-default']) ?> + ', ['class' => 'btn btn-default']) ?>
diff --git a/kcadmin/views/category/index.php b/kcadmin/views/category/index.php index 02af451..7fe8ef4 100644 --- a/kcadmin/views/category/index.php +++ b/kcadmin/views/category/index.php @@ -1,7 +1,7 @@ params['breadcrumbs'][] = $this->title; ?>
-
- 'btn btn-default'])?> +
$dataProvider, 'filter' => $this->render("_search", ['model' => $searchModel]), diff --git a/kcadmin/views/layouts/breadcrumb.php b/kcadmin/views/layouts/breadcrumb.php index a159020..57806ab 100644 --- a/kcadmin/views/layouts/breadcrumb.php +++ b/kcadmin/views/layouts/breadcrumb.php @@ -1,13 +1,25 @@ -title)): ?> -

title ?>params['subtitle'])): ?>params['subtitle'] ?>

- - 'ol', - 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], -]); -?> \ No newline at end of file +
+
+
+ title)): ?> +

title ?>params['subtitle'])): ?> + params['subtitle'] ?>

+ +
+
+ 'ol', + 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], + 'itemTemplate' => "\n", + 'activeItemTemplate' => "
  • {link}
  • \n", + 'options' => ['class' => 'breadcrumb float-sm-right'] + ]); + ?> +
    +
    \ No newline at end of file diff --git a/kcadmin/views/layouts/header.php b/kcadmin/views/layouts/header.php index 2bbba81..0fd795d 100644 --- a/kcadmin/views/layouts/header.php +++ b/kcadmin/views/layouts/header.php @@ -1,71 +1,49 @@ -
    - - - -
    - + \ No newline at end of file diff --git a/kcadmin/views/layouts/main.php b/kcadmin/views/layouts/main.php index 421217b..2384cae 100644 --- a/kcadmin/views/layouts/main.php +++ b/kcadmin/views/layouts/main.php @@ -4,8 +4,6 @@ use kcadmin\assets\AppAsset; use yii\helpers\Html; -use yii\bootstrap\Nav; -use yii\bootstrap\NavBar; use yii\widgets\Breadcrumbs; AppAsset::register($this); diff --git a/kcadmin/views/layouts/sidebar.php b/kcadmin/views/layouts/sidebar.php index a164ca5..befdd05 100644 --- a/kcadmin/views/layouts/sidebar.php +++ b/kcadmin/views/layouts/sidebar.php @@ -1,8 +1,13 @@ -
    +
    +
    + {items} +
    +
    +
    +
    +
    + {summary} +
    +
    +
    +
    + {pager} +
    +
    +
    +
    +
    +HTML; + public $batchTemplate = <<< HTML +
    + + + +
    +HTML; + + /** + * 初始化 grid view. + * 初始化必须的属性和每个列对象 + * @return + */ + public function init() + { + parent::init(); + if ($this->formatter === null) { + $this->formatter = Yii::$app->getFormatter(); + } elseif (is_array($this->formatter)) { + $this->formatter = Yii::createObject($this->formatter); + } + if (!$this->formatter instanceof Formatter) { + throw new InvalidConfigException('The "formatter" property must be either a Format object or a configuration array.'); + } + $this->pager = [ + 'options'=>['class'=>['justify-content-end','pagination']], + 'linkOptions'=>['class'=>'page-link'], + 'pageCssClass'=>'paginate_button page-item', + 'disabledPageCssClass'=>'page-link disabled', + 'firstPageLabel'=>'«', + 'prevPageLabel'=>'‹', + 'nextPageLabel'=>'›', + 'lastPageLabel'=>'»',]; + $this->initColumns(); + } + + public function run() + { + $view = $this->getView(); + GridViewAsset::register($view); + $this->registerGridJs(); + $this->registerIcheckJs(); + $this->registerConfirmJs(); + $this->registerExportJs(); + parent::run(); + } + + /** + * 注册GridView Js + */ + protected function registerGridJs() + { + $options = Json::htmlEncode(['filterUrl' => Url::to(Yii::$app->request->url), + 'filterSelector' => $this->filterSelector]); + $id = $this->options['id']; + $this->getView()->registerJs("jQuery('#$id').yiiGridView($options);"); + } + + /** + * 注册icheck Js + */ + protected function registerIcheckJs() + { + $js = <<