diff --git a/CHANGELOG.md b/CHANGELOG.md index de33a5b..bf9356c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ Changelog ========= +## 1.1.0 (2023-07-06) + * Update copyrights, fix menu dashboard + ## 1.0.1 (2020-07-01) * Update dependencies, README.md diff --git a/LICENSE b/LICENSE index 4ff35d5..92279d7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 - 2020 W.D.M.Group, Ukraine +Copyright (c) 2019 - 2023 W.D.M.Group, Ukraine Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Module.php b/Module.php index b42d9bf..397f363 100644 --- a/Module.php +++ b/Module.php @@ -6,14 +6,15 @@ * Yii2 Views * * @category Module - * @version 1.0.1 + * @version 1.1.0 * @author Alexsander Vyshnyvetskyy * @link https://github.com/wdmg/yii2-views - * @copyright Copyright (c) 2019 - 2021 W.D.M.Group, Ukraine + * @copyright Copyright (c) 2019 - 2023 W.D.M.Group, Ukraine * @license https://opensource.org/licenses/MIT Massachusetts Institute of Technology (MIT) License * */ +use wdmg\helpers\ArrayHelper; use Yii; use wdmg\base\BaseModule; use wdmg\views\components\Views; @@ -51,7 +52,7 @@ class Module extends BaseModule /** * @var string the module version */ - private $version = "1.0.1"; + private $version = "1.1.0"; /** * @var integer, priority of initialization @@ -76,7 +77,7 @@ public function init() /** * {@inheritdoc} */ - public function dashboardNavItems($options = false) + public function dashboardNavItems($options = null) { $items = [ 'label' => $this->name, @@ -84,7 +85,20 @@ public function dashboardNavItems($options = false) 'icon' => 'fa fa-fw fa-eye', 'active' => in_array(\Yii::$app->controller->module->id, [$this->id]) ]; - return $items; + + if (!is_null($options)) { + + if (isset($options['count'])) { + $items['label'] .= '' . $options['count'] . ''; + unset($options['count']); + } + + if (is_array($options)) + $items = ArrayHelper::merge($items, $options); + + } + + return $items; } /** diff --git a/README.md b/README.md index 5490ee1..ae07943 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Progress](https://img.shields.io/badge/required-Yii2_v2.0.40-blue.svg)](https://packagist.org/packages/yiisoft/yii2) +[![Progress](https://img.shields.io/badge/required-Yii2_v2.0.35-blue.svg)](https://packagist.org/packages/yiisoft/yii2) [![Github all releases](https://img.shields.io/github/downloads/wdmg/yii2-views/total.svg)](https://GitHub.com/wdmg/yii2-views/releases/) [![GitHub version](https://badge.fury.io/gh/wdmg/yii2-views.svg)](https://github.com/wdmg/yii2-views) ![Progress](https://img.shields.io/badge/progress-ready_to_use-green.svg) @@ -11,11 +11,11 @@ System of accounting user views. This module is an integral part of the [Butterfly.СMS](https://butterflycms.com/) content management system, but can also be used as an standalone extension. -Copyrights (c) 2019-2021 [W.D.M.Group, Ukraine](https://wdmg.com.ua/) +Copyrights (c) 2019-2023 [W.D.M.Group, Ukraine](https://wdmg.com.ua/) # Requirements * PHP 5.6 or higher -* Yii2 v.2.0.40 and newest +* Yii2 v.2.0.35 and newest * [Yii2 Base](https://github.com/wdmg/yii2-base) module (required) * [Yii2 Users](https://github.com/wdmg/yii2-users) module (optionaly) @@ -94,9 +94,6 @@ Use the `Module::dashboardNavItems()` method of the module to generate a navigat ?> # Status and version [ready to use] +* v.1.1.0 - Update copyrights, fix menu dashboard * v.1.0.1 - Update dependencies, README.md -* v.1.0.0 - Added component for set/get views counter -* v.0.0.12 - Update README.md and dependencies -* v.0.0.11 - Fixed deprecated class declaration -* v.0.0.10 - Added extra options to composer.json and navbar menu icon -* v.0.0.9 - Added choice param for non interactive mode \ No newline at end of file +* v.1.0.0 - Added component for set/get views counter \ No newline at end of file diff --git a/commands/InitController.php b/commands/InitController.php index 86d8a8b..98d4e25 100644 --- a/commands/InitController.php +++ b/commands/InitController.php @@ -33,7 +33,7 @@ public function actionIndex($params = null) '║ ║'. "\n" . '║ VIEWS MODULE, v.'.$version.' ║'. "\n" . '║ by Alexsander Vyshnyvetskyy ║'. "\n" . - '║ (c) 2019-2021 W.D.M.Group, Ukraine ║'. "\n" . + '║ (c) 2019-2023 W.D.M.Group, Ukraine ║'. "\n" . '║ ║'. "\n" . '╚════════════════════════════════════════════════╝'; echo $name = $this->ansiFormat($welcome . "\n\n", Console::FG_GREEN); diff --git a/components/Views.php b/components/Views.php index 4e94813..286b9e2 100644 --- a/components/Views.php +++ b/components/Views.php @@ -7,10 +7,9 @@ * Yii2 Views * * @category Component - * @version 1.0.1 * @author Alexsander Vyshnyvetskyy * @link https://github.com/wdmg/yii2-views - * @copyright Copyright (c) 2019 - 2021 W.D.M.Group, Ukraine + * @copyright Copyright (c) 2019 - 2023 W.D.M.Group, Ukraine * @license https://opensource.org/licenses/MIT Massachusetts Institute of Technology (MIT) License * */ diff --git a/composer.json b/composer.json index c06285c..c9d4d3d 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "keywords": ["yii2", "yii2-views", "views", "wdmg"], "type": "yii2-extension", "license": "MIT", - "version": "1.0.1", + "version": "1.1.0", "homepage": "https://github.com/wdmg/yii2-views", "support": { "source": "https://github.com/wdmg/yii2-views", @@ -21,7 +21,7 @@ } ], "require": { - "yiisoft/yii2": "^2.0.40", + "yiisoft/yii2": "^2.0.35", "wdmg/yii2-base": "^1.2.4", "wdmg/yii2-selectinput": "^1.0.9", "wdmg/yii2-helpers": "^1.3.2" diff --git a/docs/images/yii2-views.png b/docs/images/yii2-views.png index 94a65ac..7e04df3 100755 Binary files a/docs/images/yii2-views.png and b/docs/images/yii2-views.png differ