From 6572288a26a4247460e11e2f72a9b0ac27d54816 Mon Sep 17 00:00:00 2001 From: Damien <damien.burel@maarch.org> Date: Fri, 16 Feb 2018 10:08:33 +0100 Subject: [PATCH] FEAT #72 List Template Administration --- core/Test/BasketControllerTest.php | 2 - .../class/class_manage_listdiff_Abstract.php | 12 +- modules/entities/xml/services.xml | 2 +- rest/index.php | 7 + sql/17_xx.sql | 5 + sql/data_fr.sql | 76 +++--- sql/structure.sql | 3 +- .../controllers/ListTemplateController.php | 236 ++++++++++++++++++ .../models/ListTemplateModelAbstract.php | 50 ++++ src/core/lang/lang-en.php | 3 + src/core/lang/lang-fr.php | 3 + 11 files changed, 348 insertions(+), 51 deletions(-) create mode 100644 src/app/entity/controllers/ListTemplateController.php diff --git a/core/Test/BasketControllerTest.php b/core/Test/BasketControllerTest.php index 99eebc10158..3eb22c96153 100644 --- a/core/Test/BasketControllerTest.php +++ b/core/Test/BasketControllerTest.php @@ -277,8 +277,6 @@ class BasketControllerTest extends TestCase $this->assertSame('USERS', $groupAction->redirects[1]->redirect_mode); } } - - } public function testDeleteGroup() diff --git a/modules/entities/class/class_manage_listdiff_Abstract.php b/modules/entities/class/class_manage_listdiff_Abstract.php index bf924d5f5ae..c401457e0f1 100755 --- a/modules/entities/class/class_manage_listdiff_Abstract.php +++ b/modules/entities/class/class_manage_listdiff_Abstract.php @@ -211,15 +211,13 @@ abstract class diffusion_list_Abstract extends functions //print_r($description); exit; $stmt = $db->query( "insert into " . ENT_LISTMODELS - . " (coll_id, object_id, object_type, sequence, item_id, item_type, item_mode, listmodel_type, description, title, visible, process_comment ) " + . " (object_id, object_type, sequence, item_id, item_type, item_mode, description, title, visible, process_comment ) " . " values (" - . "'any', " - . "? , " + . "? , " . "?, ?, " . "?, " . "'user_id', " . "?, " - . "null, " . "?," . "?," . "?," @@ -234,15 +232,13 @@ abstract class diffusion_list_Abstract extends functions //print_r($description); exit; $stmt = $db->query( "insert into " . ENT_LISTMODELS - . " (coll_id, object_id, object_type, sequence, item_id, item_type, item_mode, listmodel_type, description, title, visible ) " + . " (object_id, object_type, sequence, item_id, item_type, item_mode, description, title, visible ) " . " values (" - . "'any', " - . "? , " + . "? , " . "?, ?, " . "?, " . "'entity_id', " . "?, " - . "null, " . "?, " . "?," . "?" diff --git a/modules/entities/xml/services.xml b/modules/entities/xml/services.xml index 8436bc7c5f1..ab95ac63be8 100755 --- a/modules/entities/xml/services.xml +++ b/modules/entities/xml/services.xml @@ -33,7 +33,7 @@ <name>_ADMIN_LISTMODELS</name> <comment>_ADMIN_LISTMODELS_DESC</comment> <servicepage>index.php?page=admin_listmodels&module=entities</servicepage> - <servicetype>use</servicetype> + <servicetype>admin</servicetype> <system_service>false</system_service> <style>fa fa-sitemap</style> <enabled>true</enabled> diff --git a/rest/index.php b/rest/index.php index 220e22764e1..3088f352f43 100755 --- a/rest/index.php +++ b/rest/index.php @@ -213,6 +213,13 @@ $app->get('/entities/{id}/details', \Entity\controllers\EntityController::class $app->put('/entities/{id}/reassign/{newEntityId}', \Entity\controllers\EntityController::class . ':reassignEntity'); $app->put('/entities/{id}/status', \Entity\controllers\EntityController::class . ':updateStatus'); +//ListTemplates +$app->get('/listTemplates', \Entity\controllers\ListTemplateController::class . ':get'); +$app->post('/listTemplates', \Entity\controllers\ListTemplateController::class . ':create'); +$app->get('/listTemplates/{id}', \Entity\controllers\ListTemplateController::class . ':getById'); +$app->put('/listTemplates/{id}', \Entity\controllers\ListTemplateController::class . ':update'); +$app->delete('/listTemplates/{id}', \Entity\controllers\ListTemplateController::class . ':delete'); + //Parameters $app->get('/parameters', \Parameter\controllers\ParameterController::class . ':get'); $app->post('/parameters', \Parameter\controllers\ParameterController::class . ':create'); diff --git a/sql/17_xx.sql b/sql/17_xx.sql index 583b3a709aa..8894184013c 100755 --- a/sql/17_xx.sql +++ b/sql/17_xx.sql @@ -371,6 +371,11 @@ ALTER TABLE groupbasket DROP COLUMN IF EXISTS sublist_lock_clause; DROP TABLE IF EXISTS groupbasket_difflist_types; DROP TABLE IF EXISTS groupbasket_difflist_roles; +/*LISTMODELS*/ +ALTER TABLE listmodels DROP COLUMN IF EXISTS listmodel_type; +ALTER TABLE listmodels DROP COLUMN IF EXISTS coll_id; +ALTER TABLE listmodels ADD COLUMN id serial NOT NULL; + -- ************************************************************************* -- -- CONVERT -- -- ************************************************************************* -- diff --git a/sql/data_fr.sql b/sql/data_fr.sql index 4533e6ac3cf..1bcfd98e641 100755 --- a/sql/data_fr.sql +++ b/sql/data_fr.sql @@ -712,101 +712,101 @@ TRUNCATE TABLE listmodels; DELETE FROM entities WHERE entity_id = 'VILLE'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('VILLE', 'Ville de Maarch-les-bains', 'Ville de Maarch-les-bains', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', '', 'Direction'); DELETE FROM listmodels WHERE object_id = 'VILLE' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'VILLE', 'entity_id', 0, '', 'user_id', 'dest', 'DOC', 'Ville de Maarch-les-bains'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('VILLE', 'entity_id', 0, '', 'user_id', 'dest', 'Ville de Maarch-les-bains'); DELETE FROM entities WHERE entity_id = 'CAB'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('CAB', 'Cabinet du Maire', 'Cabinet du Maire', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'VILLE', 'Direction'); DELETE FROM listmodels WHERE object_id = 'CAB' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'CAB', 'entity_id', 0, 'eerina', 'user_id', 'dest', 'DOC', 'Cabinet du Maire'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'CAB', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'DOC', 'Cabinet du Maire'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'CAB', 'entity_id', 0, 'ppetit', 'user_id', 'cc', 'DOC', 'Cabinet du Maire'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('CAB', 'entity_id', 0, 'eerina', 'user_id', 'dest', 'Cabinet du Maire'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('CAB', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'Cabinet du Maire'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('CAB', 'entity_id', 0, 'ppetit', 'user_id', 'cc', 'Cabinet du Maire'); DELETE FROM entities WHERE entity_id = 'DGS'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('DGS', 'Direction Générale des Services', 'Direction Générale des Services', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'VILLE', 'Direction'); DELETE FROM listmodels WHERE object_id = 'DGS' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'DGS', 'entity_id', 0, 'rrenaud', 'user_id', 'dest', 'DOC', 'Direction Générale des Services'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('DGS', 'entity_id', 0, 'rrenaud', 'user_id', 'dest', 'Direction Générale des Services'); DELETE FROM entities WHERE entity_id = 'DGA'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('DGA', 'Direction Générale Adjointe', 'Direction Générale Adjointe', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'DGS', 'Bureau'); DELETE FROM listmodels WHERE object_id = 'DGA' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'DGA', 'entity_id', 0, 'mmanfred', 'user_id', 'dest', 'DOC', 'Direction Générale Adjointe'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'DGA', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'DOC', 'Direction Générale Adjointe'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'DGA', 'entity_id', 0, 'kkaar', 'user_id', 'cc', 'DOC', 'Direction Générale Adjointe'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('DGA', 'entity_id', 0, 'mmanfred', 'user_id', 'dest', 'Direction Générale Adjointe'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('DGA', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'Direction Générale Adjointe'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('DGA', 'entity_id', 0, 'kkaar', 'user_id', 'cc', 'Direction Générale Adjointe'); DELETE FROM entities WHERE entity_id = 'PCU'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('PCU', 'Pôle Culturel', 'Pôle Culturel', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'DGA', 'Service'); DELETE FROM listmodels WHERE object_id = 'PCU' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'PCU', 'entity_id', 0, 'bboule', 'user_id', 'dest', 'DOC', 'Pôle Culturel'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'PCU', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'DOC', 'Pôle Culturel'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('PCU', 'entity_id', 0, 'bboule', 'user_id', 'dest', 'Pôle Culturel'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('PCU', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'Pôle Culturel'); DELETE FROM entities WHERE entity_id = 'PJS'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('PJS', 'Pôle Jeunesse et Sport', 'Pôle Jeunesse et Sport', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'DGA', 'Service'); DELETE FROM listmodels WHERE object_id = 'PJS' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'PJS', 'entity_id', 0, 'bbain', 'user_id', 'dest', 'DOC', 'Pôle Jeunesse et Sport'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'PJS', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'DOC', 'Pôle Jeunesse et Sport'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('PJS', 'entity_id', 0, 'bbain', 'user_id', 'dest', 'Pôle Jeunesse et Sport'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('PJS', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'Pôle Jeunesse et Sport'); DELETE FROM entities WHERE entity_id = 'PE'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('PE', 'Petite enfance', 'Petite enfance', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'PJS', 'Service'); DELETE FROM listmodels WHERE object_id = 'PE' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'PE', 'entity_id', 0, 'ssaporta', 'user_id', 'dest', 'DOC', 'Petite enfance'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'PE', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'DOC', 'Petite enfance'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('PE', 'entity_id', 0, 'ssaporta', 'user_id', 'dest', 'Petite enfance'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('PE', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'Petite enfance'); DELETE FROM entities WHERE entity_id = 'SP'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('SP', 'Sport', 'Sport', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'PJS', 'Service'); DELETE FROM listmodels WHERE object_id = 'SP' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'SP', 'entity_id', 0, 'ttong', 'user_id', 'dest', 'DOC', 'Sport'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'SP', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'DOC', 'Sport'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('SP', 'entity_id', 0, 'ttong', 'user_id', 'dest', 'Sport'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('SP', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'Sport'); DELETE FROM entities WHERE entity_id = 'PSO'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('PSO', 'Pôle Social', 'Pôle Social', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'DGA', 'Service'); DELETE FROM listmodels WHERE object_id = 'PSO' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'PSO', 'entity_id', 0, 'nnataly', 'user_id', 'dest', 'DOC', 'Pôle Social'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'PSO', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'DOC', 'Pôle Social'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('PSO', 'entity_id', 0, 'nnataly', 'user_id', 'dest', 'Pôle Social'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('PSO', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'Pôle Social'); DELETE FROM entities WHERE entity_id = 'PTE'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('PTE', 'Pôle Technique', 'Pôle Technique', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'DGA', 'Service'); DELETE FROM listmodels WHERE object_id = 'PTE' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'PTE', 'entity_id', 0, 'ccharles', 'user_id', 'dest', 'DOC', 'Pôle Technique'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'PTE', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'DOC', 'Pôle Technique'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('PTE', 'entity_id', 0, 'ccharles', 'user_id', 'dest', 'Pôle Technique'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('PTE', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'Pôle Technique'); DELETE FROM entities WHERE entity_id = 'DRH'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('DRH', 'Direction des Ressources Humaines', 'Direction des Ressources Humaines', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'DGS', 'Service'); DELETE FROM listmodels WHERE object_id = 'DRH' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'DRH', 'entity_id', 0, 'ppruvost', 'user_id', 'dest', 'DOC', 'Direction des Ressources Humaines'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'DRH', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'DOC', 'Direction des Ressources Humaines'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('DRH', 'entity_id', 0, 'ppruvost', 'user_id', 'dest', 'Direction des Ressources Humaines'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('DRH', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'Direction des Ressources Humaines'); DELETE FROM entities WHERE entity_id = 'DSG'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('DSG', 'Secrétariat Général', 'Secrétariat Général', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'DGS', 'Direction'); DELETE FROM listmodels WHERE object_id = 'DSG' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'DSG', 'entity_id', 0, 'ddaull', 'user_id', 'dest', 'DOC', 'Secrétariat Général'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('DSG', 'entity_id', 0, 'ddaull', 'user_id', 'dest', 'Secrétariat Général'); DELETE FROM entities WHERE entity_id = 'COU'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('COU', 'Service Courrier', 'Service Courrier', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'DSG', 'Service'); DELETE FROM listmodels WHERE object_id = 'COU' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'COU', 'entity_id', 0, 'bblier', 'user_id', 'dest', 'DOC', 'Service Courrier'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'COU', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'DOC', 'Service Courrier'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('COU', 'entity_id', 0, 'bblier', 'user_id', 'dest', 'Service Courrier'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('COU', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'Service Courrier'); DELETE FROM entities WHERE entity_id = 'COR'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('COR', 'Correspondants Archive', 'Correspondants Archive', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'COU', 'Service'); DELETE FROM listmodels WHERE object_id = 'COR' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'COR', 'entity_id', 0, '', 'user_id', 'dest', 'DOC', 'Correspondants Archive'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('COR', 'entity_id', 0, '', 'user_id', 'dest', 'Correspondants Archive'); DELETE FROM entities WHERE entity_id = 'PSF'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('PSF', 'Pôle des Services Fonctionnels', 'Services Fonctionnels', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'DSG', 'Service'); DELETE FROM listmodels WHERE object_id = 'PSF' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'PSF', 'entity_id', 0, 'aackermann', 'user_id', 'dest', 'DOC', 'Pôle des Services Fonctionnels'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'PSF', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'DOC', 'Pôle des Services Fonctionnels'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('PSF', 'entity_id', 0, 'aackermann', 'user_id', 'dest', 'Pôle des Services Fonctionnels'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('PSF', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'Pôle des Services Fonctionnels'); DELETE FROM entities WHERE entity_id = 'DSI'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('DSI', 'Direction des Systèmes d''Information', 'Direction des Systèmes d''Information', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'DGS', 'Service'); DELETE FROM listmodels WHERE object_id = 'DSI' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'DSI', 'entity_id', 0, 'ssissoko', 'user_id', 'dest', 'DOC', 'Direction des Systèmes d''Information'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'DSI', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'DOC', 'Direction des Systèmes d''Information'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'DSI', 'entity_id', 0, 'ccordy', 'user_id', 'cc', 'DOC', 'Direction des Systèmes d''Information'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('DSI', 'entity_id', 0, 'ssissoko', 'user_id', 'dest', 'Direction des Systèmes d''Information'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('DSI', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'Direction des Systèmes d''Information'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('DSI', 'entity_id', 0, 'ccordy', 'user_id', 'cc', 'Direction des Systèmes d''Information'); DELETE FROM entities WHERE entity_id = 'FIN'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('FIN', 'Direction des Finances', 'Direction des Finances', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'DGS', 'Service'); DELETE FROM listmodels WHERE object_id = 'FIN' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'FIN', 'entity_id', 0, 'sstar', 'user_id', 'dest', 'DOC', 'Direction des Finances'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'FIN', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'DOC', 'Direction des Finances'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'FIN', 'entity_id', 0, 'jjane', 'user_id', 'cc', 'DOC', 'Direction des Finances'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('FIN', 'entity_id', 0, 'sstar', 'user_id', 'dest', 'Direction des Finances'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('FIN', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'Direction des Finances'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('FIN', 'entity_id', 0, 'jjane', 'user_id', 'cc', 'Direction des Finances'); DELETE FROM entities WHERE entity_id = 'PJU'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('PJU', 'Pôle Juridique', 'Pôle Juridique', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'FIN', 'Service'); DELETE FROM listmodels WHERE object_id = 'PJU' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'PJU', 'entity_id', 0, 'jjonasz', 'user_id', 'dest', 'DOC', 'Pôle Juridique'); -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'PJU', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'DOC', 'Pôle Juridique'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('PJU', 'entity_id', 0, 'jjonasz', 'user_id', 'dest', 'Pôle Juridique'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('PJU', 'entity_id', 0, 'DSG', 'entity_id', 'cc', 'Pôle Juridique'); DELETE FROM entities WHERE entity_id = 'ELUS'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('ELUS', 'Ensemble des élus', 'ELUS:Ensemble des élus', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', 'VILLE', 'Direction'); DELETE FROM listmodels WHERE object_id = 'ELUS' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'ELUS', 'entity_id', 0, '', 'user_id', 'dest', 'DOC', 'Ensemble des élus'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('ELUS', 'entity_id', 0, '', 'user_id', 'dest', 'Ensemble des élus'); DELETE FROM entities WHERE entity_id = 'CCAS'; INSERT INTO entities (entity_id, entity_label, short_label, enabled, adrs_1, adrs_2, adrs_3, zipcode, city, country, email, business_id, parent_entity_id, entity_type) VALUES ('CCAS', 'Centre Communal d''Action Sociale', 'Centre Communal d''Action Sociale', 'Y', '', '', '', '', '', '', 'info@maarch.org', '', '', 'Direction'); DELETE FROM listmodels WHERE object_id = 'CCAS' AND object_type = 'entity_id'; -INSERT INTO listmodels (coll_id, object_id, object_type, "sequence", item_id, item_type, item_mode, listmodel_type, description) VALUES ('letterbox_coll', 'CCAS', 'entity_id', 0, '', 'user_id', 'dest', 'DOC', 'Centre Communal d''Action Sociale'); +INSERT INTO listmodels (object_id, object_type, "sequence", item_id, item_type, item_mode, description) VALUES ('CCAS', 'entity_id', 0, '', 'user_id', 'dest', 'Centre Communal d''Action Sociale'); -- Create BASKETS TRUNCATE TABLE baskets; diff --git a/sql/structure.sql b/sql/structure.sql index f1bcd484747..1bf0d5241ad 100755 --- a/sql/structure.sql +++ b/sql/structure.sql @@ -699,14 +699,13 @@ WITH (OIDS=FALSE); CREATE TABLE listmodels ( - coll_id character varying(50) NOT NULL, + id serial NOT NULL, object_id character varying(50) NOT NULL, object_type character varying(255) NOT NULL, "sequence" bigint NOT NULL, item_id character varying(128) NOT NULL, item_type character varying(255) NOT NULL, item_mode character varying(50) NOT NULL, - listmodel_type character varying(50) DEFAULT 'DOC'::character varying, title character varying(255), description character varying(255), process_comment character varying(255), diff --git a/src/app/entity/controllers/ListTemplateController.php b/src/app/entity/controllers/ListTemplateController.php new file mode 100644 index 00000000000..f905df46c5b --- /dev/null +++ b/src/app/entity/controllers/ListTemplateController.php @@ -0,0 +1,236 @@ +<?php + +/** +* Copyright Maarch since 2008 under licence GPLv3. +* See LICENCE.txt file at the root folder for more details. +* This file is part of Maarch software. +* +*/ + +/** +* @brief List Template Controller +* @author dev@maarch.org +*/ + +namespace Entity\controllers; + +use Core\Models\ServiceModel; +use Core\Models\ValidatorModel; +use Entity\models\EntityModel; +use Entity\models\ListTemplateModel; +use History\controllers\HistoryController; +use Respect\Validation\Validator; +use Slim\Http\Request; +use Slim\Http\Response; +use SrcCore\models\DatabaseModel; + +class ListTemplateController +{ + public function get(Request $request, Response $response) + { + $rawListTemplates = ListTemplateModel::get(['select' => ['id', 'object_id', 'object_type', 'title', 'description']]); + + $listTemplates = []; + $tmpTemplates = []; + foreach ($rawListTemplates as $rawListTemplate) { + if (empty($tmpTemplates[$rawListTemplate['object_type']][$rawListTemplate['object_id']])) { + $listTemplates[] = $rawListTemplate; + $tmpTemplates[$rawListTemplate['object_type']][$rawListTemplate['object_id']] = 1; + } + } + + return $response->withJson(['listTemplates' => $listTemplates]); + } + + public function getById(Request $request, Response $response, array $aArgs) + { + $listTemplates = ListTemplateModel::getById(['id' => $aArgs['id']]); + if (empty($listTemplates)) { + return $response->withStatus(400)->withJson(['errors' => 'List template not found']); + } + + return $response->withJson(['listTemplate' => $listTemplates]); + } + + public function create(Request $request, Response $response) + { + if (!ServiceModel::hasService(['id' => 'admin_listmodels', 'userId' => $GLOBALS['userId'], 'location' => 'entities', 'type' => 'admin'])) { + return $response->withStatus(403)->withJson(['errors' => 'Service forbidden']); + } + + $data = $request->getParams(); + + $allowedObjectTypes = ['entity_id', 'VISA_CIRCUIT', 'AVIS_CIRCUIT']; + $check = Validator::stringType()->notEmpty()->validate($data['object_type']) && in_array($data['object_type'], $allowedObjectTypes); + $check = $check && (Validator::stringType()->notEmpty()->validate($data['object_id']) || $data['object_type'] != 'entity_id'); + $check = $check && Validator::arrayType()->notEmpty()->validate($data['items']); + $check = $check && (Validator::stringType()->notEmpty()->validate($data['title']) || Validator::stringType()->notEmpty()->validate($data['description'])); + if (!$check) { + return $response->withStatus(400)->withJson(['errors' => 'Bad Request']); + } + + if (!empty($data['object_id']) && $data['object_type'] != 'AVIS_CIRCUIT') { + $listTemplate = ListTemplateModel::get(['select' => [1], 'where' => ['object_id = ?', 'object_type = ?'], 'data' => [$data['object_id'], $data['object_type']]]); + if (!empty($listTemplate)) { + return $response->withStatus(400)->withJson(['errors' => 'Entity is already linked to this type of template']); + } + $aEntities = EntityModel::getAllowedEntitiesByUserId(['userId' => $GLOBALS['userId']]); + foreach ($aEntities as $aEntity) { + if ($aEntity['entity_id'] == $data['object_id'] && $aEntity['allowed'] == false) { + return $response->withStatus(403)->withJson(['errors' => 'Entity out of perimeter']); + } + } + } else { + $data['object_id'] = $data['object_type'] . '_' . DatabaseModel::uniqueId(); + } + + $checkItems = ListTemplateController::checkItems(['item' => $data['items']]); + if (!empty($checkItems['errors'])) { + return $response->withStatus(400)->withJson(['errors' => $checkItems['errors']]); + } + + foreach ($data['items'] as $item) { + ListTemplateModel::create([ + 'object_id' => $data['object_id'], + 'object_type' => $data['object_type'], + 'title' => $data['title'], + 'description' => $data['description'], + 'sequence' => $item['sequence'], + 'item_id' => $item['item_id'], + 'item_type' => $item['item_type'], + 'item_mode' => $item['item_mode'], + ]); + } + + HistoryController::add([ + 'tableName' => 'listmodels', + 'recordId' => $data['object_id'], + 'eventType' => 'ADD', + 'info' => _LIST_TEMPLATE_CREATION . " : {$data['title']} {$data['description']}", + 'moduleId' => 'listTemplate', + 'eventId' => 'listTemplateCreation', + ]); + + return $response->withJson(['success' => 'success']); + } + + public function update(Request $request, Response $response, array $aArgs) + { + if (!ServiceModel::hasService(['id' => 'admin_listmodels', 'userId' => $GLOBALS['userId'], 'location' => 'entities', 'type' => 'admin'])) { + return $response->withStatus(403)->withJson(['errors' => 'Service forbidden']); + } + + $data = $request->getParams(); + $check = Validator::arrayType()->notEmpty()->validate($data['items']); + $check = $check && (Validator::stringType()->notEmpty()->validate($data['title']) || Validator::stringType()->notEmpty()->validate($data['description'])); + if (!$check) { + return $response->withStatus(400)->withJson(['errors' => 'Bad Request']); + } + + $listTemplates = ListTemplateModel::getById(['id' => $aArgs['id'], 'select' => ['object_id', 'object_type']]); + if (empty($listTemplates)) { + return $response->withStatus(400)->withJson(['errors' => 'List template not found']); + } + + if (!strstr($listTemplates[0]['object_id'], 'VISA_CIRCUIT_') && !strstr($listTemplates[0]['object_id'], 'AVIS_CIRCUIT_')) { + $aEntities = EntityModel::getAllowedEntitiesByUserId(['userId' => $GLOBALS['userId']]); + foreach ($aEntities as $aEntity) { + if ($aEntity['entity_id'] == $listTemplates[0]['object_id'] && $aEntity['allowed'] == false) { + return $response->withStatus(403)->withJson(['errors' => 'Entity out of perimeter']); + } + } + } + + $checkItems = ListTemplateController::checkItems(['item' => $data['items']]); + if (!empty($checkItems['errors'])) { + return $response->withStatus(400)->withJson(['errors' => $checkItems['errors']]); + } + + ListTemplateModel::delete([ + 'where' => ['object_id = ?', 'object_type = ?'], + 'data' => [$listTemplates[0]['object_id'], $listTemplates[0]['object_type']] + ]); + foreach ($data['items'] as $item) { + ListTemplateModel::create([ + 'object_id' => $listTemplates[0]['object_id'], + 'object_type' => $listTemplates[0]['object_type'], + 'title' => $data['title'], + 'description' => $data['description'], + 'sequence' => $item['sequence'], + 'item_id' => $item['item_id'], + 'item_type' => $item['item_type'], + 'item_mode' => $item['item_mode'], + ]); + } + + HistoryController::add([ + 'tableName' => 'listmodels', + 'recordId' => $listTemplates[0]['object_id'], + 'eventType' => 'UP', + 'info' => _LIST_TEMPLATE_MODIFICATION . " : {$data['title']} {$data['description']}", + 'moduleId' => 'listTemplate', + 'eventId' => 'listTemplateModification', + ]); + + return $response->withJson(['success' => 'success']); + } + + public function delete(Request $request, Response $response, array $aArgs) + { + if (!ServiceModel::hasService(['id' => 'admin_listmodels', 'userId' => $GLOBALS['userId'], 'location' => 'entities', 'type' => 'admin'])) { + return $response->withStatus(403)->withJson(['errors' => 'Service forbidden']); + } + + $listTemplates = ListTemplateModel::getById(['id' => $aArgs['id'], 'select' => ['object_id', 'object_type']]); + if (empty($listTemplates)) { + return $response->withStatus(400)->withJson(['errors' => 'List template not found']); + } + + if (!strstr($listTemplates[0]['object_id'], 'VISA_CIRCUIT_') && !strstr($listTemplates[0]['object_id'], 'AVIS_CIRCUIT_')) { + $aEntities = EntityModel::getAllowedEntitiesByUserId(['userId' => $GLOBALS['userId']]); + foreach ($aEntities as $aEntity) { + if ($aEntity['entity_id'] == $listTemplates[0]['object_id'] && $aEntity['allowed'] == false) { + return $response->withStatus(403)->withJson(['errors' => 'Entity out of perimeter']); + } + } + } + + ListTemplateModel::delete([ + 'where' => ['object_id = ?', 'object_type = ?'], + 'data' => [$listTemplates[0]['object_id'], $listTemplates[0]['object_type']] + ]); + HistoryController::add([ + 'tableName' => 'listmodels', + 'recordId' => $listTemplates[0]['object_id'], + 'eventType' => 'DEL', + 'info' => _LIST_TEMPLATE_SUPPRESSION . " : {$listTemplates[0]['object_id']} {$listTemplates[0]['object_type']}", + 'moduleId' => 'listTemplate', + 'eventId' => 'listTemplateSuppression', + ]); + + return $response->withJson(['success' => 'success']); + } + + private static function checkItems(array $aArgs) + { + ValidatorModel::notEmpty($aArgs, ['items']); + ValidatorModel::arrayType($aArgs, ['items']); + + foreach ($aArgs['items'] as $item) { + if (empty($item['item_id'])) { + return ['errors' => 'Item_id is empty']; + } + if (empty($item['item_type'])) { + return ['errors' => 'Item_type is empty']; + } + if (empty($item['item_mode'])) { + return ['errors' => 'Item_mode is empty']; + } + if (is_numeric($item['sequence'])) { + return ['errors' => 'Sequence is not numeric']; + } + } + + return ['success' => 'success']; + } +} diff --git a/src/app/entity/models/ListTemplateModelAbstract.php b/src/app/entity/models/ListTemplateModelAbstract.php index 9367d612fae..7efeac40d23 100644 --- a/src/app/entity/models/ListTemplateModelAbstract.php +++ b/src/app/entity/models/ListTemplateModelAbstract.php @@ -33,6 +33,56 @@ class ListTemplateModelAbstract return $aListTemplates; } + public static function getById(array $aArgs) + { + ValidatorModel::notEmpty($aArgs, ['id']); + ValidatorModel::intVal($aArgs, ['id']); + ValidatorModel::arrayType($aArgs, ['select']); + + $basicTemplate = DatabaseModel::select([ + 'select' => ['object_id', 'object_type'], + 'table' => ['listmodels'], + 'where' => ['id = ?'], + 'data' => [$aArgs['id']] + ]); + if (empty($basicTemplate)) { + return []; + } + + $aListTemplates = DatabaseModel::select([ + 'select' => empty($aArgs['select']) ? ['*'] : $aArgs['select'], + 'table' => ['listmodels'], + 'where' => ['object_id = ?', 'object_type = ?'], + 'data' => [$basicTemplate[0]['object_id'], $basicTemplate[0]['object_type']] + ]); + + return $aListTemplates; + } + + public static function create(array $aArgs) + { + ValidatorModel::notEmpty($aArgs, ['object_id', 'object_type', 'sequence', 'item_id', 'item_type', 'item_mode']); + ValidatorModel::stringType($aArgs, ['object_id', 'object_type', 'item_id', 'item_type', 'title', 'description']); + ValidatorModel::intVal($aArgs, ['sequence']); + + DatabaseModel::insert([ + 'table' => 'listmodels', + 'columnsValues' => [ + 'object_id' => $aArgs['object_id'], + 'object_type' => $aArgs['object_type'], + 'sequence' => $aArgs['sequence'], + 'item_id' => $aArgs['item_id'], + 'item_type' => $aArgs['item_type'], + 'item_mode' => $aArgs['item_mode'], + 'title' => $aArgs['title'], + 'description' => $aArgs['description'], + 'visible' => 'Y', + ] + ]); + + return true; + } + public static function delete(array $aArgs) { ValidatorModel::notEmpty($aArgs, ['where', 'data']); diff --git a/src/core/lang/lang-en.php b/src/core/lang/lang-en.php index 867d17a95bb..61e37f7400a 100644 --- a/src/core/lang/lang-en.php +++ b/src/core/lang/lang-en.php @@ -35,6 +35,9 @@ define('_ENTITY_CREATION', 'Entity creation'); define('_ENTITY_MODIFICATION', 'Entity modification'); define('_ENTITY_SUPPRESSION', 'Entity suppression'); define('_INVALID_CLAUSE', 'Clause is not valid'); +define('_LIST_TEMPLATE_CREATION', 'List model creation'); +define('_LIST_TEMPLATE_MODIFICATION', 'List model modification'); +define('_LIST_TEMPLATE_SUPPRESSION', 'List model suppression'); define('_MODIFY_NOTIFICATIONS', 'Notification updated'); define('_MODIFY_STATUS', 'Statut updated'); define('_NOTIFICATION_SCHEDULE_UPDATED', 'Notification scheduled updated'); diff --git a/src/core/lang/lang-fr.php b/src/core/lang/lang-fr.php index 049749f60e6..b9006bc999e 100644 --- a/src/core/lang/lang-fr.php +++ b/src/core/lang/lang-fr.php @@ -35,6 +35,9 @@ define('_ENTITY_CREATION', 'Création entité'); define('_ENTITY_MODIFICATION', 'Modification entité'); define('_ENTITY_SUPPRESSION', 'Suppression entité'); define('_INVALID_CLAUSE', 'Clause non valide'); +define('_LIST_TEMPLATE_CREATION', 'Création liste de diffusion'); +define('_LIST_TEMPLATE_MODIFICATION', 'Modification liste de diffusion'); +define('_LIST_TEMPLATE_SUPPRESSION', 'Suppression liste de diffusion'); define('_MODIFY_NOTIFICATIONS', 'Notification modifiée'); define('_MODIFY_STATUS', 'Statut modifié'); define('_NOTIFICATION_SCHEDULE_UPDATED', 'La planification des notifications a été mise à jour'); -- GitLab