Skip to content

Commit

Permalink
Update copyrights, fix menu dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-wdmg committed Jul 6, 2023
1 parent 15610be commit 320a196
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Changelog
=========

## 1.2.0 (2023-07-06)
* Update copyrights, fix menu dashboard

## 1.1.8 (2020-03-27)
* Up to date dependencies

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
25 changes: 20 additions & 5 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
* Yii2 GEO
*
* @category Module
* @version 1.1.8
* @version 1.2.0
* @author Alexsander Vyshnyvetskyy <[email protected]>
* @link https://github.com/wdmg/yii2-geo
* @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;

Expand Down Expand Up @@ -47,7 +48,7 @@ class Module extends BaseModule
/**
* @var string the module version
*/
private $version = "1.1.8";
private $version = "1.2.0";

/**
* @var integer, priority of initialization
Expand All @@ -72,9 +73,9 @@ public function init()
/**
* {@inheritdoc}
*/
public function dashboardNavItems($options = false)
public function dashboardNavItems($options = null)
{
return [
$tems = [
'label' => $this->name,
'url' => [$this->routePrefix . '/'. $this->id],
'icon' => 'fa fa-fw fa-globe-americas',
Expand Down Expand Up @@ -102,6 +103,20 @@ public function dashboardNavItems($options = false)
]
]
];

if (!is_null($options)) {

if (isset($options['count'])) {
$items['label'] .= '<span class="badge badge-default float-right">' . $options['count'] . '</span>';
unset($options['count']);
}

if (is_array($options))
$items = ArrayHelper::merge($items, $options);

}

return $items;
}

/**
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Yii2](https://img.shields.io/badge/required-Yii2_v2.0.33-blue.svg)](https://packagist.org/packages/yiisoft/yii2)
[![Downloads](https://img.shields.io/packagist/dt/wdmg/yii2-geo.svg)](https://packagist.org/packages/wdmg/yii2-geo)
[![Packagist Version](https://img.shields.io/packagist/v/wdmg/yii2-geo.svg)](https://packagist.org/packages/wdmg/yii2-geo)
[![Progress](https://img.shields.io/badge/required-Yii2_v2.0.33-blue.svg)](https://packagist.org/packages/yiisoft/yii2)
[![Github all releases](https://img.shields.io/github/downloads/wdmg/yii2-geo/total.svg)](https://GitHub.com/wdmg/yii2-geo/releases/)
[![GitHub version](https://badge.fury.io/gh/wdmg%2Fyii2-geo.svg)](https://github.com/wdmg/yii2-geo)
![Progress](https://img.shields.io/badge/progress-in_development-red.svg)
[![GitHub license](https://img.shields.io/github/license/wdmg/yii2-geo.svg)](https://github.com/wdmg/yii2-geo/blob/master/LICENSE)

Expand Down Expand Up @@ -58,12 +58,9 @@ Use the `Module::dashboardNavItems()` method of the module to generate a navigat
?>

# Status and version [in progress development]
* v.1.2.0 - Update copyrights, fix menu dashboard
* v.1.1.8 - Up to date dependencies
* v.1.1.7 - Fixed deprecated class declaration
* v.1.1.6 - Added extra options to composer.json (for Butterfly.CMS implementation)
* v.1.1.5 - Added choice param for non interactive mode
* v.1.1.4 - Module refactoring
* v.1.1.3 - Module transferred to base module interface. Update Yii2 version.

\* - The demo database contains 144 countries, 111 regions and 4923 cities of such countries as: Russia, Ukraine, Kazakhstan, Azerbaijan, Belarus, Moldova, Poland, South Ossetia, Georgia, Kyrgyzstan, Uzbekistan and contains a total of 20863 translations in EN, UK (Ukrainian), PL, DE.
Sources of demo data of countries, cities and regions are initially presented in Russian.
2 changes: 1 addition & 1 deletion commands/InitController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function actionIndex($params = null)
'║ ║'. "\n" .
'║ GEO 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);
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"keywords": ["yii2", "yii2-geo", "geo", "countries", "city", "geo system", "wdmg"],
"type": "yii2-extension",
"license": "MIT",
"version": "1.1.8",
"version": "1.2.0",
"homepage": "https://github.com/wdmg/yii2-geo",
"support": {
"source": "https://github.com/wdmg/yii2-geo",
Expand Down

0 comments on commit 320a196

Please sign in to comment.