Skip to content

Commit

Permalink
Update copyrights, fix nav menu
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-wdmg committed Jun 29, 2023
1 parent aa0b747 commit 56fca37
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 14 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-06-29)
* Update copyrights, fix nav menu

## 1.1.4 (2020-06-28)
* Update dependencies, README.md

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
24 changes: 19 additions & 5 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
* Yii2 Sitemap manager
*
* @category Module
* @version 1.1.4
* @version 1.2.0
* @author Alexsander Vyshnyvetskyy <[email protected]>
* @link https://github.com/wdmg/yii2-sitemap
* @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 yii\base\InvalidConfigException;
Expand Down Expand Up @@ -78,7 +79,7 @@ class Module extends BaseModule
/**
* @var string the module version
*/
private $version = "1.1.4";
private $version = "1.2.0";

/**
* @var integer, priority of initialization
Expand Down Expand Up @@ -106,15 +107,28 @@ public function init()
/**
* {@inheritdoc}
*/
public function dashboardNavItems($options = false)
public function dashboardNavItems($options = null)
{
$items = [
'label' => $this->name,
'icon' => 'fa fa-fw fa-sitemap',
'url' => [$this->routePrefix . '/'. $this->id],
'active' => (in_array(\Yii::$app->controller->module->id, [$this->id]) && Yii::$app->controller->id == 'list'),
];
return $items;

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
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ In addition, you can add/edit and delete the URL of sitemap in manual mode.
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
Expand Down Expand Up @@ -88,10 +88,6 @@ Use the `Module::dashboardNavItems()` method of the module to generate a navigat
?>

# Status and version [ready to use]
* v.1.2.0 - Update copyrights, fix nav menu
* v.1.1.4 - Update dependencies, README.md
* v.1.1.3 - Update README.md and dependencies
* v.1.1.2 - Added support for Blog module, fixed models items retrieved
* v.1.1.1 - Added pagination
* v.1.1.0 - Added CRUD for edit sitemap URL`s
* v.1.0.0 - Added support for Pages and News models
* v.0.0.1 - Initial commit. Added console, migrations and controller
2 changes: 1 addition & 1 deletion commands/InitController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function actionIndex($params = null)
'║ ║'. "\n" .
'║ SITEMAP 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-sitemap", "sitemap", "manager", "wdmg"],
"type": "yii2-extension",
"license": "MIT",
"version": "1.1.4",
"version": "1.2.0",
"homepage": "https://github.com/wdmg/yii2-sitemap",
"support": {
"source": "https://github.com/wdmg/yii2-sitemap",
Expand Down

0 comments on commit 56fca37

Please sign in to comment.