Commit 5564cb29 authored by Aster's avatar Aster Committed by waltermazza
Browse files

General Bug Fixes and Improvements

parent 1cc2ab4f
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\core * @package arter\amos\core
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
/* use bedezign\yii2\audit\assets\JSLoggingAsset; */ /* use bedezign\yii2\audit\assets\JSLoggingAsset; */
use yii\helpers\Html; use yii\helpers\Html;
use elitedivision\amos\layout\assets\BaseAsset; use arter\amos\layout\assets\BaseAsset;
BaseAsset::register($this); BaseAsset::register($this);
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\core * @package arter\amos\core
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
use elitedivision\amos\core\helpers\Html; use arter\amos\core\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
use elitedivision\amos\core\utilities\CurrentUser; use arter\amos\core\utilities\CurrentUser;
use elitedivision\amos\core\widget\WidgetAbstract; use arter\amos\core\widget\WidgetAbstract;
use elitedivision\amos\dashboard\AmosDashboard; use arter\amos\dashboard\AmosDashboard;
use elitedivision\amos\layout\Module; use arter\amos\layout\Module;
use elitedivision\amos\layout\toolbar\Nav; use arter\amos\layout\toolbar\Nav;
use elitedivision\amos\layout\toolbar\NavBar; use arter\amos\layout\toolbar\NavBar;
use yii\helpers\ArrayHelper; use yii\helpers\ArrayHelper;
use yii\helpers\Url; use yii\helpers\Url;
use yii\web\JsExpression; use yii\web\JsExpression;
...@@ -35,11 +31,11 @@ use yii\web\JsExpression; ...@@ -35,11 +31,11 @@ use yii\web\JsExpression;
<?php <?php
/* Configuration of Slideshow - begin */ /* Configuration of Slideshow - begin */
if (\Yii::$app->getModule('slideshow') && isset(\Yii::$app->params['slideshow']) && \Yii::$app->params['slideshow'] === TRUE) { if (\Yii::$app->getModule('slideshow') && isset(\Yii::$app->params['slideshow']) && \Yii::$app->params['slideshow'] === TRUE) {
$slideshow = new \elitedivision\amos\slideshow\models\Slideshow; $slideshow = new \arter\amos\slideshow\models\Slideshow;
$route = "/".\Yii::$app->request->getPathInfo(); $route = "/".\Yii::$app->request->getPathInfo();
$idSlideshow = $slideshow->hasSlideshow($route); $idSlideshow = $slideshow->hasSlideshow($route);
$slideshowLabel = ($idSlideshow) ? $slideshow->findOne($idSlideshow)->label : NULL; $slideshowLabel = ($idSlideshow) ? $slideshow->findOne($idSlideshow)->label : NULL;
echo \elitedivision\amos\slideshow\widgets\SlideshowWidget::widget([]); echo \arter\amos\slideshow\widgets\SlideshowWidget::widget([]);
} }
/** @var bool|false $disablePlatformLinks - if true all the links to dashboard, settings, etc are disabled */ /** @var bool|false $disablePlatformLinks - if true all the links to dashboard, settings, etc are disabled */
$disablePlatformLinks = isset(\Yii::$app->params['disablePlatformLinks']) ? \Yii::$app->params['disablePlatformLinks'] $disablePlatformLinks = isset(\Yii::$app->params['disablePlatformLinks']) ? \Yii::$app->params['disablePlatformLinks']
...@@ -80,7 +76,7 @@ use yii\web\JsExpression; ...@@ -80,7 +76,7 @@ use yii\web\JsExpression;
/* Configuration of Slideshow - end */ /* Configuration of Slideshow - end */
/* Configuration header menu: field translation */ /* Configuration header menu: field translation */
$headerMenu = new elitedivision\amos\core\views\common\HeaderMenu(); $headerMenu = new arter\amos\core\views\common\HeaderMenu();
$menuTranslation = $headerMenu->getTranslationField(); $menuTranslation = $headerMenu->getTranslationField();
$menuCustom = $headerMenu->getCustomContent(); $menuCustom = $headerMenu->getCustomContent();
/* echo Translation button */ /* echo Translation button */
...@@ -188,7 +184,7 @@ use yii\web\JsExpression; ...@@ -188,7 +184,7 @@ use yii\web\JsExpression;
$btnsLogout = ''; $btnsLogout = '';
$btnsEsci = ''; $btnsEsci = '';
$btnLogoutUrl = ['/admin/security/logout']; $btnLogoutUrl = ['/admin/security/logout'];
/** @var \elitedivision\amos\socialauth\Module $socialAuthModule */ /** @var \arter\amos\socialauth\Module $socialAuthModule */
$socialAuthModule = Yii::$app->getModule('socialauth'); $socialAuthModule = Yii::$app->getModule('socialauth');
if (YII_ENV_PROD && !is_null($socialAuthModule) && ($socialAuthModule->enableSpid === true)) { if (YII_ENV_PROD && !is_null($socialAuthModule) && ($socialAuthModule->enableSpid === true)) {
$btnLogoutUrl['backTo'] = Url::to([ $btnLogoutUrl['backTo'] = Url::to([
...@@ -258,7 +254,7 @@ use yii\web\JsExpression; ...@@ -258,7 +254,7 @@ use yii\web\JsExpression;
]; ];
$settingsItemsElements = []; $settingsItemsElements = [];
$atLeastOneElement = false; $atLeastOneElement = false;
if (\Yii::$app->controller instanceof \elitedivision\amos\dashboard\controllers\base\DashboardController) { if (\Yii::$app->controller instanceof \arter\amos\dashboard\controllers\base\DashboardController) {
$atLeastOneElement = true; $atLeastOneElement = true;
$settingsItemsElements[] = [ $settingsItemsElements[] = [
'label' => Yii::t('amoscore', 'Ordinamenti dashboard'), 'label' => Yii::t('amoscore', 'Ordinamenti dashboard'),
...@@ -340,21 +336,21 @@ use yii\web\JsExpression; ...@@ -340,21 +336,21 @@ use yii\web\JsExpression;
if (\Yii::$app->getModule('chat')) { if (\Yii::$app->getModule('chat')) {
$widget = new \elitedivision\amos\chat\widgets\icons\WidgetIconChat(); $widget = new \arter\amos\chat\widgets\icons\WidgetIconChat();
$bulletCount = $widget->getBulletCount(); $bulletCount = $widget->getBulletCount();
$chatLink = Html::tag('li', $chatLink = Html::tag('li',
Html::a( Html::a(
AmosIcons::show('comments-o', [], 'dash')."<span class='badge'>".(($bulletCount > 0 ) ? $bulletCount AmosIcons::show('comments-o', [], 'dash')."<span class='badge'>".(($bulletCount > 0 ) ? $bulletCount
: "" )."</span>" : "" )."</span>"
, '/messages', , '/messages',
['title' => \elitedivision\amos\chat\AmosChat::t('amoschat', 'Messaggi privati')] ['title' => \arter\amos\chat\AmosChat::t('amoschat', 'Messaggi privati')]
), ['class' => 'header-plugin-icon'] ), ['class' => 'header-plugin-icon']
); );
$menuItems[] = $chatLink; $menuItems[] = $chatLink;
} }
if (\Yii::$app->getModule('myactivities') && !\Yii::$app->user->isGuest && Yii::$app->user->can('MYACTIVITIES_READ')) { if (\Yii::$app->getModule('myactivities') && !\Yii::$app->user->isGuest && Yii::$app->user->can('MYACTIVITIES_READ')) {
$widget = new \elitedivision\amos\myactivities\widgets\icons\WidgetIconMyActivities(); $widget = new \arter\amos\myactivities\widgets\icons\WidgetIconMyActivities();
if ( if (
(isset(\Yii::$app->params['disableBulletCounters']) && (\Yii::$app->params['disableBulletCounters'] === true)) && (isset(\Yii::$app->params['disableBulletCounters']) && (\Yii::$app->params['disableBulletCounters'] === true)) &&
(!isset(\Yii::$app->params['enableMyActivitiesBulletCounters']) || (isset(\Yii::$app->params['enableMyActivitiesBulletCounters']) && (\Yii::$app->params['enableMyActivitiesBulletCounters'] === false))) (!isset(\Yii::$app->params['enableMyActivitiesBulletCounters']) || (isset(\Yii::$app->params['enableMyActivitiesBulletCounters']) && (\Yii::$app->params['enableMyActivitiesBulletCounters'] === false)))
...@@ -368,7 +364,7 @@ use yii\web\JsExpression; ...@@ -368,7 +364,7 @@ use yii\web\JsExpression;
AmosIcons::show('bell', [], 'dash')."<span class='badge'>".(($bulletCount > 0 ) ? $bulletCount AmosIcons::show('bell', [], 'dash')."<span class='badge'>".(($bulletCount > 0 ) ? $bulletCount
: "" )."</span>" : "" )."</span>"
, '/myactivities/my-activities/index', , '/myactivities/my-activities/index',
['title' => \elitedivision\amos\myactivities\AmosMyActivities::t('amosmyactivities', ['title' => \arter\amos\myactivities\AmosMyActivities::t('amosmyactivities',
'My activities')] 'My activities')]
), ['class' => 'header-plugin-icon'] ), ['class' => 'header-plugin-icon']
); );
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\core * @package arter\amos\core
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
use yii\helpers\FileHelper; use yii\helpers\FileHelper;
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\layout\parts * @package arter\amos\layout\parts
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
use elitedivision\amos\core\controllers\CrudController; use arter\amos\core\controllers\CrudController;
use elitedivision\amos\core\forms\CreateNewButtonWidget; use arter\amos\core\forms\CreateNewButtonWidget;
use elitedivision\amos\core\helpers\Html; use arter\amos\core\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
use elitedivision\amos\core\views\ChangeView; use arter\amos\core\views\ChangeView;
use elitedivision\amos\core\views\grid\ActionColumn; use arter\amos\core\views\grid\ActionColumn;
use elitedivision\amos\slideshow\models\Slideshow; use arter\amos\slideshow\models\Slideshow;
use kartik\export\ExportMenu; use kartik\export\ExportMenu;
use yii\base\Event; use yii\base\Event;
use yii\data\ActiveDataProvider; use yii\data\ActiveDataProvider;
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\core * @package arter\amos\core
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
use elitedivision\amos\core\module\BaseAmosModule; use arter\amos\core\module\BaseAmosModule;
use elitedivision\amos\core\widget\WidgetAbstract; use arter\amos\core\widget\WidgetAbstract;
use yii\helpers\Html; use yii\helpers\Html;
/** @var bool|false $disablePlatformLinks - if true all the links to dashboard, settings, etc are disabled */ /** @var bool|false $disablePlatformLinks - if true all the links to dashboard, settings, etc are disabled */
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\core * @package arter\amos\core
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
use elitedivision\amos\core\module\BaseAmosModule; use arter\amos\core\module\BaseAmosModule;
use yii\helpers\Html; use yii\helpers\Html;
/** @var bool|false $disablePlatformLinks - if true all the links to dashboard, settings, etc are disabled */ /** @var bool|false $disablePlatformLinks - if true all the links to dashboard, settings, etc are disabled */
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\core * @package arter\amos\core
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
use yii\bootstrap\Alert; use yii\bootstrap\Alert;
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\layout\views\layouts\parts * @package arter\amos\layout\views\layouts\parts
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
$moduleCwh = Yii::$app->getModule('cwh'); $moduleCwh = Yii::$app->getModule('cwh');
$moduleCommunity = Yii::$app->getModule('community'); $moduleCommunity = Yii::$app->getModule('community');
...@@ -18,19 +14,19 @@ $layoutModule = Yii::$app->getModule('layout'); ...@@ -18,19 +14,19 @@ $layoutModule = Yii::$app->getModule('layout');
$scope = null; $scope = null;
if (!empty($moduleCwh)) { if (!empty($moduleCwh)) {
/** @var \elitedivision\amos\cwh\AmosCwh $moduleCwh */ /** @var \arter\amos\cwh\AmosCwh $moduleCwh */
$scope = $moduleCwh->getCwhScope(); $scope = $moduleCwh->getCwhScope();
} }
if (!empty($scope)) { if (!empty($scope)) {
if (isset($scope['community'])) { if (isset($scope['community'])) {
$communityId = $scope['community']; $communityId = $scope['community'];
$community = \elitedivision\amos\community\models\Community::findOne($communityId); $community = \arter\amos\community\models\Community::findOne($communityId);
} }
} }
$controller = Yii::$app->controller; $controller = Yii::$app->controller;
$isActionUpdate = ($controller->action->id == 'update'); $isActionUpdate = ($controller->action->id == 'update');
$confirm = $isActionUpdate ? [ $confirm = $isActionUpdate ? [
'confirm' => \elitedivision\amos\core\module\BaseAmosModule::t('amoscore', '#confirm_exit_without_saving') 'confirm' => \arter\amos\core\module\BaseAmosModule::t('amoscore', '#confirm_exit_without_saving')
] : null; ] : null;
$model = null; $model = null;
...@@ -42,7 +38,7 @@ $model = null; ...@@ -42,7 +38,7 @@ $model = null;
// $model = $controller->model; // $model = $controller->model;
// if ($model->hasProperty('community_id')) { // if ($model->hasProperty('community_id')) {
// $communityId = $model->community_id; // $communityId = $model->community_id;
// $community = \elitedivision\amos\community\models\Community::findOne($communityId); // $community = \arter\amos\community\models\Community::findOne($communityId);
// } // }
//} //}
...@@ -59,7 +55,7 @@ if (isset($community)) { ...@@ -59,7 +55,7 @@ if (isset($community)) {
if (!is_null($eventsModule) && ($community->context == $eventsModule->model('Event'))) { if (!is_null($eventsModule) && ($community->context == $eventsModule->model('Event'))) {
echo $this->render('events_network_scope', $viewParams); echo $this->render('events_network_scope', $viewParams);
} else if ($community->context == \elitedivision\amos\community\models\Community::className()) { } else if ($community->context == \arter\amos\community\models\Community::className()) {
$viewScope = 'community_network_scope'; $viewScope = 'community_network_scope';
echo $this->render($viewScope, $viewParams); echo $this->render($viewScope, $viewParams);
} else if (!is_null(Yii::$app->getModule('challenge')) && $community->context == \amos\challenge\models\ChallengeTeam::className()) { } else if (!is_null(Yii::$app->getModule('challenge')) && $community->context == \amos\challenge\models\ChallengeTeam::className()) {
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\core\views\layouts\parts * @package arter\amos\core\views\layouts\parts
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
use elitedivision\amos\core\helpers\Html; use arter\amos\core\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons; use arter\amos\core\icons\AmosIcons;
/** /**
* @var yii\web\View $this * @var yii\web\View $this
* @var \elitedivision\amos\core\record\Record $model * @var \arter\amos\core\record\Record $model
* @var \elitedivision\amos\core\components\PartQuestionarioAbstract $partsQuestionario * @var \arter\amos\core\components\PartQuestionarioAbstract $partsQuestionario
* @var bool $hidePartsLabel * @var bool $hidePartsLabel
* @var bool $hidePartsUrl * @var bool $hidePartsUrl
*/ */
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\layout * @package arter\amos\layout
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
use elitedivision\amos\layout\assets\BaseAsset; use arter\amos\layout\assets\BaseAsset;
$asset = BaseAsset::register($this); $asset = BaseAsset::register($this);
?> ?>
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\core * @package arter\amos\core
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
use yii\helpers\FileHelper; use yii\helpers\FileHelper;
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\core\views\layouts * @package arter\amos\core\views\layouts
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
...@@ -19,7 +15,7 @@ use yii\helpers\Html; ...@@ -19,7 +15,7 @@ use yii\helpers\Html;
use yii\helpers\Url; use yii\helpers\Url;
/* @var $this \yii\web\View */ /* @var $this \yii\web\View */
/* @var \elitedivision\amos\core\components\PartQuestionarioAbstract $partsQuestionario */ /* @var \arter\amos\core\components\PartQuestionarioAbstract $partsQuestionario */
/* @var $content string */ /* @var $content string */
$urlCorrente = Url::current(); $urlCorrente = Url::current();
......
<?php <?php
/** /**
* Lombardia Informatica S.p.A. * Emilia Romagna Open Innovation
* OPEN 2.0 * Arter
* *
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
* *
* @package elitedivision\amos\core * @package arter\amos\core
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
use elitedivision\amos\core\components\AmosView; use arter\amos\core\components\AmosView;
use yii\helpers\Html;