Commit ddcf6ce7 authored by Aster's avatar Aster Committed by waltermazza
Browse files

General Bug Fixes and Improvements

parent c776663f
......@@ -9,13 +9,13 @@ Plugin to make surveys.
Either run
```bash
composer require arter/amos-sondaggi
composer require elitedivision/amos-sondaggi
```
or add this row
```
"arter/amos-sondaggi": "~1.0"
"elitedivision/amos-sondaggi": "~1.0"
```
to the require section of your `composer.json` file.
......@@ -27,7 +27,7 @@ to the require section of your `composer.json` file.
<?php
'modules' => [
'sondaggi' => [
'class' => 'arter\amos\sondaggi\AmosSondaggi'
'class' => 'elitedivision\amos\sondaggi\AmosSondaggi'
],
],
```
......@@ -36,7 +36,7 @@ to the require section of your `composer.json` file.
### 3. Apply migrations
```bash
php yii migrate/up --migrationPath=@vendor/arter/amos-sondaggi/src/migrations
php yii migrate/up --migrationPath=@vendor/elitedivision/amos-sondaggi/src/migrations
```
or add this row to your migrations config in console:
......@@ -44,6 +44,6 @@ or add this row to your migrations config in console:
```php
<?php
return [
'@vendor/arter/amos-sondaggi/src/migrations',
'@vendor/elitedivision/amos-sondaggi/src/migrations',
];
```
{
"name": "arter/amos-sondaggi",
"name": "elitedivision/amos-sondaggi",
"description": "Sistema AMOS per gestire i sondaggi",
"keywords": ["amos", "yii2", "sondaggi"],
"homepage": "http://www.arter.it/",
"homepage": "http://www.elitedivision.it/",
"type": "component",
"license": "BSD-3-Clause",
"support": {
"issues": "http://www.example.com/",
"forum": "http://www.example.com/forum/",
"wiki": "http://www.example.com/wiki/",
"source": "https://github.com/arter/amos-sondaggi"
"source": "https://github.com/elitedivision/amos-sondaggi"
},
"require": {
"php": ">=5.4.0",
"ext-json": "*",
"arter/amos-admin":"^2.2.0",
"arter/amos-attachments":"^1.1.11",
"arter/amos-core":"^1.19.0",
"arter/amos-dashboard":"^1.9",
"arter/amos-email-manager": "^1.1.19",
"arter/amos-upload": "*",
"elitedivision/amos-admin":"^2.2.0",
"elitedivision/amos-attachments":"^1.1.11",
"elitedivision/amos-core":"^1.19.0",
"elitedivision/amos-dashboard":"^1.9",
"elitedivision/amos-email-manager": "^1.1.19",
"elitedivision/amos-upload": "*",
"kartik-v/yii2-detail-view": "*",
"kartik-v/yii2-widget-fileinput": "*"
},
"autoload": {
"psr-4": {
"arter\\amos\\sondaggi\\": "src"
"elitedivision\\amos\\sondaggi\\": "src"
}
}
}
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\sondaggi
* @package elitedivision\amos\sondaggi
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
namespace arter\amos\sondaggi;
namespace elitedivision\amos\sondaggi;
use arter\amos\core\interfaces\CmsModuleInterface;
use arter\amos\core\module\AmosModule;
use arter\amos\core\module\ModuleInterface;
use arter\amos\sondaggi\widgets\icons\WidgetIconAmministraSondaggi;
use arter\amos\sondaggi\widgets\icons\WidgetIconCompilaSondaggi;
use arter\amos\sondaggi\widgets\icons\WidgetIconPubblicaSondaggi;
use arter\amos\sondaggi\widgets\icons\WidgetIconSondaggi;
use elitedivision\amos\core\interfaces\CmsModuleInterface;
use elitedivision\amos\core\module\AmosModule;
use elitedivision\amos\core\module\ModuleInterface;
use elitedivision\amos\sondaggi\widgets\icons\WidgetIconAmministraSondaggi;
use elitedivision\amos\sondaggi\widgets\icons\WidgetIconCompilaSondaggi;
use elitedivision\amos\sondaggi\widgets\icons\WidgetIconPubblicaSondaggi;
use elitedivision\amos\sondaggi\widgets\icons\WidgetIconSondaggi;
use Yii;
use yii\db\Connection;
use yii\helpers\ArrayHelper;
/**
* Class AmosSondaggi
* @package arter\amos\sondaggi
* @package elitedivision\amos\sondaggi
*/
class AmosSondaggi extends AmosModule implements ModuleInterface, CmsModuleInterface
{
public static $CONFIG_FOLDER = 'config';
public $controllerNamespace = 'arter\amos\sondaggi\controllers';
public $controllerNamespace = 'elitedivision\amos\sondaggi\controllers';
public $newFileMode = 0666;
public $newDirMode = 0777;
......@@ -90,14 +90,14 @@ class AmosSondaggi extends AmosModule implements ModuleInterface, CmsModuleInter
* @var array $viewPathEmailSummary
*/
public $viewPathEmailSummary = [
'arter\amos\sondaggi\models\Sondaggi' => '@vendor/arter/amos-sondaggi/src/views/email/notify_summary'
'elitedivision\amos\sondaggi\models\Sondaggi' => '@vendor/elitedivision/amos-sondaggi/src/views/email/notify_summary'
];
/**
* @var array $viewPathEmailSummaryNetwork
*/
public $viewPathEmailSummaryNetwork = [
'arter\amos\sondaggi\models\Sondaggi' => '@vendor/arter/amos-sondaggi/src/views/email/notify_summary_network'
'elitedivision\amos\sondaggi\models\Sondaggi' => '@vendor/elitedivision/amos-sondaggi/src/views/email/notify_summary_network'
];
/**
......@@ -108,7 +108,7 @@ class AmosSondaggi extends AmosModule implements ModuleInterface, CmsModuleInter
parent::init();
$this->db = Yii::$app->db;
\Yii::setAlias('@arter/amos/' . static::getModuleName() . '/controllers/', __DIR__ . '/controllers/');
\Yii::setAlias('@elitedivision/amos/' . static::getModuleName() . '/controllers/', __DIR__ . '/controllers/');
// initialize the module with the configuration loaded from config.php
$config = require(__DIR__ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php');
Yii::configure($this, ArrayHelper::merge($config, $this));
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
*
* @see https://repo.art-er.it Developers' community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace arter\amos\sondaggi\assets;
namespace elitedivision\amos\sondaggi\assets;
use yii\web\AssetBundle;
class ModuleRisultatiAsset extends AssetBundle
{
public $sourcePath = '@vendor/arter/amos-sondaggi/src/assets/web';
public $sourcePath = '@vendor/elitedivision/amos-sondaggi/src/assets/web';
public $css = [
'css/stile.css'
......@@ -38,9 +24,9 @@ class ModuleRisultatiAsset extends AssetBundle
{
$moduleL = \Yii::$app->getModule('layout');
if(!empty($moduleL))
{ $this->depends [] = 'arter\amos\layout\assets\BaseAsset'; }
{ $this->depends [] = 'elitedivision\amos\layout\assets\BaseAsset'; }
else
{ $this->depends [] = 'arter\amos\core\views\assets\AmosCoreAsset'; }
{ $this->depends [] = 'elitedivision\amos\core\views\assets\AmosCoreAsset'; }
parent::init(); // TODO: Change the autogenerated stub
}
}
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
*
* @see https://repo.art-er.it Developers' community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace arter\amos\sondaggi\assets;
namespace elitedivision\amos\sondaggi\assets;
use yii\web\AssetBundle;
class ModuleRisultatiFrontendAsset extends AssetBundle
{
public $sourcePath = '@vendor/arter/amos-sondaggi/src/assets/web';
public $sourcePath = '@vendor/elitedivision/amos-sondaggi/src/assets/web';
public $css = [
'less/sondaggi-frontend.less'
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
*
* @see https://repo.art-er.it Developers' community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace arter\amos\sondaggi\assets;
namespace elitedivision\amos\sondaggi\assets;
use yii\web\AssetBundle;
use arter\amos\core\widget\WidgetAbstract;
use elitedivision\amos\core\widget\WidgetAbstract;
class ModuleSondaggiAsset extends AssetBundle
{
public $sourcePath = '@vendor/arter/amos-sondaggi/src/assets/web';
public $sourcePath = '@vendor/elitedivision/amos-sondaggi/src/assets/web';
public $css = [
'css/stile.css'
......@@ -42,9 +28,9 @@ class ModuleSondaggiAsset extends AssetBundle
$this->css = ['less/sondaggi-fullsize.less','less/sondaggi-be-come-fe.less'];
}
if(!empty($moduleL))
{ $this->depends [] = 'arter\amos\layout\assets\BaseAsset'; }
{ $this->depends [] = 'elitedivision\amos\layout\assets\BaseAsset'; }
else
{ $this->depends [] = 'arter\amos\core\views\assets\AmosCoreAsset'; }
{ $this->depends [] = 'elitedivision\amos\core\views\assets\AmosCoreAsset'; }
parent::init();
}
}
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
*
* @see https://repo.art-er.it Developers' community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace arter\amos\sondaggi\assets;
namespace elitedivision\amos\sondaggi\assets;
use yii\web\AssetBundle;
class ModuleSondaggiPublicAsset extends AssetBundle
{
public $sourcePath = '@vendor/arter/amos-sondaggi/src/assets/web';
public $sourcePath = '@vendor/elitedivision/amos-sondaggi/src/assets/web';
public $css = [
];
......@@ -36,9 +22,9 @@ class ModuleSondaggiPublicAsset extends AssetBundle
{
$moduleL = \Yii::$app->getModule('layout');
if(!empty($moduleL))
{ $this->depends [] = 'arter\amos\layout\assets\BaseAsset'; }
{ $this->depends [] = 'elitedivision\amos\layout\assets\BaseAsset'; }
else
{ $this->depends [] = 'arter\amos\core\views\assets\AmosCoreAsset'; }
{ $this->depends [] = 'elitedivision\amos\core\views\assets\AmosCoreAsset'; }
parent::init(); // TODO: Change the autogenerated stub
}
}
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
*
* @see https://repo.art-er.it Developers' community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace arter\amos\sondaggi\assets;
namespace elitedivision\amos\sondaggi\assets;
use yii\web\AssetBundle;
class ModuleSondaggiRisposteAsset extends AssetBundle
{
public $sourcePath = '@vendor/arter/amos-sondaggi/src/assets/web';
public $sourcePath = '@vendor/elitedivision/amos-sondaggi/src/assets/web';
public $css = [
];
......@@ -36,9 +22,9 @@ class ModuleSondaggiRisposteAsset extends AssetBundle
{
$moduleL = \Yii::$app->getModule('layout');
if(!empty($moduleL))
{ $this->depends [] = 'arter\amos\layout\assets\BaseAsset'; }
{ $this->depends [] = 'elitedivision\amos\layout\assets\BaseAsset'; }
else
{ $this->depends [] = 'arter\amos\core\views\assets\AmosCoreAsset'; }
{ $this->depends [] = 'elitedivision\amos\core\views\assets\AmosCoreAsset'; }
parent::init(); // TODO: Change the autogenerated stub
}
}
/**
IMPORT AMOS-LAYOUT VARIABLES
*/
@import (optional) "../../vendor/arter/amos-layout/src/assets/resources/base/less/v2/variables.less";
@import (optional) "../../vendor/arter/amos-layout/src/assets/resources/base/less/v2/utility.less";
@import (optional) "../../vendor/elitedivision/amos-layout/src/assets/resources/base/less/v2/variables.less";
@import (optional) "../../vendor/elitedivision/amos-layout/src/assets/resources/base/less/v2/utility.less";
/**
IMPORT STYLE-CUSTOM
......
/**
IMPORT AMOS-LAYOUT VARIABLES
*/
@import (optional) "../../vendor/arter/amos-layout/src/assets/resources/base/less/v2/variables.less";
@import (optional) "../../vendor/arter/amos-layout/src/assets/resources/base/less/v2/utility.less";
@import (optional) "../../vendor/elitedivision/amos-layout/src/assets/resources/base/less/v2/variables.less";
@import (optional) "../../vendor/elitedivision/amos-layout/src/assets/resources/base/less/v2/utility.less";
/**
IMPORT STYLE-CUSTOM
......
/**
IMPORT AMOS-LAYOUT VARIABLES
*/
@import (optional) "../../vendor/arter/amos-layout/src/assets/resources/base/less/v2/variables.less";
@import (optional) "../../vendor/arter/amos-layout/src/assets/resources/base/less/v2/utility.less";
@import (optional) "../../vendor/elitedivision/amos-layout/src/assets/resources/base/less/v2/variables.less";
@import (optional) "../../vendor/elitedivision/amos-layout/src/assets/resources/base/less/v2/utility.less";
/**
IMPORT STYLE-CUSTOM
*/
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
*
* @see https://repo.art-er.it Developers' community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter
* @category CategoryName
* @author Elite Division S.r.l.
*/
namespace arter\amos\sondaggi\components;
namespace elitedivision\amos\sondaggi\components;
use yii\base\Widget;
use yii\helpers\Html;
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
*
* @see https://repo.art-er.it Developers' community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter
* @category CategoryName
* @author Elite Division S.r.l.
*/
return [
'modules' => [
'v1' => [
'class' => \arter\amos\sondaggi\modules\v1\V1::className()
'class' => \elitedivision\amos\sondaggi\modules\v1\V1::className()
]
],
];
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\sondaggi\controllers
* @package elitedivision\amos\sondaggi\controllers
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
namespace arter\amos\sondaggi\controllers;
namespace elitedivision\amos\sondaggi\controllers;
use arter\amos\sondaggi\AmosSondaggi;
use arter\amos\sondaggi\models\SondaggiDomande;
use arter\amos\sondaggi\models\SondaggiDomandePagine;
use elitedivision\amos\sondaggi\AmosSondaggi;
use elitedivision\amos\sondaggi\models\SondaggiDomande;
use elitedivision\amos\sondaggi\models\SondaggiDomandePagine;
use yii\db\Query;
use yii\filters\AccessControl;
use yii\helpers\ArrayHelper;
......@@ -26,7 +26,7 @@ use yii\web\Controller;
/**
* Class AjaxController
* @package arter\amos\sondaggi\controllers
* @package elitedivision\amos\sondaggi\controllers
*/
class AjaxController extends Controller
{
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\sondaggi\controllers
* @package elitedivision\amos\sondaggi\controllers
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
namespace arter\amos\sondaggi\controllers;
use arter\amos\admin\models\UserProfile;
use arter\amos\core\controllers\CrudController;
use arter\amos\core\helpers\Html;
use arter\amos\core\icons\AmosIcons;
use arter\amos\dashboard\controllers\TabDashboardControllerTrait;
use arter\amos\sondaggi\AmosSondaggi;
use arter\amos\sondaggi\models\Risposte;
use arter\amos\sondaggi\models\search\SondaggiSearch;
use arter\amos\sondaggi\models\Sondaggi;
use arter\amos\sondaggi\models\SondaggiDomande;
use arter\amos\sondaggi\models\SondaggiDomandeCondizionate;
use arter\amos\sondaggi\models\SondaggiDomandePagine;
use arter\amos\sondaggi\models\SondaggiRispostePredefinite;
use arter\amos\sondaggi\models\SondaggiRisposteSessioni;
use arter\amos\sondaggi\widgets\icons\WidgetIconSondaggiGeneral;
use arter\amos\upload\models\FilemanagerMediafile;
namespace elitedivision\amos\sondaggi\controllers;
use elitedivision\amos\admin\models\UserProfile;
use elitedivision\amos\core\controllers\CrudController;
use elitedivision\amos\core\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons;
use elitedivision\amos\dashboard\controllers\TabDashboardControllerTrait;
use elitedivision\amos\sondaggi\AmosSondaggi;
use elitedivision\amos\sondaggi\models\Risposte;
use elitedivision\amos\sondaggi\models\search\SondaggiSearch;
use elitedivision\amos\sondaggi\models\Sondaggi;
use elitedivision\amos\sondaggi\models\SondaggiDomande;
use elitedivision\amos\sondaggi\models\SondaggiDomandeCondizionate;
use elitedivision\amos\sondaggi\models\SondaggiDomandePagine;
use elitedivision\amos\sondaggi\models\SondaggiRispostePredefinite;
use elitedivision\amos\sondaggi\models\SondaggiRisposteSessioni;
use elitedivision\amos\sondaggi\widgets\icons\WidgetIconSondaggiGeneral;
use elitedivision\amos\upload\models\FilemanagerMediafile;
use kartik\mpdf\Pdf;
use Yii;
use yii\filters\AccessControl;
......@@ -44,10 +43,10 @@ use yii\web\UploadedFile;
* Class SondaggiController
* SondaggiController implements the CRUD actions for Sondaggi model.
*
* @property \arter\amos\sondaggi\models\Sondaggi $model
* @property \arter\amos\sondaggi\models\search\SondaggiSearch $modelSearch
* @property \elitedivision\amos\sondaggi\models\Sondaggi $model
* @property \elitedivision\amos\sondaggi\models\search\SondaggiSearch $modelSearch
*
* @package arter\amos\sondaggi\controllers
* @package elitedivision\amos\sondaggi\controllers
*/
class ConsoleController extends \yii\console\Controller
{
......@@ -225,7 +224,7 @@ class ConsoleController extends \yii\console\Controller
$objWriter->save($nomeFile);
if (!is_null($task_id)) {
$task = \arter\amos\sondaggi\modules\v1\models\TaskSondaggi::findOne($task_id);
$task = \elitedivision\amos\sondaggi\modules\v1\models\TaskSondaggi::findOne($task_id);
if (!is_null($task)) {
$task->filename = $nomeFile;
$task->status = 3;
......
<?php
/**
* Copyright 2020 Art-ER S. Cons. P.A.
* EROI - Emilia Romagna Open Innovation is based on:
* https://www.open2.0.regione.lombardia.it
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
* @see http://example.com Developers'community
* @license GPLv3
* @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
*
* @package arter\amos\sondaggi\controllers
* @package elitedivision\amos\sondaggi\controllers
* @category CategoryName
* @author Elite Division S.r.l.
* @author Lombardia Informatica S.p.A.
*/
namespace arter\amos\sondaggi\controllers;
use arter\amos\admin\models\UserProfile;
use arter\amos\attachments\components\AttachmentsList;
use arter\amos\attachments\models\File;
use arter\amos\core\controllers\CrudController;
use arter\amos\core\helpers\Html;
use arter\amos\core\icons\AmosIcons;
use arter\amos\core\user\User;
use arter\amos\dashboard\controllers\TabDashboardControllerTrait;
use arter\amos\sondaggi\AmosSondaggi;
use arter\amos\sondaggi\models\GeneratoreSondaggio;
use arter\amos\sondaggi\models\search\SondaggiSearch;
use arter\amos\sondaggi\models\Sondaggi;
use arter\amos\sondaggi\models\SondaggiDomande;
use arter\amos\sondaggi\models\SondaggiDomandePagine;
use arter\amos\sondaggi\models\SondaggiRisposte;
use arter\amos\sondaggi\models\SondaggiRisposteSessioni;
use arter\amos\sondaggi\utility\SondaggiUtility;
use arter\amos\sondaggi\widgets\icons\WidgetIconSondaggiGeneral;
namespace elitedivision\amos\sondaggi\controllers;
use elitedivision\amos\admin\models\UserProfile;
use elitedivision\amos\attachments\components\AttachmentsList;
use elitedivision\amos\attachments\models\File;
use elitedivision\amos\core\controllers\CrudController;
use elitedivision\amos\core\helpers\Html;
use elitedivision\amos\core\icons\AmosIcons;
use elitedivision\amos\core\user\User;
use elitedivision\amos\dashboard\controllers\TabDashboardControllerTrait;
use elitedivision\amos\sondaggi\AmosSondaggi;
use elitedivision\amos\sondaggi\models\GeneratoreSondaggio;
use elitedivision\amos\sondaggi\models\search\SondaggiSearch;
use elitedivision\amos\sondaggi\models\Sondaggi;
use elitedivision\amos\sondaggi\models\SondaggiDomande;
use elitedivision\amos\sondaggi\models\SondaggiDomandePagine;
use elitedivision\amos\sondaggi\models\SondaggiRisposte;
use elitedivision\amos\sondaggi\models\SondaggiRisposteSessioni;
use elitedivision\amos\sondaggi\utility\SondaggiUtility;