diff --git a/Admin/Activate.php b/Admin/Activate.php index 0fb8ccd..fff7124 100644 --- a/Admin/Activate.php +++ b/Admin/Activate.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -16,7 +16,7 @@ namespace Modules\Tasks\Admin; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\Module\ActivateAbstract; use phpOMS\Module\InfoManager; @@ -37,7 +37,7 @@ class Activate extends ActivateAbstract /** * {@inheritdoc} */ - public static function activate(Pool $dbPool, InfoManager $info) + public static function activate(DatabasePool $dbPool, InfoManager $info) { parent::activate($dbPool, $info); } diff --git a/Admin/Deactivate.php b/Admin/Deactivate.php index 4aa98aa..8ae2bfa 100644 --- a/Admin/Deactivate.php +++ b/Admin/Deactivate.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -16,7 +16,7 @@ namespace Modules\Tasks\Admin; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\Module\DeactivateAbstract; use phpOMS\Module\InfoManager; @@ -37,7 +37,7 @@ class Deactivate extends DeactivateAbstract /** * {@inheritdoc} */ - public static function deactivate(Pool $dbPool, InfoManager $info) + public static function deactivate(DatabasePool $dbPool, InfoManager $info) { parent::deactivate($dbPool, $info); } diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php index 9707e5b..2a574b0 100644 --- a/Admin/Install/Navigation.php +++ b/Admin/Install/Navigation.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -14,7 +14,7 @@ * @link http://orange-management.com */ namespace Modules\Tasks\Admin\Install; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; /** * Navigation class. @@ -29,7 +29,7 @@ use phpOMS\DataStorage\Database\Pool; */ class Navigation { - public static function install(Pool $dbPool) + public static function install(string $path, DatabasePool $dbPool) { $navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true); diff --git a/Admin/Installer.php b/Admin/Installer.php index e098440..5594d54 100644 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -16,7 +16,7 @@ namespace Modules\Tasks\Admin; use phpOMS\DataStorage\Database\DatabaseType; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\Module\InfoManager; use phpOMS\Module\InstallerAbstract; @@ -37,9 +37,9 @@ class Installer extends InstallerAbstract /** * {@inheritdoc} */ - public static function install(Pool $dbPool, InfoManager $info) + public static function install(string $path, DatabasePool $dbPool, InfoManager $info) { - parent::install($dbPool, $info); + parent::install($path, $dbPool, $info); switch ($dbPool->get('core')->getType()) { case DatabaseType::MYSQL: @@ -69,6 +69,23 @@ class Installer extends InstallerAbstract ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'task_ibfk_2` FOREIGN KEY (`task_created_by`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`);' )->execute(); + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'task_media` ( + `task_media_id` int(11) NOT NULL AUTO_INCREMENT, + `task_media_src` int(11) NULL, + `task_media_dst` int(11) NULL, + PRIMARY KEY (`task_media_id`), + KEY `task_media_src` (`task_media_src`), + KEY `task_media_dst` (`task_media_dst`) + )ENGINE=InnoDB DEFAULT CHARSET=utf8;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'task_media` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'task_media_ibfk_1` FOREIGN KEY (`task_media_src`) REFERENCES `' . $dbPool->get('core')->prefix . 'task` (`task_id`), + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'task_media_ibfk_2` FOREIGN KEY (`task_media_dst`) REFERENCES `' . $dbPool->get('core')->prefix . 'media` (`media_id`);' + )->execute(); + $dbPool->get('core')->con->prepare( 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'task_account` ( `task_account_id` int(11) NOT NULL AUTO_INCREMENT, @@ -112,6 +129,23 @@ class Installer extends InstallerAbstract ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'task_element_ibfk_3` FOREIGN KEY (`task_element_forwarded`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`);' )->execute(); + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'task_element_media` ( + `task_element_media_id` int(11) NOT NULL AUTO_INCREMENT, + `task_element_media_src` int(11) NULL, + `task_element_media_dst` int(11) NULL, + PRIMARY KEY (`task_element_media_id`), + KEY `task_element_media_src` (`task_element_media_src`), + KEY `task_element_media_dst` (`task_element_media_dst`) + )ENGINE=InnoDB DEFAULT CHARSET=utf8;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'task_element_media` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'task_element_media_ibfk_1` FOREIGN KEY (`task_element_media_src`) REFERENCES `' . $dbPool->get('core')->prefix . 'task_element` (`task_element_id`), + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'task_element_media_ibfk_2` FOREIGN KEY (`task_element_media_dst`) REFERENCES `' . $dbPool->get('core')->prefix . 'media` (`media_id`);' + )->execute(); + $dbPool->get('core')->con->commit(); break; } diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php new file mode 100644 index 0000000..1e24e36 --- /dev/null +++ b/Admin/Routes/Web/Api.php @@ -0,0 +1,18 @@ + [ + [ + 'dest' => '\Modules\Tasks\Controller:apiTaskCreate', + 'verb' => RouteVerb::SET, + ], + ], + '^.*/api/task/element.*$' => [ + [ + 'dest' => '\Modules\Tasks\Controller:apiTaskElementCreate', + 'verb' => RouteVerb::SET, + ], + ], +]; diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index bf85247..a407d12 100644 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -27,17 +27,4 @@ return [ 'verb' => RouteVerb::GET, ], ], - - '^.*/api/task$' => [ - [ - 'dest' => '\Modules\Tasks\Controller:apiTaskCreate', - 'verb' => RouteVerb::SET, - ], - ], - '^.*/api/task/element.*$' => [ - [ - 'dest' => '\Modules\Tasks\Controller:apiTaskElementCreate', - 'verb' => RouteVerb::SET, - ], - ], ]; diff --git a/Admin/Uninstall.php b/Admin/Uninstall.php index 1bc60b1..0404a07 100644 --- a/Admin/Uninstall.php +++ b/Admin/Uninstall.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -16,7 +16,7 @@ namespace Modules\Tasks\Admin; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\DataStorage\Database\Schema\Builder; use phpOMS\Module\InfoManager; use phpOMS\Module\UninstallAbstract; @@ -38,7 +38,7 @@ class Uninstall extends UninstallAbstract /** * {@inheritdoc} */ - public static function uninstall(Pool $dbPool, InfoManager $info) + public static function uninstall(DatabasePool $dbPool, InfoManager $info) { parent::uninstall($dbPool, $info); diff --git a/Admin/Update.php b/Admin/Update.php index 0007660..32818b2 100644 --- a/Admin/Update.php +++ b/Admin/Update.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -16,7 +16,7 @@ namespace Modules\Tasks\Admin; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\Module\InfoManager; use phpOMS\Module\UpdateAbstract; use phpOMS\System\File\Directory; @@ -38,7 +38,7 @@ class Update extends UpdateAbstract /** * {@inheritdoc} */ - public static function update(Pool $dbPool, InfoManager $info) + public static function update(DatabasePool $dbPool, InfoManager $info) { Directory::deletePath(__DIR__ . '/Update'); mkdir('Update'); diff --git a/Controller.php b/Controller.php index 6b67ae6..fe599d4 100644 --- a/Controller.php +++ b/Controller.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -15,9 +15,12 @@ */ namespace Modules\Tasks; +use Model\Message\FormValidation; use Model\Message\Redirect; +use Model\Message\Reload; use Modules\Tasks\Models\Task; use Modules\Tasks\Models\TaskElement; +use Modules\Tasks\Models\TaskElementMapper; use Modules\Tasks\Models\TaskMapper; use Modules\Tasks\Models\TaskStatus; use Modules\Tasks\Models\TaskType; @@ -48,7 +51,7 @@ class Controller extends ModuleAbstract implements WebInterface * @var string * @since 1.0.0 */ - const MODULE_PATH = __DIR__; + /* public */ const MODULE_PATH = __DIR__; /** * Module version. @@ -56,7 +59,7 @@ class Controller extends ModuleAbstract implements WebInterface * @var string * @since 1.0.0 */ - const MODULE_VERSION = '1.0.0'; + /* public */ const MODULE_VERSION = '1.0.0'; /** * Module name. @@ -64,7 +67,7 @@ class Controller extends ModuleAbstract implements WebInterface * @var string * @since 1.0.0 */ - const MODULE_NAME = 'Tasks'; + /* public */ const MODULE_NAME = 'Tasks'; /** * Providing. @@ -165,6 +168,21 @@ class Controller extends ModuleAbstract implements WebInterface return $view; } + private function validateTaskCreate(RequestAbstract $request) : array + { + $val = []; + if ( + ($val['title'] = empty($request->getData('title'))) + || ($val['description'] = empty($request->getData('description'))) + || ($val['due'] = !((bool)strtotime($request->getData('due')))) + || ($val['forward'] = !(is_numeric($request->getData('forward') ?? 0))) + ) { + return $val; + } + + return []; + } + /** * @param RequestAbstract $request Request * @param ResponseAbstract $response Response @@ -177,6 +195,12 @@ class Controller extends ModuleAbstract implements WebInterface */ public function apiTaskCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) { + if (!empty($val = $this->validateTaskCreate($request))) { + $response->set('task_create', new FormValidation($val)); + + return; + } + $task = new Task(); $task->setTitle($request->getData('title') ?? ''); $task->setDescription($request->getData('description') ?? ''); @@ -196,7 +220,53 @@ class Controller extends ModuleAbstract implements WebInterface $task->addElement($element); TaskMapper::create($task); - $response->set($request->__toString(), new Redirect(UriFactory::build('http://127.0.0.1/{/lang}/backend/task/single?id=' . $task->getId()))); + $response->set($request->__toString(), $task->jsonSerialize()); + } + + private function validateTaskElementCreate(RequestAbstract $request) : array + { + $val = []; + if ( + ($val['status'] = !TaskStatus::isValidValue((int) $request->getData('status'))) + || ($val['due'] = !((bool)strtotime($request->getData('due')))) + || ($val['task'] = !(is_numeric($request->getData('task')))) + || ($val['forward'] = !(is_numeric(empty($request->getData('forward')) ? $request->getAccount() : $request->getData('forward')))) + ) { // todo: validate correct task + return $val; + } + + return []; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return \Serializable + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function apiTaskElementCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) + { + if (!empty($val = $this->validateTaskElementCreate($request))) { + $response->set('task_element_create', new FormValidation($val)); + + return; + } + + $element = new TaskElement(); + $element->setForwarded($request->getData('forward') ?? $request->getAccount()); + $element->setCreatedAt(new \DateTime('now')); + $element->setCreatedBy($request->getAccount()); + $element->setDue(new \DateTime($request->getData('due') ?? 'now')); + $element->setStatus($request->getData('status')); + $element->setTask($request->getData('task')); + $element->setDescription($request->getData('description')); + + TaskElementMapper::create($element); + $response->set($request->__toString(), $element->jsonSerialize()); } } diff --git a/Models/NullTask.php b/Models/NullTask.php new file mode 100644 index 0000000..6af2107 --- /dev/null +++ b/Models/NullTask.php @@ -0,0 +1,34 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Tasks\Models; + + + +/** + * Task class. + * + * @category Modules + * @package Framework + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +class NullTask extends Task +{ + +} diff --git a/Models/NullTaskElement.php b/Models/NullTaskElement.php index 7bfd94d..81d52ba 100644 --- a/Models/NullTaskElement.php +++ b/Models/NullTaskElement.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Models/Task.php b/Models/Task.php index c2c41dc..c6537c5 100644 --- a/Models/Task.php +++ b/Models/Task.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -28,7 +28,7 @@ use phpOMS\Datatypes\Exception\InvalidEnumValue; * @link http://orange-management.com * @since 1.0.0 */ -class Task +class Task implements \JsonSerializable { /** @@ -119,6 +119,8 @@ class Task */ protected $schedule = null; + protected $media = []; + /** * Constructor. * @@ -195,6 +197,7 @@ class Task public function setCreatedBy(int $id) { $this->createdBy = $id; + $this->schedule->setCreatedBy($id); } /** @@ -288,7 +291,7 @@ class Task /** * @param int $status * - * @throws + * @throws InvalidEnumValue * * @since 1.0.0 * @author Dennis Eichhorn @@ -413,4 +416,31 @@ class Task return $this->schedule; } + private function toArray() : array + { + return [ + 'id' => $this->id, + 'createdBy' => $this->createdBy, + 'createdAt' => $this->createdAt, + 'title' => $this->title, + 'description' => $this->description, + 'status' => $this->status, + 'type' => $this->type, + 'type' => $this->type, + 'due' => $this->due->format('Y-m-d H:i:s'), + 'done' => (!isset($this->done) ? null : $this->done->format('Y-m-d H:i:s')), + ]; + } + + /** + * Specify data which should be serialized to JSON + * @link http://php.net/manual/en/jsonserializable.jsonserialize.php + * @return mixed data which can be serialized by json_encode, + * which is a value of any type other than a resource. + * @since 5.4.0 + */ + public function jsonSerialize() + { + return $this->toArray(); + } } diff --git a/Models/TaskElement.php b/Models/TaskElement.php index 1de661b..080c37e 100644 --- a/Models/TaskElement.php +++ b/Models/TaskElement.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -27,7 +27,7 @@ use phpOMS\Datatypes\Exception\InvalidEnumValue; * @link http://orange-management.com * @since 1.0.0 */ -class TaskElement +class TaskElement implements \JsonSerializable { /** @@ -94,6 +94,8 @@ class TaskElement */ private $forwarded = 0; + private $media = []; + /** * Constructor. * @@ -257,7 +259,7 @@ class TaskElement * * @return void * - * @throws + * @throws InvalidEnumValue * * @since 1.0.0 * @author Dennis Eichhorn @@ -294,4 +296,21 @@ class TaskElement { $this->task = $task; } + + public function toArray() : array { + return [ + 'id' => $this->id, + 'task' => $this->task, + 'createdBy' => $this->createdBy, + 'createdAt' => $this->createdAt, + 'description' => $this->description, + 'status' => $this->status, + 'forward' => $this->forwarded, + 'due' => isset($this->due) ? $this->due->format('Y-m-d H:i:s') : null, + ]; + } + + public function jsonSerialize() { + return $this->toArray(); + } } diff --git a/Models/TaskElementMapper.php b/Models/TaskElementMapper.php index 100b390..22ac3b9 100644 --- a/Models/TaskElementMapper.php +++ b/Models/TaskElementMapper.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -15,6 +15,7 @@ */ namespace Modules\Tasks\Models; +use Modules\Media\Models\MediaMapper; use phpOMS\DataStorage\Database\DataMapperAbstract; use phpOMS\DataStorage\Database\RelationType; @@ -35,7 +36,7 @@ class TaskElementMapper extends DataMapperAbstract /** * Columns. * - * @var array + * @var array * @since 1.0.0 */ protected static $columns = [ @@ -49,6 +50,21 @@ class TaskElementMapper extends DataMapperAbstract 'task_element_created_at' => ['name' => 'task_element_created_at', 'type' => 'DateTime', 'internal' => 'createdAt'], ]; + /** + * Has many relation. + * + * @var array + * @since 1.0.0 + */ + protected static $hasMany = [ + 'media' => [ + 'mapper' => MediaMapper::class, + 'table' => 'task_element_media', + 'dst' => 'task_element_media_dst', + 'src' => 'task_element_media_src', + ], + ]; + /** * Primary table. * diff --git a/Models/TaskMapper.php b/Models/TaskMapper.php index d33e5bf..d2e84b2 100644 --- a/Models/TaskMapper.php +++ b/Models/TaskMapper.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -16,6 +16,7 @@ namespace Modules\Tasks\Models; use Modules\Calendar\Models\ScheduleMapper; +use Modules\Media\Models\MediaMapper; use Modules\Tasks\Models\TaskElementMapper; use phpOMS\DataStorage\Database\DataMapperAbstract; use phpOMS\DataStorage\Database\Query\Builder; @@ -39,7 +40,7 @@ class TaskMapper extends DataMapperAbstract /** * Columns. * - * @var array + * @var array * @since 1.0.0 */ protected static $columns = [ @@ -58,26 +59,31 @@ class TaskMapper extends DataMapperAbstract /** * Has many relation. * - * @var array + * @var array * @since 1.0.0 */ protected static $hasMany = [ 'taskElements' => [ 'mapper' => TaskElementMapper::class, - 'relationmapper' => TaskElementMapper::class, 'table' => 'task_element', 'dst' => 'task_element_task', 'src' => null, ], + 'media' => [ // todo: maybe make this a has one and then link to collection instead of single media files! + 'mapper' => MediaMapper::class, + 'table' => 'task_media', + 'dst' => 'task_media_dst', + 'src' => 'task_media_src', + ], ]; /** * Has one relation. * - * @var array + * @var array * @since 1.0.0 */ - protected static $hasOne = [ + protected static $ownsOne = [ 'schedule' => [ 'mapper' => ScheduleMapper::class, 'src' => 'task_schedule', diff --git a/Models/TaskPriority.php b/Models/TaskPriority.php index 99ec8fe..d462548 100644 --- a/Models/TaskPriority.php +++ b/Models/TaskPriority.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -30,13 +30,13 @@ use phpOMS\Datatypes\Enum; */ abstract class TaskPriority extends Enum { - const VLOW = 1; + /* public */ const VLOW = 1; - const LOW = 2; + /* public */ const LOW = 2; - const MEDIUM = 3; + /* public */ const MEDIUM = 3; - const HIGH = 4; + /* public */ const HIGH = 4; - const VHIGH = 5; + /* public */ const VHIGH = 5; } diff --git a/Models/TaskStatus.php b/Models/TaskStatus.php index 1557f3d..4864fec 100644 --- a/Models/TaskStatus.php +++ b/Models/TaskStatus.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -30,15 +30,15 @@ use phpOMS\Datatypes\Enum; */ abstract class TaskStatus extends Enum { - const OPEN = 1; + /* public */ const OPEN = 1; - const WORKING = 2; + /* public */ const WORKING = 2; - const SUSPENDED = 3; + /* public */ const SUSPENDED = 3; - const CANCELED = 4; + /* public */ const CANCELED = 4; - const DONE = 5; + /* public */ const DONE = 5; - const CLOSED = 6; + /* public */ const CLOSED = 6; } diff --git a/Models/TaskTemplate.php b/Models/TaskTemplate.php index 99f36d1..59362c1 100644 --- a/Models/TaskTemplate.php +++ b/Models/TaskTemplate.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Models/TaskType.php b/Models/TaskType.php index b99bc8d..c6adc46 100644 --- a/Models/TaskType.php +++ b/Models/TaskType.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -30,7 +30,7 @@ use phpOMS\Datatypes\Enum; */ abstract class TaskType extends Enum { - const TEMPLATE = 1; - const SINGLE = 2; - const HIDDEN = 3; + /* public */ const TEMPLATE = 1; + /* public */ const SINGLE = 2; + /* public */ const HIDDEN = 3; } diff --git a/Models/TaskVisibility.php b/Models/TaskVisibility.php index a6d4aaa..8ad63ba 100644 --- a/Models/TaskVisibility.php +++ b/Models/TaskVisibility.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -30,7 +30,7 @@ use phpOMS\Datatypes\Enum; */ abstract class TaskVisibility extends Enum { - const TO = 1; - const CC = 2; - const BCC = 3; + /* public */ const TO = 1; + /* public */ const CC = 2; + /* public */ const BCC = 3; } diff --git a/Theme/Backend/Lang/Navigation.en.lang.php b/Theme/Backend/Lang/Navigation.en.lang.php index ec061af..1c2d179 100644 --- a/Theme/Backend/Lang/Navigation.en.lang.php +++ b/Theme/Backend/Lang/Navigation.en.lang.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index b85a199..8219d58 100644 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -28,6 +28,7 @@ return ['Tasks' => [ 'Forwarded' => 'Forwarded', 'From' => 'From', 'Group' => 'Group', + 'History' => 'History', 'Interval' => 'Interval', 'InTime' => 'In Time', 'Message' => 'Message', @@ -49,6 +50,7 @@ return ['Tasks' => [ 'Task' => 'Task', 'Tasks' => 'Tasks', 'Template' => 'Template', + 'Time' => 'Time', 'Title' => 'Title', 'To' => 'To', 'Today' => 'Today', diff --git a/Theme/Backend/dashboard-task.tpl.php b/Theme/Backend/dashboard-task.tpl.php index 87584b3..f01d870 100644 --- a/Theme/Backend/dashboard-task.tpl.php +++ b/Theme/Backend/dashboard-task.tpl.php @@ -1,3 +1,3 @@ -
+
Task
\ No newline at end of file diff --git a/Theme/Backend/task-create.tpl.php b/Theme/Backend/task-create.tpl.php index bba12a8..f8243dc 100644 --- a/Theme/Backend/task-create.tpl.php +++ b/Theme/Backend/task-create.tpl.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -22,19 +22,19 @@ echo $this->getData('nav')->render(); ?>

