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

General Bug Fixes and Improvements

parent a4b2d65b
{ {
"name": "elitedivision/amos-email-manager", "name": "arter/amos-email-manager",
"description": "Modulo di gestione code email - plugin", "description": "Modulo di gestione code email - plugin",
"keywords": [ "keywords": [
"amos", "amos",
"notifiche", "notifiche",
"yii2" "yii2"
], ],
"homepage": "http://www.elitedivision.it/", "homepage": "http://www.arter.it/",
"type": "component", "type": "component",
"license": "BSD-3-Clause", "proscription": "BSD-3-Clause",
"support": { "support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open", "issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/", "forum": "http://www.yiiframework.com/forum/",
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
}, },
"require": { "require": {
"php": ">=5.4.0", "php": ">=5.4.0",
"elitedivision/amos-core": "~1.7", "arter/amos-core": "~1.7",
"elitedivision/amos-dashboard": ">=1.8.15", "arter/amos-dashboard": ">=1.8.15",
"mustache/mustache": "^2.9.0", "mustache/mustache": "^2.9.0",
"baibaratsky/yii2-serialized-attributes-behavior": "*", "baibaratsky/yii2-serialized-attributes-behavior": "*",
"yiidoc/yii2-redactor": "*" "yiidoc/yii2-redactor": "*"
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"elitedivision\\amos\\emailmanager\\": "src" "arter\\amos\\emailmanager\\": "src"
} }
}, },
"scripts": { "scripts": {
"post-install-cmd": "php yii migrate --migrationPath=@vendor/elitedivision/amos-email-manager/migrations --interactive=0" "post-install-cmd": "php yii migrate --migrationPath=@vendor/arter/amos-email-manager/migrations --interactive=0"
} }
} }
<?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\email * @package arter\amos\email
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
namespace elitedivision\amos\emailmanager; namespace arter\amos\emailmanager;
use elitedivision\amos\core\module\AmosModule; use arter\amos\core\module\AmosModule;
use elitedivision\amos\emailmanager\base\AmosEmailManager; use arter\amos\emailmanager\base\AmosEmailManager;
use elitedivision\amos\emailmanager\models\EmailView; use arter\amos\emailmanager\models\EmailView;
use yii\base\BootstrapInterface; use yii\base\BootstrapInterface;
use yii\console\Application; use yii\console\Application;
use yii\log\Logger; use yii\log\Logger;
...@@ -41,7 +37,7 @@ class AmosEmail extends AmosModule implements BootstrapInterface ...@@ -41,7 +37,7 @@ class AmosEmail extends AmosModule implements BootstrapInterface
*/ */
public $defaultTemplate = "layout_default"; public $defaultTemplate = "layout_default";
public $defaultLayout = "layout_fancy"; public $defaultLayout = "layout_fancy";
public $controllerNamespace = 'elitedivision\amos\emailmanager\controllers'; public $controllerNamespace = 'arter\amos\emailmanager\controllers';
private $emailManager = null; private $emailManager = null;
...@@ -61,13 +57,13 @@ class AmosEmail extends AmosModule implements BootstrapInterface ...@@ -61,13 +57,13 @@ class AmosEmail extends AmosModule implements BootstrapInterface
{ {
parent::init(); parent::init();
\Yii::setAlias('@email', __DIR__ . '/'); \Yii::setAlias('@email', __DIR__ . '/');
\Yii::setAlias('@elitedivision/amos/emailmanager/commands', __DIR__ . '/commands/'); \Yii::setAlias('@arter/amos/emailmanager/commands', __DIR__ . '/commands/');
// initialize the module with the configuration loaded from config.php // initialize the module with the configuration loaded from config.php
\Yii::configure($this, require(__DIR__ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php')); \Yii::configure($this, require(__DIR__ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php'));
if (Yii::$app instanceof \yii\web\Application) { if (Yii::$app instanceof \yii\web\Application) {
$this->controllerMap = array( $this->controllerMap = array(
'spool' => 'elitedivision\amos\emailmanager\controllers\EmailSpoolController', 'spool' => 'arter\amos\emailmanager\controllers\EmailSpoolController',
'template' => 'elitedivision\amos\emailmanager\controllers\EmailTemplateController', 'template' => 'arter\amos\emailmanager\controllers\EmailTemplateController',
); );
} }
$this->initializeEmailManager(); $this->initializeEmailManager();
...@@ -92,7 +88,7 @@ class AmosEmail extends AmosModule implements BootstrapInterface ...@@ -92,7 +88,7 @@ class AmosEmail extends AmosModule implements BootstrapInterface
public function bootstrap($app) public function bootstrap($app)
{ {
if ($app instanceof Application) { if ($app instanceof Application) {
$this->controllerNamespace = 'elitedivision\amos\emailmanager\commands'; $this->controllerNamespace = 'arter\amos\emailmanager\commands';
} }
} }
......
...@@ -11,13 +11,13 @@ The preferred way to install this extension is through [composer](http://getcomp ...@@ -11,13 +11,13 @@ The preferred way to install this extension is through [composer](http://getcomp
Either run Either run
```bash ```bash
composer require elitedivision/amos-email-manager composer require arter/amos-email-manager
``` ```
or add this row or add this row
``` ```
"elitedivision/amos-email-manager": "dev-master" "arter/amos-email-manager": "dev-master"
``` ```
to the require section of your `composer.json` file. to the require section of your `composer.json` file.
...@@ -30,7 +30,7 @@ Add module to your main config in common like this: ...@@ -30,7 +30,7 @@ Add module to your main config in common like this:
<?php <?php
'modules' => [ 'modules' => [
'email' => [ 'email' => [
'class' => 'elitedivision\amos\emailmanager\AmosEmail', 'class' => 'arter\amos\emailmanager\AmosEmail',
'templatePath' => '@common/mail/emails', 'templatePath' => '@common/mail/emails',
], ],
], ],
...@@ -41,7 +41,7 @@ Add module to your main config in common like this: ...@@ -41,7 +41,7 @@ Add module to your main config in common like this:
To apply migrations you can launch this command: To apply migrations you can launch this command:
```bash ```bash
php yii migrate/up --migrationPath=@vendor/elitedivision/amos-email-manager/src/migrations php yii migrate/up --migrationPath=@vendor/arter/amos-email-manager/src/migrations
``` ```
or add this row to your migrations config in console: or add this row to your migrations config in console:
...@@ -49,6 +49,6 @@ or add this row to your migrations config in console: ...@@ -49,6 +49,6 @@ or add this row to your migrations config in console:
```php ```php
<?php <?php
return [ return [
'@vendor/elitedivision/amos-email-manager/src/migrations', '@vendor/arter/amos-email-manager/src/migrations',
]; ];
``` ```
<?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\email * @package arter\amos\email
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
namespace elitedivision\amos\emailmanager\assets; namespace arter\amos\emailmanager\assets;
use Yii; use Yii;
use yii\web\AssetBundle; use yii\web\AssetBundle;
/** /**
* Class AmosMailAsset * Class AmosMailAsset
* @package elitedivision\amos\emailmanager\assets * @package arter\amos\emailmanager\assets
*/ */
class AmosMailAsset extends AssetBundle class AmosMailAsset extends AssetBundle
{ {
public $sourcePath = '@vendor/elitedivision/amos-email-manager/src/assets/web'; public $sourcePath = '@vendor/arter/amos-email-manager/src/assets/web';
public $css = [ public $css = [
'css/less/amos_mail.less' 'css/less/amos_mail.less'
...@@ -37,9 +33,9 @@ class AmosMailAsset extends AssetBundle ...@@ -37,9 +33,9 @@ class AmosMailAsset extends AssetBundle
{ {
$moduleL = Yii::$app->getModule('layout'); $moduleL = Yii::$app->getModule('layout');
if (!empty($moduleL)) { if (!empty($moduleL)) {
$this->depends [] = 'elitedivision\amos\layout\assets\BaseAsset'; $this->depends [] = 'arter\amos\layout\assets\BaseAsset';
} else { } else {
$this->depends [] = 'elitedivision\amos\core\views\assets\AmosCoreAsset'; $this->depends [] = 'arter\amos\core\views\assets\AmosCoreAsset';
} }
parent::init(); // TODO: Change the autogenerated stub parent::init(); // TODO: Change the autogenerated stub
} }
......
@import (optional) "../../vendor/elitedivision/amos-layout/src/assets/resources/base/less/variables.less"; @import (optional) "../../vendor/arter/amos-layout/src/assets/resources/base/less/variables.less";
@import (optional) "../../vendor/elitedivision/amos-core/views/assets/web/css/less/variables.less"; @import (optional) "../../vendor/arter/amos-core/views/assets/web/css/less/variables.less";
.section-data { .section-data {
.mail_message_info { .mail_message_info {
......
@import "../../vendor/elitedivision/amos-layout/src/assets/resources/base/less/variables.less"; @import "../../vendor/arter/amos-layout/src/assets/resources/base/less/variables.less";
@import "variables-email-manager.less"; @import "variables-email-manager.less";
.section-data { .section-data {
......
<?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\email * @package arter\amos\email
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
namespace elitedivision\amos\emailmanager\base; namespace arter\amos\emailmanager\base;
use elitedivision\amos\emailmanager\interfaces\ManagerInterface; use arter\amos\emailmanager\interfaces\ManagerInterface;
use elitedivision\amos\emailmanager\interfaces\TransportInterface; use arter\amos\emailmanager\interfaces\TransportInterface;
use elitedivision\amos\emailmanager\models\EmailSpool; use arter\amos\emailmanager\models\EmailSpool;
use elitedivision\amos\emailmanager\models\EmailTemplate; use arter\amos\emailmanager\models\EmailTemplate;
use elitedivision\amos\emailmanager\models\File; use arter\amos\emailmanager\models\File;
use elitedivision\amos\emailmanager\transports\YiiMailer; use arter\amos\emailmanager\transports\YiiMailer;
use Mustache_Engine; use Mustache_Engine;
use Yii; use Yii;
use yii\base\Exception; use yii\base\Exception;
...@@ -396,7 +392,7 @@ class AmosEmailManager implements ManagerInterface ...@@ -396,7 +392,7 @@ class AmosEmailManager implements ManagerInterface
/** /**
* *
* @param array $files * @param array $files
* @return \elitedivision\amos\emailmanager\base\File * @return \arter\amos\emailmanager\base\File
*/ */
private function loadFiles(array $files) private function loadFiles(array $files)
{ {
......
<?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\email * @package arter\amos\email
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
namespace elitedivision\amos\emailmanager\base; namespace arter\amos\emailmanager\base;
use yii\base\Exception; use yii\base\Exception;
use yii\redactor\RedactorModule; use yii\redactor\RedactorModule;
......
<?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\email * @package arter\amos\email
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
namespace elitedivision\amos\emailmanager\commands; namespace arter\amos\emailmanager\commands;
use Exception; use Exception;
use Yii; use Yii;
......
<?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\email * @package arter\amos\email
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
return [ return [
......
<?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\email * @package arter\amos\email
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
namespace elitedivision\amos\emailmanager\controllers; namespace arter\amos\emailmanager\controllers;
use Yii; use Yii;
use yii\helpers\Url; use yii\helpers\Url;
use elitedivision\amos\dashboard\controllers\base\DashboardController; use arter\amos\dashboard\controllers\base\DashboardController;
class DefaultController extends DashboardController class DefaultController extends DashboardController
......
<?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\email * @package arter\amos\email
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
namespace elitedivision\amos\emailmanager\controllers; namespace arter\amos\emailmanager\controllers;
use elitedivision\amos\core\controllers\CrudController; use arter\amos\core\controllers\CrudController;
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\emailmanager\AmosEmail; use arter\amos\emailmanager\AmosEmail;
use elitedivision\amos\emailmanager\models\EmailSpool; use arter\amos\emailmanager\models\EmailSpool;
use elitedivision\amos\emailmanager\models\search\EmailSpoolSearch; use arter\amos\emailmanager\models\search\EmailSpoolSearch;
use Yii; use Yii;
use yii\helpers\Url; use yii\helpers\Url;
use yii\helpers\ArrayHelper; use yii\helpers\ArrayHelper;
...@@ -195,7 +191,7 @@ class EmailSpoolController extends CrudController ...@@ -195,7 +191,7 @@ class EmailSpoolController extends CrudController
$module = \Yii::$app->getModule('layout'); $module = \Yii::$app->getModule('layout');
if (empty($module)) { if (empty($module)) {
if (strpos($this->layout, '@') === false) { if (strpos($this->layout, '@') === false) {
$this->layout = '@vendor/elitedivision/amos-core/views/layouts/' . (!empty($layout) ? $layout : $this->layout); $this->layout = '@vendor/arter/amos-core/views/layouts/' . (!empty($layout) ? $layout : $this->layout);
} }
return true; return true;
} }
......
<?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\email * @package arter\amos\email
* @category CategoryName * @category CategoryName
* @author Lombardia Informatica S.p.A.
*/ */
namespace elitedivision\amos\emailmanager\controllers; namespace arter\amos\emailmanager\controllers;
use elitedivision\amos\core\controllers\CrudController; use arter\amos\core\controllers\CrudController;
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\emailmanager\AmosEmail; use arter\amos\emailmanager\AmosEmail;
use elitedivision\amos\emailmanager\models\EmailTemplate; use arter\amos\emailmanager\models\EmailTemplate;
use elitedivision\amos\emailmanager\models\search\EmailTemplateSearch; use arter\amos\emailmanager\models\search\EmailTemplateSearch;
use Yii; use Yii;
use yii\helpers\Url; use yii\helpers\Url;
use yii\helpers\ArrayHelper; use yii\helpers\ArrayHelper;
...@@ -180,7 +176,7 @@ class EmailTemplateController extends CrudController ...@@ -180,7 +176,7 @@ class EmailTemplateController extends CrudController
$module = \Yii::$app->getModule('layout'); $module = \Yii::$app->getModule('layout');
if (empty($module)) { if (empty($module)) {
if (strpos($this->layout, '@') === false) { if (strpos($this->layout, '@') === false) {
$this->layout = '@vendor/elitedivision/amos-core/views/layouts/' . (!empty($layout) ? $layout : $this->layout); $this->layout = '@vendor/arter/amos-core/views/layouts/' . (!empty($layout) ? $layout : $this->layout);
} }
return true; return true;
} }
......
<?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\emailmanager\controllers * @package arter\amos\emailmanager\controllers
* @author Lombardia Informatica S.p.A.
*/