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 25, 2023
1 parent a3cd30c commit fc82641
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 22 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Changelog
=========

## 1.2.*
## 1.3.0 (2023-06-25)
* Update copyrights, fix nav menu
* Lang attribute for HTML tags and inputs

## 1.2.5 (2020-12-29)
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
21 changes: 17 additions & 4 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* Yii2 Pages
*
* @category Module
* @version 1.2.5
* @version 1.3.0
* @author Alexsander Vyshnyvetskyy <[email protected]>
* @link https://github.com/wdmg/yii2-pages
* @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
*
*/
Expand Down Expand Up @@ -48,7 +48,7 @@ class Module extends BaseModule
/**
* @var string the module version
*/
private $version = "1.2.5";
private $version = "1.3.0";

/**
* @var integer, priority of initialization
Expand Down Expand Up @@ -136,7 +136,20 @@ public function dashboardNavItems($options = false)
'icon' => 'fa fa-fw fa-layer-group',
'active' => in_array(\Yii::$app->controller->module->id, [$this->id])
];
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 = \wdmg\helpers\ArrayHelper::merge($items, $options);

}

return $items;
}

/**
Expand Down
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,7 @@ Use the `Module::dashboardNavItems()` method of the module to generate a navigat
?>

# Status and version [ready to use]
* v.1.3.0 - Update copyrights, fix nav menu
* v.1.2.5 - RBAC implementation
* v.1.2.4 - URL redirect notify, defaultController property, update dependencies and README.md
* v.1.2.3 - Update README.md and dependencies
* v.1.2.2 - Added AliasInput::widget()
* v.1.2.1 - Rebased to ActiveRecordML model
* v.1.2.0 - Multi-language implementation
* v.1.1.12 - Log activity
* v.1.1.11 - Added pagination, up to date dependencies
* v.1.1.10 - Refactoring. Migrations bugfix
* v.1.1.9 - Added multiple nesting for pages
* v.1.1.8 - Added support for Yandex.Turbo and Google AMP modules
* v.1.1.7 - Added support for Sitemap module
* v.1.2.3 - Update README.md and dependencies
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" .
'║ PAGES 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-pages", "static", "pages", "wdmg"],
"type": "yii2-extension",
"license": "MIT",
"version": "1.2.5",
"version": "1.3.0",
"homepage": "https://github.com/wdmg/yii2-pages",
"support": {
"source": "https://github.com/wdmg/yii2-pages",
Expand Down
8 changes: 4 additions & 4 deletions views/pages/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
}


if (is_countable($output)) {
if (is_array($output)) {
if (count($output) > 0) {
$onMore = false;
if (count($output) > 3)
Expand Down Expand Up @@ -344,7 +344,7 @@
}
}

if (is_countable($output)) {
if (is_array($output)) {
if (count($output) > 1) {
$html = '';
$html .= '<div class="btn-group">';
Expand Down Expand Up @@ -426,7 +426,7 @@
}
}

if (is_countable($output)) {
if (is_array($output)) {
if (count($output) > 1) {
$html = '';
$html .= '<div class="btn-group">';
Expand Down Expand Up @@ -520,7 +520,7 @@
}
}

if (is_countable($output)) {
if (is_array($output)) {
if (count($output) > 1) {
$html = '';
$html .= '<div class="btn-group">';
Expand Down

0 comments on commit fc82641

Please sign in to comment.