getText('Task'); ?>

-
+
-
+
-
+
-
+
-
+
diff --git a/Theme/Backend/task-dashboard.tpl.php b/Theme/Backend/task-dashboard.tpl.php index a3da8f3..dd97c19 100644 --- a/Theme/Backend/task-dashboard.tpl.php +++ b/Theme/Backend/task-dashboard.tpl.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Theme/backend/Lang/Navigation.en.lang.php b/Theme/backend/Lang/Navigation.en.lang.php index ec061af..1c2d179 100644 --- a/Theme/backend/Lang/Navigation.en.lang.php +++ b/Theme/backend/Lang/Navigation.en.lang.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Theme/backend/Lang/en.lang.php b/Theme/backend/Lang/en.lang.php index b85a199..8219d58 100644 --- a/Theme/backend/Lang/en.lang.php +++ b/Theme/backend/Lang/en.lang.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -28,6 +28,7 @@ return ['Tasks' => [ 'Forwarded' => 'Forwarded', 'From' => 'From', 'Group' => 'Group', + 'History' => 'History', 'Interval' => 'Interval', 'InTime' => 'In Time', 'Message' => 'Message', @@ -49,6 +50,7 @@ return ['Tasks' => [ 'Task' => 'Task', 'Tasks' => 'Tasks', 'Template' => 'Template', + 'Time' => 'Time', 'Title' => 'Title', 'To' => 'To', 'Today' => 'Today', diff --git a/Theme/backend/task-analysis.tpl.php b/Theme/backend/task-analysis.tpl.php index c385b9a..2be487e 100644 --- a/Theme/backend/task-analysis.tpl.php +++ b/Theme/backend/task-analysis.tpl.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -48,3 +48,11 @@ echo $this->getData('nav')->render(); ?>
+ +
+ +
+

getText('History'); ?>

+
+
+
diff --git a/Theme/backend/task-single.tpl.php b/Theme/backend/task-single.tpl.php index da2938b..4486c3c 100644 --- a/Theme/backend/task-single.tpl.php +++ b/Theme/backend/task-single.tpl.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -71,19 +71,23 @@ foreach ($elements as $key => $element) : $c++;
-
+
-
+
-
-
-
+
+
-
-
+
+
diff --git a/info.json b/info.json index 8ad6dee..63d9639 100644 --- a/info.json +++ b/info.json @@ -17,7 +17,8 @@ "directory": "Tasks", "dependencies": { "Admin" : "1.0.0", - "Calendar" : "1.0.0" + "Calendar" : "1.0.0", + "Media" : "1.0.0" }, "providing": { "Navigation": "*"