elitedivision/amos-report
Sistema AMOS per le segnalazioni
Requires
- php:>=5.4.0
- 2amigos/yii2-ckeditor-widget:~1.0
- cornernote/yii2-workflow-manager:*
- elitedivision/amos-admin:~2.0
- elitedivision/amos-core:^1.9.50
- elitedivision/amos-notify:~1.4
- raoul2000/yii2-workflow:*
- raoul2000/yii2-workflow-view:*
- yiidoc/yii2-redactor:*
Requires (Dev)
- yiisoft/yii2-faker:*
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- 1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-test/1.2.1/1
- dev-daniele/1.2.1/1
- dev-gianluca/1.2.0/2
- dev-test/1.2.0/3
- dev-test/1.2.0/2
- dev-gianluca/1.1.0/2
- dev-test/1.1.0/3
- dev-test/1.2.0/1
- dev-gianluca/1.1.0/1
- dev-test/1.1.0/2
- dev-elena/1.1.0/2
- dev-la_francesca/befe
- dev-test/1.1.0/1
- dev-daniele/fixes/7124
- dev-open20/1.0.7/1
- dev-scarface
- dev-test/1.0.7/1
- dev-test/1.0.6/1
- dev-POI
- dev-POI_community_fullsize
- dev-community_fullsize
- dev-test/1.0.5/2
- dev-MicheleA
- dev-test/1.0.5/1
- dev-DEPLOY_POI_20180921
- dev-test/1.0.4/1
- dev-cinzia
- dev-fabiot
- dev-riccardo-newModal
- dev-test/1.0.3/1
- dev-simone/1.0.3/1
- dev-riccardo/1.0.2/1
- dev-simone/1.0.2/1
- dev-la_francesca/1.0.1/1
- dev-test/1.0.2/1
- dev-test/1.0.1/1
- dev-test/1.0/4
- dev-riccardo/1.0/4
- dev-pivanti
- dev-test/1.0/2
- dev-riccardo/1.0/3
- dev-test/1.0/3
- dev-test/1.0/1
README
Extension for report sending on contents like news, discussions, etc...
Installation
- The preferred way to install this extension is through composer.
Either run
composer require elitedivision/amos-report
or add this row
"elitedivision/amos-report": "dev-master"
to the require section of your composer.json
file.
Add module to your main config in backend:
`
php'modules' => [
'comments' => [ 'class' => 'elitedivision\amos\report\AmosReport', 'modelsEnabled' => [ /** * Add here the classnames of the models for whose you want to enable reports * (i.e. 'elitedivision\amos\news\models\News') */ ] ],
],
`
To send report notification not only to the content creator but also to the content validator, installation of amos-workflow is needed too
a. Add workflow to composer
"elitedivision/amos-workflow": "dev-master"
b. check in config/main for 'workflow' in modules array, if present
`
php 'workflow' => ['class' => 'cornernote\workflow\manager\Module',
],
change the entry in:
php 'workflow-manager' => ['class' => 'cornernote\workflow\manager\Module',
],
`
c. add workflow entry (config/main in modules array):
'workflow' => [ 'class' => 'elitedivision\amos\workflow\AmosWorkflow', ],
d. add 'workflow' entry to your bootstrap:
`
php 'bootstrap' => [. . . 'workflow', . . .
],
`
Apply migrations
a. amos-report migrations
`
bash php yii migrate/up --migrationPath=@vendor/elitedivision/amos-report/src/migrations`
or add this row to your migrations config in console:
`
php return [. . . '@vendor/elitedivision/amos-report/src/migrations', . . .
];
`
b. if workflow module is installed (see step 3), also add amos-workflow migrations:
`
bash php yii migrate/up --migrationPath=@vendor/elitedivision/amos-workflow/src/migrations`
or add this row to your migrations config in console:`
php return [. . . '@vendor/elitedivision/amos-workflow/src/migrations', . . .
];
`
Widgets
Amos Report provides two Widgets:
ReportWidget elitedivision\amos\report\widgets\ReportWidget
Draw a flag icon related to a model. On flag click, the system opens form to insert a new report on a modal popup.TabReportsWidget elitedivision\amos\report\widgets\TabReportsWidget
Draw the Report tab in a model view/form, containing the list of reports a specif content.
If a model has been enabled for reports, the tab is automatically injected in update phase (form) by AmosCore widget 'Tabs'.
Email Sending
After the creation of a new report on a content a mail is sent to:
- Content creator
- Content validator (if exixts)
- Users having the REPORT_MONITOR role for that content type (if role exists)
The role name must follow the general permission naming convention _REPORT_MONITOR as for eg. create and update permissions (MODELNAME_CREATE, MODELNAME_UPDATE).