Cleanup and implement raw text

This commit is contained in:
Dennis Eichhorn 2017-12-30 11:47:14 +01:00
parent ff23a66f93
commit 88a735dc6c
6 changed files with 13 additions and 5 deletions

View File

@ -87,6 +87,7 @@ class Installer extends InstallerAbstract
ADD CONSTRAINT `' . $dbPool->get()->prefix . 'task_media_ibfk_2` FOREIGN KEY (`task_media_dst`) REFERENCES `' . $dbPool->get()->prefix . 'media` (`media_id`);'
)->execute();
// type = to, cc, bcc
$dbPool->get()->con->prepare(
'CREATE TABLE if NOT EXISTS `' . $dbPool->get()->prefix . 'task_account` (
`task_account_id` int(11) NOT NULL AUTO_INCREMENT,

View File

@ -138,6 +138,8 @@ class Task implements \JsonSerializable
protected $media = [];
protected $acc = [];
/**
* Constructor.
*

View File

@ -77,6 +77,12 @@ class TaskMapper extends DataMapperAbstract
'dst' => 'task_media_src',
'src' => 'task_media_dst',
],
'acc' => [ // todo: maybe make this a has one and then link to collection instead of single media files!
'mapper' => AccountMapper::class,
'table' => 'task_account',
'dst' => 'task_account_account',
'src' => 'task_account_task',
],
];
protected static $belongsTo = [

View File

@ -27,13 +27,10 @@ use phpOMS\Stdlib\Base\Enum;
*/
abstract class TaskPriority extends Enum
{
/* public */ const NONE = 0;
/* public */ const VLOW = 1;
/* public */ const LOW = 2;
/* public */ const MEDIUM = 3;
/* public */ const HIGH = 4;
/* public */ const VHIGH = 5;
}

View File

@ -63,6 +63,7 @@ return ['Tasks' => [
'S4' => 'Canceled',
'S5' => 'Done',
'S6' => 'Closed',
'P0' => 'None',
'P1' => 'Very Low',
'P2' => 'Low',
'P3' => 'Medium',

View File

@ -31,9 +31,10 @@ echo $this->getData('nav')->render(); ?>
<tr><td><?= $this->getData('accGrpSelector')->render('iCC', false); ?>
<tr><td><label for="iPriority"><?= $this->getHtml('Priority') ?></label>
<tr><td><select id="iPriority" name="priority">
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskPriority::NONE); ?>" selected><?= $this->getHtml('P0') ?>
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskPriority::VLOW); ?>"><?= $this->getHtml('P1') ?>
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskPriority::LOW); ?>"><?= $this->getHtml('P2') ?>
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskPriority::MEDIUM); ?>" selected><?= $this->getHtml('P3') ?>
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskPriority::MEDIUM); ?>"><?= $this->getHtml('P3') ?>
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskPriority::HIGH); ?>"><?= $this->getHtml('P4') ?>
<option value="<?= $this->printHtml(\Modules\Tasks\Models\TaskPriority::VHIGH); ?>"><?= $this->getHtml('P5') ?>
</select>