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 713ebe3 commit 6e2788b
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 24 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.1.*
## 1.2.0 (2023-07-06)
* Update copyrights, fix menu dashboard
* Lang attribute for HTML tags and inputs

## 1.1.2 (2020-12-28)
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
22 changes: 18 additions & 4 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
* Yii2 Forms
*
* @category Module
* @version 1.1.2
* @version 1.2.0
* @author Alexsander Vyshnyvetskyy <[email protected]>
* @link https://github.com/wdmg/yii2-forms
* @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 @@ -51,7 +52,7 @@ class Module extends BaseModule
/**
* @var string the module version
*/
private $version = "1.1.2";
private $version = "1.2.0";

/**
* @var integer, priority of initialization
Expand Down Expand Up @@ -101,7 +102,20 @@ public function dashboardNavItems($options = false)
]
]
];
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
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,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 menu dashboard
* v.1.1.2 - RBAC implementation
* v.1.1.1 - Update README.md and setAttributeLabels() fixed
* v.1.1.0 - Multi-language support, submit() method for Form component
* v.1.0.13 - Update dependencies
* v.1.0.12 - Log activity and translations, added forms component
* v.1.0.11 - Added pagination, up to date dependencies
* v.1.0.10 - Rebuild migrations, views
* v.1.0.9 - Fixed deprecated class declaration
* v.1.0.8 - Added extra options to composer.json and navbar menu icon
* v.1.0.7 - Added choice param for non interactive mode
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-forms", "forms", "form management", "wdmg"],
"type": "yii2-extension",
"license": "MIT",
"version": "1.1.2",
"version": "1.2.0",
"homepage": "https://github.com/wdmg/yii2-forms",
"support": {
"source": "https://github.com/wdmg/yii2-forms",
Expand Down
8 changes: 4 additions & 4 deletions views/fields/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
}


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

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

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

if (is_countable($output)) {
if (is_array($output)) {
if (count($output) > 1) {
$html = '';
$html .= '<div class="btn-group">';
Expand Down
8 changes: 4 additions & 4 deletions views/list/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
}


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

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

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

if (is_countable($output)) {
if (is_array($output)) {
if (count($output) > 1) {
$html = '';
$html .= '<div class="btn-group">';
Expand Down
2 changes: 1 addition & 1 deletion views/submitted/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
'value' => function($data) {
$count = 0;
$output = '';
if (is_countable($data->contents)) {
if (is_array($data->contents)) {
foreach ($data->contents as $content) {

if ($count >= 6) {
Expand Down

0 comments on commit 6e2788b

Please sign in to comment.