diff --git a/CHANGELOG.md b/CHANGELOG.md index a828750275..0226aa32b2 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). In order to read more about upgrading and BC breaks have a look at the [UPGRADE Document](UPGRADE.md). +## 2.0.3 + ++ [#318](https://github.com/luyadev/luya-module-admin/issues/318) Enable scheduling for toggleStatus ngrest plugin. + ## 2.0.2 (13. June 2019) ### Fixed diff --git a/composer.json b/composer.json index f7e8775547..211d5b668c 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,6 @@ }, "require-dev" : { "luyadev/luya-testsuite" : "~1.0.11", - "php-coveralls/php-coveralls": "^1.0", "twbs/bootstrap": "~4.3.0", "bower-asset/angular" : "^1.7", "bower-asset/angular-loading-bar" : "^0.9", @@ -44,12 +43,13 @@ }, "autoload-dev" : { "psr-4" : { - "admintests\\" : "tests/" + "admintests\\" : "tests/", + "luya\\admin\\tests\\" : "tests/" } }, - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" }, "luya" : { "bootstrap": ["\\luya\\admin\\Bootstrap"] diff --git a/composer.lock b/composer.lock index 1eab53318b..1de563d2b9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e5c0f3aa97dd636eb7893380ad4100bf", + "content-hash": "e2e4dc86b310720ed868b2bb24841a34", "packages": [ { "name": "bower-asset/inputmask", @@ -349,16 +349,16 @@ }, { "name": "yiisoft/yii2", - "version": "2.0.19", + "version": "2.0.20", "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-framework.git", - "reference": "3e74c7338dd83cea6ffc6f5c25202b9f2f271f89" + "reference": "bd05e0e0ac353cb239997da78f459d0960a1fe9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/3e74c7338dd83cea6ffc6f5c25202b9f2f271f89", - "reference": "3e74c7338dd83cea6ffc6f5c25202b9f2f271f89", + "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/bd05e0e0ac353cb239997da78f459d0960a1fe9f", + "reference": "bd05e0e0ac353cb239997da78f459d0960a1fe9f", "shasum": "" }, "require": { @@ -445,7 +445,7 @@ "framework", "yii2" ], - "time": "2019-05-21T16:01:16+00:00" + "time": "2019-06-04T19:10:59+00:00" }, { "name": "yiisoft/yii2-composer", @@ -675,7 +675,7 @@ "version": "0.9.0", "source": { "type": "git", - "url": "https://github.com/chieffancypants/angular-loading-bar.git", + "url": "git@github.com:chieffancypants/angular-loading-bar.git", "reference": "d734873e52ded18fa27d67f52272ae43267dfd63" }, "dist": { @@ -978,102 +978,6 @@ ], "time": "2015-06-14T21:17:01+00:00" }, - { - "name": "guzzle/guzzle", - "version": "v3.9.3", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle3.git", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=5.3.3", - "symfony/event-dispatcher": "~2.1" - }, - "replace": { - "guzzle/batch": "self.version", - "guzzle/cache": "self.version", - "guzzle/common": "self.version", - "guzzle/http": "self.version", - "guzzle/inflection": "self.version", - "guzzle/iterator": "self.version", - "guzzle/log": "self.version", - "guzzle/parser": "self.version", - "guzzle/plugin": "self.version", - "guzzle/plugin-async": "self.version", - "guzzle/plugin-backoff": "self.version", - "guzzle/plugin-cache": "self.version", - "guzzle/plugin-cookie": "self.version", - "guzzle/plugin-curlauth": "self.version", - "guzzle/plugin-error-response": "self.version", - "guzzle/plugin-history": "self.version", - "guzzle/plugin-log": "self.version", - "guzzle/plugin-md5": "self.version", - "guzzle/plugin-mock": "self.version", - "guzzle/plugin-oauth": "self.version", - "guzzle/service": "self.version", - "guzzle/stream": "self.version" - }, - "require-dev": { - "doctrine/cache": "~1.3", - "monolog/monolog": "~1.0", - "phpunit/phpunit": "3.7.*", - "psr/log": "~1.0", - "symfony/class-loader": "~2.1", - "zendframework/zend-cache": "2.*,<2.3", - "zendframework/zend-log": "2.*,<2.3" - }, - "suggest": { - "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.9-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle": "src/", - "Guzzle\\Tests": "tests/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Guzzle Community", - "homepage": "https://github.com/guzzle/guzzle/contributors" - } - ], - "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "abandoned": "guzzlehttp/guzzle", - "time": "2015-03-18T18:23:50+00:00" - }, { "name": "luyadev/luya-composer", "version": "1.0.5", @@ -1183,16 +1087,16 @@ }, { "name": "luyadev/luya-module-cms", - "version": "1.0.9", + "version": "1.0.9.1", "source": { "type": "git", "url": "https://github.com/luyadev/luya-module-cms.git", - "reference": "f5153ddc3211f73cfd3661f5866349c159e5e99a" + "reference": "e8325864007f4ca0ed7a860d844cff10d48c4475" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/luyadev/luya-module-cms/zipball/f5153ddc3211f73cfd3661f5866349c159e5e99a", - "reference": "f5153ddc3211f73cfd3661f5866349c159e5e99a", + "url": "https://api.github.com/repos/luyadev/luya-module-cms/zipball/e8325864007f4ca0ed7a860d844cff10d48c4475", + "reference": "e8325864007f4ca0ed7a860d844cff10d48c4475", "shasum": "" }, "require-dev": { @@ -1243,26 +1147,26 @@ "yii2", "yii2-cms" ], - "time": "2019-02-18T09:55:07+00:00" + "time": "2019-05-27T13:33:24+00:00" }, { "name": "luyadev/luya-testsuite", - "version": "1.0.17", + "version": "1.0.17.1", "source": { "type": "git", "url": "https://github.com/luyadev/luya-testsuite.git", - "reference": "a509ada5495cce4b249ba8485b762164e30c533c" + "reference": "33f9f454a5a069cfe48d6347039fdef5f4d47efd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/luyadev/luya-testsuite/zipball/a509ada5495cce4b249ba8485b762164e30c533c", - "reference": "a509ada5495cce4b249ba8485b762164e30c533c", + "url": "https://api.github.com/repos/luyadev/luya-testsuite/zipball/33f9f454a5a069cfe48d6347039fdef5f4d47efd", + "reference": "33f9f454a5a069cfe48d6347039fdef5f4d47efd", "shasum": "" }, "require": { "curl/curl": "^2.0 || ^1.0", "luyadev/luya-core": "^1.0", - "luyadev/luya-module-admin": "^1.0|^2.0", + "luyadev/luya-module-admin": "^1.0 || ^2.0", "luyadev/luya-module-cms": "^1.0", "phpunit/phpunit": "^6.0", "twig/twig": "^1.0" @@ -1291,7 +1195,7 @@ "module", "php" ], - "time": "2019-05-27T09:47:28+00:00" + "time": "2019-06-16T16:39:14+00:00" }, { "name": "myclabs/deep-copy", @@ -1440,67 +1344,6 @@ "description": "Library for handling version information and constraints", "time": "2017-03-05T17:38:23+00:00" }, - { - "name": "php-coveralls/php-coveralls", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-coveralls/php-coveralls.git", - "reference": "37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad", - "reference": "37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-simplexml": "*", - "guzzle/guzzle": "^2.8 || ^3.0", - "php": "^5.3.3 || ^7.0", - "psr/log": "^1.0", - "symfony/config": "^2.1 || ^3.0 || ^4.0", - "symfony/console": "^2.1 || ^3.0 || ^4.0", - "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0", - "symfony/yaml": "^2.0 || ^3.0 || ^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" - }, - "suggest": { - "symfony/http-kernel": "Allows Symfony integration" - }, - "bin": [ - "bin/coveralls" - ], - "type": "library", - "autoload": { - "psr-4": { - "Satooshi\\": "src/Satooshi/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kitamura Satoshi", - "email": "with.no.parachute@gmail.com", - "homepage": "https://www.facebook.com/satooshi.jp" - } - ], - "description": "PHP client library for Coveralls API", - "homepage": "https://github.com/php-coveralls/php-coveralls", - "keywords": [ - "ci", - "coverage", - "github", - "test" - ], - "time": "2017-12-06T23:17:56+00:00" - }, { "name": "phpdocumentor/reflection-common", "version": "1.0.1", @@ -1721,16 +1564,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.8.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" + "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", - "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", "shasum": "" }, "require": { @@ -1751,8 +1594,8 @@ } }, "autoload": { - "psr-0": { - "Prophecy\\": "src/" + "psr-4": { + "Prophecy\\": "src/Prophecy" } }, "notification-url": "https://packagist.org/downloads/", @@ -1780,7 +1623,7 @@ "spy", "stub" ], - "time": "2018-08-05T17:53:17+00:00" + "time": "2019-06-13T12:50:23+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2175,53 +2018,6 @@ "abandoned": true, "time": "2018-08-09T05:50:03+00:00" }, - { - "name": "psr/log", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", - "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2018-11-20T15:27:04+00:00" - }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", @@ -2781,302 +2577,6 @@ "homepage": "https://github.com/sebastianbergmann/version", "time": "2016-10-03T07:35:21+00:00" }, - { - "name": "symfony/config", - "version": "v3.3.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "54ee12b0dd60f294132cabae6f5da9573d2e5297" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/54ee12b0dd60f294132cabae6f5da9573d2e5297", - "reference": "54ee12b0dd60f294132cabae6f5da9573d2e5297", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "symfony/filesystem": "~2.8|~3.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.3", - "symfony/finder": "<3.3" - }, - "require-dev": { - "symfony/dependency-injection": "~3.3", - "symfony/finder": "~3.3", - "symfony/yaml": "~3.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Config Component", - "homepage": "https://symfony.com", - "time": "2017-07-19T07:37:29+00:00" - }, - { - "name": "symfony/console", - "version": "v3.3.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "b0878233cb5c4391347e5495089c7af11b8e6201" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/b0878233cb5c4391347e5495089c7af11b8e6201", - "reference": "b0878233cb5c4391347e5495089c7af11b8e6201", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "symfony/debug": "~2.8|~3.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.3", - "symfony/dependency-injection": "~3.3", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/filesystem": "~2.8|~3.0", - "symfony/http-kernel": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/filesystem": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2017-07-29T21:27:59+00:00" - }, - { - "name": "symfony/debug", - "version": "v3.3.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "7c13ae8ce1e2adbbd574fc39de7be498e1284e13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/7c13ae8ce1e2adbbd574fc39de7be498e1284e13", - "reference": "7c13ae8ce1e2adbbd574fc39de7be498e1284e13", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" - }, - "require-dev": { - "symfony/http-kernel": "~2.8|~3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "https://symfony.com", - "time": "2017-07-28T15:27:31+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.8.50", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a77e974a5fecb4398833b0709210e3d5e334ffb0", - "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "^2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.6|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2018-11-21T14:20:20+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v3.3.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "427987eb4eed764c3b6e38d52a0f87989e010676" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/427987eb4eed764c3b6e38d52a0f87989e010676", - "reference": "427987eb4eed764c3b6e38d52a0f87989e010676", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2017-07-11T07:17:58+00:00" - }, { "name": "symfony/polyfill-ctype", "version": "v1.11.0", @@ -3135,181 +2635,18 @@ ], "time": "2019-02-06T07:57:58+00:00" }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.11.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fe5e94c604826c35a32fa832f35bd036b6799609" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609", - "reference": "fe5e94c604826c35a32fa832f35bd036b6799609", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.11-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2019-02-06T07:57:58+00:00" - }, - { - "name": "symfony/stopwatch", - "version": "v3.3.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "602a15299dc01556013b07167d4f5d3a60e90d15" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/602a15299dc01556013b07167d4f5d3a60e90d15", - "reference": "602a15299dc01556013b07167d4f5d3a60e90d15", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Stopwatch Component", - "homepage": "https://symfony.com", - "time": "2017-04-12T14:14:56+00:00" - }, - { - "name": "symfony/yaml", - "version": "v3.3.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "ddc23324e6cfe066f3dd34a37ff494fa80b617ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ddc23324e6cfe066f3dd34a37ff494fa80b617ed", - "reference": "ddc23324e6cfe066f3dd34a37ff494fa80b617ed", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "symfony/console": "~2.8|~3.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2017-07-23T12:43:26+00:00" - }, { "name": "theseer/tokenizer", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8" + "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/1c42705be2b6c1de5904f8afacef5895cab44bf8", - "reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", "shasum": "" }, "require": { @@ -3336,7 +2673,7 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2019-04-04T09:56:43+00:00" + "time": "2019-06-13T22:48:21+00:00" }, { "name": "twbs/bootstrap", @@ -3391,16 +2728,16 @@ }, { "name": "twig/twig", - "version": "v1.41.0", + "version": "v1.42.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "575cd5028362da591facde1ef5d7b94553c375c9" + "reference": "671347603760a88b1e7288aaa9378f33687d7edf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/575cd5028362da591facde1ef5d7b94553c375c9", - "reference": "575cd5028362da591facde1ef5d7b94553c375c9", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/671347603760a88b1e7288aaa9378f33687d7edf", + "reference": "671347603760a88b1e7288aaa9378f33687d7edf", "shasum": "" }, "require": { @@ -3410,12 +2747,12 @@ "require-dev": { "psr/container": "^1.0", "symfony/debug": "^2.7", - "symfony/phpunit-bridge": "^3.4.19|^4.1.8" + "symfony/phpunit-bridge": "^3.4.19|^4.1.8|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.41-dev" + "dev-master": "1.42-dev" } }, "autoload": { @@ -3453,7 +2790,7 @@ "keywords": [ "templating" ], - "time": "2019-05-14T11:59:08+00:00" + "time": "2019-06-04T11:31:08+00:00" }, { "name": "unglue/client", diff --git a/src/messages/cn/admin.php b/src/messages/cn/admin.php index b33270bfc2..91e68d61b5 100644 --- a/src/messages/cn/admin.php +++ b/src/messages/cn/admin.php @@ -423,4 +423,9 @@ // 2.0.1 'js_dir_manager_file_replace_ok' => 'The file has been successfully replaced.', + +// 2.0.3 + + 'status_true' => 'Yes', + 'status_false' => 'No', ]; diff --git a/src/messages/de/admin.php b/src/messages/de/admin.php index 869bb45319..80f9c44cf3 100644 --- a/src/messages/de/admin.php +++ b/src/messages/de/admin.php @@ -425,4 +425,9 @@ // 2.0.1 'js_dir_manager_file_replace_ok' => 'Die Datei wurde erfolgreich ersetzt.', + +// 2.0.3 + + 'status_true' => 'Ja', + 'status_false' => 'Nein', ]; diff --git a/src/messages/el/admin.php b/src/messages/el/admin.php index 2d66375d21..51926f9b86 100644 --- a/src/messages/el/admin.php +++ b/src/messages/el/admin.php @@ -412,4 +412,9 @@ // 2.0.1 'js_dir_manager_file_replace_ok' => 'The file has been successfully replaced.', + +// 2.0.3 + + 'status_true' => 'Yes', + 'status_false' => 'No', ]; diff --git a/src/messages/en/admin.php b/src/messages/en/admin.php index 3c57145435..c416510597 100644 --- a/src/messages/en/admin.php +++ b/src/messages/en/admin.php @@ -423,4 +423,9 @@ // 2.0.1 'js_dir_manager_file_replace_ok' => 'The file has been successfully replaced.', + +// 2.0.3 + + 'status_true' => 'Yes', + 'status_false' => 'No', ]; diff --git a/src/messages/es/admin.php b/src/messages/es/admin.php index 79676f76f3..adce4d73c1 100644 --- a/src/messages/es/admin.php +++ b/src/messages/es/admin.php @@ -404,4 +404,9 @@ // 2.0.1 'js_dir_manager_file_replace_ok' => 'The file has been successfully replaced.', + +// 2.0.3 + + 'status_true' => 'Yes', + 'status_false' => 'No', ]; diff --git a/src/messages/fa/admin.php b/src/messages/fa/admin.php index 8512d4c424..b243dc3778 100644 --- a/src/messages/fa/admin.php +++ b/src/messages/fa/admin.php @@ -404,4 +404,9 @@ // 2.0.1 'js_dir_manager_file_replace_ok' => 'The file has been successfully replaced.', + +// 2.0.3 + + 'status_true' => 'Yes', + 'status_false' => 'No', ]; diff --git a/src/messages/fr/admin.php b/src/messages/fr/admin.php index 7c722d8e9d..ac79decbe7 100644 --- a/src/messages/fr/admin.php +++ b/src/messages/fr/admin.php @@ -423,4 +423,9 @@ // 2.0.1 'js_dir_manager_file_replace_ok' => 'The file has been successfully replaced.', + +// 2.0.3 + + 'status_true' => 'Yes', + 'status_false' => 'No', ]; diff --git a/src/messages/it/admin.php b/src/messages/it/admin.php index 87e1062302..c67809ee68 100644 --- a/src/messages/it/admin.php +++ b/src/messages/it/admin.php @@ -412,4 +412,9 @@ // 2.0.1 'js_dir_manager_file_replace_ok' => 'The file has been successfully replaced.', + +// 2.0.3 + + 'status_true' => 'Yes', + 'status_false' => 'No', ]; diff --git a/src/messages/nl/admin.php b/src/messages/nl/admin.php index 90e5efef6c..3aed918119 100644 --- a/src/messages/nl/admin.php +++ b/src/messages/nl/admin.php @@ -397,4 +397,9 @@ // 2.0.1 'js_dir_manager_file_replace_ok' => 'The file has been successfully replaced.', + +// 2.0.3 + + 'status_true' => 'Yes', + 'status_false' => 'No', ]; diff --git a/src/messages/pl/admin.php b/src/messages/pl/admin.php index c3c1662ab8..8f29b684ee 100644 --- a/src/messages/pl/admin.php +++ b/src/messages/pl/admin.php @@ -420,4 +420,9 @@ // 2.0.1 'js_dir_manager_file_replace_ok' => 'The file has been successfully replaced.', + +// 2.0.3 + + 'status_true' => 'Yes', + 'status_false' => 'No', ]; diff --git a/src/messages/pt/admin.php b/src/messages/pt/admin.php index 0e21a1524b..10816133fa 100644 --- a/src/messages/pt/admin.php +++ b/src/messages/pt/admin.php @@ -424,4 +424,9 @@ // 2.0.1 'js_dir_manager_file_replace_ok' => 'The file has been successfully replaced.', + +// 2.0.3 + + 'status_true' => 'Yes', + 'status_false' => 'No', ]; diff --git a/src/messages/ru/admin.php b/src/messages/ru/admin.php index e8e8b38df6..118dd76612 100644 --- a/src/messages/ru/admin.php +++ b/src/messages/ru/admin.php @@ -426,4 +426,9 @@ // 2.0.1 'js_dir_manager_file_replace_ok' => 'The file has been successfully replaced.', + +// 2.0.3 + + 'status_true' => 'Yes', + 'status_false' => 'No', ]; diff --git a/src/messages/tr/admin.php b/src/messages/tr/admin.php index b7eac4c327..31704d2194 100644 --- a/src/messages/tr/admin.php +++ b/src/messages/tr/admin.php @@ -423,4 +423,9 @@ // 2.0.1 'js_dir_manager_file_replace_ok' => 'The file has been successfully replaced.', + +// 2.0.3 + + 'status_true' => 'Yes', + 'status_false' => 'No', ]; diff --git a/src/messages/ua/admin.php b/src/messages/ua/admin.php index 7ce31137ce..8bb1696642 100644 --- a/src/messages/ua/admin.php +++ b/src/messages/ua/admin.php @@ -424,4 +424,9 @@ // 2.0.1 'js_dir_manager_file_replace_ok' => 'The file has been successfully replaced.', + +// 2.0.3 + + 'status_true' => 'Yes', + 'status_false' => 'No', ]; diff --git a/src/messages/vi/admin.php b/src/messages/vi/admin.php index e4f0f5f281..ccd38970f3 100644 --- a/src/messages/vi/admin.php +++ b/src/messages/vi/admin.php @@ -423,4 +423,9 @@ // 2.0.1 'js_dir_manager_file_replace_ok' => 'The file has been successfully replaced.', + +// 2.0.3 + + 'status_true' => 'Yes', + 'status_false' => 'No', ]; diff --git a/src/ngrest/plugins/ToggleStatus.php b/src/ngrest/plugins/ToggleStatus.php index 33193f835e..f643f9afa8 100644 --- a/src/ngrest/plugins/ToggleStatus.php +++ b/src/ngrest/plugins/ToggleStatus.php @@ -3,6 +3,7 @@ namespace luya\admin\ngrest\plugins; use luya\admin\ngrest\base\Plugin; +use luya\admin\Module; /** * Create toggle checkbox for a given field. @@ -24,6 +25,14 @@ */ class ToggleStatus extends Plugin { + /** + * If enabled the status tag will transform into an interactive schedling overlay. + * + * @var boolean + * @since 2.0.3 + */ + public $scheduling = false; + /** * @var string|integer The value which shoud be picked for angular true state */ @@ -64,11 +73,29 @@ class ToggleStatus extends Plugin */ public $interactive = true; + /** + * Get the options for a scheduler returned as array. + * + * @return array + * @since 2.0.3 + */ + private function getSchedulerValuesAsArray() + { + return [ + $this->falseValue => Module::t('status_false'), + $this->trueValue => Module::t('status_true'), + ]; + } + /** * @inheritdoc */ public function renderList($id, $ngModel) { + if ($this->scheduling && $this->renderContext->canUpdate()) { + return $this->createSchedulerListTag($ngModel, $this->getSchedulerValuesAsArray(), 'item'); + } + if (!$this->interactive || !$this->renderContext->canUpdate()) { return [ $this->createTag('i', $this->trueIcon, ['ng-if' => "$ngModel == $this->trueValue", 'class' => $this->trueClass]), @@ -95,6 +122,13 @@ public function renderCreate($id, $ngModel) */ public function renderUpdate($id, $ngModel) { + if ($this->scheduling && $this->renderContext->canUpdate()) { + return [ + '
' . $this->createSchedulerListTag($ngModel, $this->getSchedulerValuesAsArray(), 'data.update', ['only-icon' => 1]) . '
', + $this->renderCreate($id, $ngModel), + ]; + } + return $this->renderCreate($id, $ngModel); } } diff --git a/tests/NgRestTestCase.php b/tests/NgRestTestCase.php new file mode 100644 index 0000000000..b1fc3f4442 --- /dev/null +++ b/tests/NgRestTestCase.php @@ -0,0 +1,30 @@ + 'adminmodeltest', + 'basePath' => dirname(__DIR__), + 'components' => [ + 'db' => [ + 'class' => 'yii\db\Connection', + 'dsn' => 'sqlite::memory:', + ], + 'storage' => [ + 'class' => 'luya\admin\filesystem\DummyFileSystem' + ] + ], + 'modules' => [ + 'admin' => [ + 'class' => 'luya\admin\Module', + ], + ], + ]; + } +} \ No newline at end of file diff --git a/tests/admin/ngrest/plugins/ToggleStatusTest.php b/tests/admin/ngrest/plugins/ToggleStatusTest.php new file mode 100644 index 0000000000..0e902aead6 --- /dev/null +++ b/tests/admin/ngrest/plugins/ToggleStatusTest.php @@ -0,0 +1,88 @@ +setApiEndpoint(User::ngRestApiEndpoint()); + + $context = new RenderCrud([ + 'config' => $config, + ]); + $plugin = new ToggleStatus([ + 'renderContext' => $context, + 'alias' => 'test', + 'name' => 'test', + 'i18n' => false, + ]); + $this->assertSame([ + 0 => 'check', + 1 => 'close', + ], $plugin->renderList(1, 'model')); + } + + public function testAllowed() + { + $this->apiCanUpdate(); + $config = new Config(); + $config->setApiEndpoint(User::ngRestApiEndpoint()); + + $context = new RenderCrud([ + 'config' => $config, + ]); + $plugin = new ToggleStatus([ + 'renderContext' => $context, + 'alias' => 'test', + 'name' => 'test', + 'i18n' => false, + ]); + $this->assertSame([ + 0 => 'check', + 1 => 'close', + ], $plugin->renderList(1, 'model')); + } + + public function testScheduling() + { + $this->apiCanUpdate(); + + $config = new Config(); + $config->setApiEndpoint(User::ngRestApiEndpoint()); + + $context = new RenderCrud([ + 'config' => $config, + 'model' => new $this->modelClass, + ]); + + $plugin = new ToggleStatus([ + 'renderContext' => $context, + 'alias' => 'test', + 'name' => 'test', + 'i18n' => false, + 'scheduling' => true, + ]); + + $this->assertSame('', $plugin->renderList(1, 'model')); + + $this->assertSame([ + 0 => '
', + 1 => '' + ], $plugin->renderUpdate('id', 'model')); + } +} \ No newline at end of file