diff --git a/plugins/addons/tasks/class_tasks.inc b/plugins/addons/tasks/class_tasks.inc new file mode 100644 index 0000000000000000000000000000000000000000..a51c7e02d7e3f87354cc69a8af3f5a5cb014d3b1 --- /dev/null +++ b/plugins/addons/tasks/class_tasks.inc @@ -0,0 +1,67 @@ +<?php +/* + This code is part of FusionDirectory (http://www.fusiondirectory.org/) + + Copyright (C) 2012-2022 FusionDirectory + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +class tasks extends simplePlugin +{ + protected $displayHeader = FALSE; + + static function plInfo (): array + { + return [ + 'plShortName' => _('Tasks'), + 'plDescription' => _('Tasks'), + 'plObjectClass' => ['fdTasks'], + 'plFilter' => '(objectClass=fdTasks)', + 'plPriority' => 41, + 'plObjectType' => ['tasks' => [ + 'name' => _('Tasks'), + 'ou' => get_ou('tasksRDN'), + 'icon' => 'geticon.php?context=applications&icon=dsa&size=16', + ]], + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) + ]; + } + + static function getAttributesInfo (): array + { + return [ + // Attributes are grouped by section + 'tasks' => [ + 'name' => _('Tasks Generic'), + 'attrs' => [ + new StringAttribute( + _('Task Name'), _('Mail Template Name'), + 'cn', TRUE + ), + ] + ], + ]; + } + + + function __construct ($dn = NULL, $object = NULL, $parent = NULL, $mainTab = FALSE) + { + global $config; + parent::__construct($dn, $object, $parent, $mainTab); + + } + +} diff --git a/plugins/addons/tasks/class_tasksMail.inc b/plugins/addons/tasks/class_tasksMail.inc new file mode 100644 index 0000000000000000000000000000000000000000..236f27e6636affadbcde811fa62f5cb822e65ac0 --- /dev/null +++ b/plugins/addons/tasks/class_tasksMail.inc @@ -0,0 +1,64 @@ +<?php +/* + This code is part of FusionDirectory (http://www.fusiondirectory.org) + + Copyright (C) 2018-2022 FusionDirectory + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +*/ + +class tasksMail extends simplePlugin +{ + protected $displayHeader = TRUE; + + static function plInfo (): array + { + return [ + 'plShortName' => _('Tasks Mail'), + 'plDescription' => _('Tasks Mail Object'), + 'plIcon' => 'geticon.php?context=applications&icon=supann&size=48', + 'plSmallIcon' => 'geticon.php?context=applications&icon=supann-status&size=16', + 'plPriority' => 42, + 'plObjectClass' => ['fdTasksMail'], + 'plFilter' => '(objectClass=fdTasksMail)', + 'plObjectType' => ['tasks'], + 'plConflicts' => [''], + 'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo()) + ]; + } + + static function getAttributesInfo (): array + { + return [ + // Attributes are grouped by section + 'taskMail' => [ + 'name' => _('Task Mail Object'), + 'attrs' => [ + new StringAttribute( + _('Task Mail Template Name'), _('Mail Template Name'), + 'cn', TRUE + ), + ] + ], + ]; + } + + function __construct ($dn = NULL, $object = NULL, $parent = NULL, $mainTab = FALSE) + { + global $config; + parent::__construct($dn, $object, $parent, $mainTab); + } + +} diff --git a/plugins/addons/tasks/class_tasksManagement.inc b/plugins/addons/tasks/class_tasksManagement.inc new file mode 100644 index 0000000000000000000000000000000000000000..d5a62a9e8d6e67c5d75a1d0cf80015606a7f1458 --- /dev/null +++ b/plugins/addons/tasks/class_tasksManagement.inc @@ -0,0 +1,46 @@ +<?php +/* + This code is part of FusionDirectory (http://www.fusiondirectory.org/) + Copyright (C) 2011-2022 FusionDirectory + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +class tasksManagement extends management +{ + + /* Default columns */ + + public static $columns = [ + ['ObjectTypeColumn', []], + ['LinkColumn', ['attributes' => 'cn', 'label' => 'Tasks']], + ['ActionsColumn', ['label' => 'Actions']], + ]; + + static function plInfo () + { + return [ + 'plShortName' => _('Tasks'), + 'plDescription' => _('Provide a mechanism to create and manage tasks'), + 'plTitle' => _('Tasks'), + 'plIcon' => 'geticon.php?context=applications&icon=argonaut&size=48', + 'plSection' => 'conf', + 'plPriority' => 40, + 'plManages' => ['tasks'], + 'plProvidedAcls' => [], + ]; + } + +}