mirror of
https://github.com/Karaka-Management/oms-Tasks.git
synced 2026-01-11 15:38:40 +00:00
autofixes
This commit is contained in:
parent
14e61481ba
commit
8b1a2a17e6
|
|
@ -27,5 +27,6 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
abstract class DutyType extends Enum
|
||||
{
|
||||
public const TO = 1;
|
||||
|
||||
public const CC = 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
abstract class PermissionState extends Enum
|
||||
{
|
||||
public const TASK = 1;
|
||||
|
||||
public const ELEMENT = 2;
|
||||
|
||||
public const ANALYSIS = 3;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,9 +27,14 @@ 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,8 +27,12 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
abstract class TaskStatus extends Enum
|
||||
{
|
||||
public const OPEN = 1;
|
||||
|
||||
public const WORKING = 2;
|
||||
|
||||
public const SUSPENDED = 3;
|
||||
|
||||
public const CANCELED = 4;
|
||||
|
||||
public const DONE = 5;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
abstract class TaskType extends Enum
|
||||
{
|
||||
public const TEMPLATE = 1;
|
||||
|
||||
public const SINGLE = 2;
|
||||
|
||||
public const HIDDEN = 3;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
abstract class TaskVisibility extends Enum
|
||||
{
|
||||
public const TO = 1;
|
||||
|
||||
public const CC = 2;
|
||||
|
||||
public const BCC = 3;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ use Modules\Tasks\Models\TaskStatus;
|
|||
?>
|
||||
<table class="default">
|
||||
<thead>
|
||||
<td><?= $this->getHtml('Status', 'Tasks') ?>
|
||||
<td><?= $this->getHtml('Due/Priority', 'Tasks') ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Title', 'Tasks') ?>
|
||||
<td><?= $this->getHtml('Status', 'Tasks'); ?>
|
||||
<td><?= $this->getHtml('Due/Priority', 'Tasks'); ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Title', 'Tasks'); ?>
|
||||
<tfoot>
|
||||
<tbody>
|
||||
<?php $c = 0; foreach ($this->tasks as $key => $task) : ++$c;
|
||||
|
|
@ -19,7 +19,7 @@ use Modules\Tasks\Models\TaskStatus;
|
|||
elseif ($task->getStatus() === TaskStatus::CANCELED) { $color = 'red'; }
|
||||
elseif ($task->getStatus() === TaskStatus::SUSPENDED) { $color = 'yellow'; } ?>
|
||||
<tr data-href="<?= $url; ?>">
|
||||
<td><a href="<?= $url; ?>"><span class="tag <?= $this->printHtml($color); ?>"><?= $this->getHtml('S' . $task->getStatus(), 'Tasks') ?></span></a>
|
||||
<td><a href="<?= $url; ?>"><span class="tag <?= $this->printHtml($color); ?>"><?= $this->getHtml('S' . $task->getStatus(), 'Tasks'); ?></span></a>
|
||||
<td><a href="<?= $url; ?>">
|
||||
<?php if ($task->getPriority() === TaskPriority::NONE) : ?>
|
||||
<?= $this->printHtml($task->getDue()->format('Y-m-d H:i')); ?>
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@
|
|||
</div>
|
||||
<div id="<?= $this->printHtml($this->getId()); ?>-dropdown" class="dropdown" data-active="true" data-selected="<?= $task->getStatus(); ?>">
|
||||
<template class="rowTemplate"><!-- Template for remote data or data manually to be added --></template>
|
||||
<tr><td data-value="<?= TaskStatus::OPEN; ?>"><?= $this->getHtml('S1') ?>
|
||||
<tr><td data-value="<?= TaskStatus::WORKING; ?>"><?= $this->getHtml('S2') ?>
|
||||
<tr><td data-value="<?= TaskStatus::SUSPENDED; ?>"><?= $this->getHtml('S3') ?>
|
||||
<tr><td data-value="<?= TaskStatus::CANCELED; ?>"><?= $this->getHtml('S4') ?>
|
||||
<tr><td data-value="<?= TaskStatus::DONE; ?>"><?= $this->getHtml('S5') ?>
|
||||
<tr><td data-value="<?= TaskStatus::OPEN; ?>"><?= $this->getHtml('S1'); ?>
|
||||
<tr><td data-value="<?= TaskStatus::WORKING; ?>"><?= $this->getHtml('S2'); ?>
|
||||
<tr><td data-value="<?= TaskStatus::SUSPENDED; ?>"><?= $this->getHtml('S3'); ?>
|
||||
<tr><td data-value="<?= TaskStatus::CANCELED; ?>"><?= $this->getHtml('S4'); ?>
|
||||
<tr><td data-value="<?= TaskStatus::DONE; ?>"><?= $this->getHtml('S5'); ?>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ declare(strict_types=1);
|
|||
?>
|
||||
<div id="task-dashboard" class="col-xs-12 col-md-6" draggable="true">
|
||||
<div class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Tasks', 'Tasks') ?></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('Tasks', 'Tasks'); ?></div>
|
||||
<?= $this->getData('tasklist')->render($this->getData('tasks')); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -18,15 +18,15 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Account') ?></h1></header>
|
||||
<header><h1><?= $this->getHtml('Account'); ?></h1></header>
|
||||
<div class="inner">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iAccount"><?= $this->getHtml('Account') ?></label>
|
||||
<tr><td><label for="iAccount"><?= $this->getHtml('Account'); ?></label>
|
||||
<tr><td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="number" min="1" id="iAccount" name="account" placeholder=" Guest" required></span>
|
||||
<tr><td><label for="iFrom"><?= $this->getHtml('From') ?></label>
|
||||
<tr><td><label for="iFrom"><?= $this->getHtml('From'); ?></label>
|
||||
<tr><td><input type="datetime-local" id="iFrom" name="from" value="<?= $this->printHtml((new \DateTime('NOW'))->format('Y-m-d\TH:i:s')); ?>">
|
||||
<tr><td><label for="iTo"><?= $this->getHtml('To') ?></label>
|
||||
<tr><td><label for="iTo"><?= $this->getHtml('To'); ?></label>
|
||||
<tr><td><input type="datetime-local" id="iTo" name="to" value="<?= $this->printHtml((new \DateTime('NOW'))->format('Y-m-d\TH:i:s')); ?>">
|
||||
<tr><td><input type="submit" value="<?= $this->getHtml('Submit', '0', '0'); ?>">
|
||||
</table>
|
||||
|
|
@ -37,15 +37,15 @@ echo $this->getData('nav')->render(); ?>
|
|||
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Statistics') ?></h1></header>
|
||||
<header><h1><?= $this->getHtml('Statistics'); ?></h1></header>
|
||||
<div class="inner">
|
||||
<table class="list wf-100">
|
||||
<tr><td><?= $this->getHtml('Received') ?><td>0
|
||||
<tr><td><?= $this->getHtml('Created') ?><td>0
|
||||
<tr><td><?= $this->getHtml('Forwarded') ?><td>0
|
||||
<tr><td><?= $this->getHtml('AverageAmount') ?><td>0
|
||||
<tr><td><?= $this->getHtml('AverageProcessTime') ?><td>0
|
||||
<tr><td><?= $this->getHtml('InTime') ?><td>0
|
||||
<tr><td><?= $this->getHtml('Received'); ?><td>0
|
||||
<tr><td><?= $this->getHtml('Created'); ?><td>0
|
||||
<tr><td><?= $this->getHtml('Forwarded'); ?><td>0
|
||||
<tr><td><?= $this->getHtml('AverageAmount'); ?><td>0
|
||||
<tr><td><?= $this->getHtml('AverageProcessTime'); ?><td>0
|
||||
<tr><td><?= $this->getHtml('InTime'); ?><td>0
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -55,7 +55,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('History') ?></h1></header>
|
||||
<header><h1><?= $this->getHtml('History'); ?></h1></header>
|
||||
<div class="inner" style="height: 300px">
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -22,29 +22,29 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="col-xs-12 col-md-6">
|
||||
<div class="portlet">
|
||||
<form id="fTask" method="PUT" action="<?= \phpOMS\Uri\UriFactory::build('{/api}task?{?}&csrf={$CSRF}'); ?>">
|
||||
<div class="portlet-head"><?= $this->getHtml('Task') ?></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('Task'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<table class="layout wf-100" style="table-layout: fixed">
|
||||
<tbody>
|
||||
<tr><td><label for="iReceiver"><?= $this->getHtml('To') ?></label>
|
||||
<tr><td><label for="iReceiver"><?= $this->getHtml('To'); ?></label>
|
||||
<tr><td><?= $this->getData('accGrpSelector')->render('iReceiver', 'forward', true); ?>
|
||||
<tr><td><label for="iObserver"><?= $this->getHtml('CC') ?></label>
|
||||
<tr><td><label for="iObserver"><?= $this->getHtml('CC'); ?></label>
|
||||
<tr><td><?= $this->getData('accGrpSelector')->render('iCC', 'cc', false); ?>
|
||||
<tr><td><label for="iPriority"><?= $this->getHtml('Priority') ?></label>
|
||||
<tr><td><label for="iPriority"><?= $this->getHtml('Priority'); ?></label>
|
||||
<tr><td>
|
||||
<select id="iPriority" name="priority">
|
||||
<option value="<?= TaskPriority::NONE; ?>" selected><?= $this->getHtml('P0') ?>
|
||||
<option value="<?= TaskPriority::VLOW; ?>"><?= $this->getHtml('P1') ?>
|
||||
<option value="<?= TaskPriority::LOW; ?>"><?= $this->getHtml('P2') ?>
|
||||
<option value="<?= TaskPriority::MEDIUM; ?>"><?= $this->getHtml('P3') ?>
|
||||
<option value="<?= TaskPriority::HIGH; ?>"><?= $this->getHtml('P4') ?>
|
||||
<option value="<?= TaskPriority::VHIGH; ?>"><?= $this->getHtml('P5') ?>
|
||||
<option value="<?= TaskPriority::NONE; ?>" selected><?= $this->getHtml('P0'); ?>
|
||||
<option value="<?= TaskPriority::VLOW; ?>"><?= $this->getHtml('P1'); ?>
|
||||
<option value="<?= TaskPriority::LOW; ?>"><?= $this->getHtml('P2'); ?>
|
||||
<option value="<?= TaskPriority::MEDIUM; ?>"><?= $this->getHtml('P3'); ?>
|
||||
<option value="<?= TaskPriority::HIGH; ?>"><?= $this->getHtml('P4'); ?>
|
||||
<option value="<?= TaskPriority::VHIGH; ?>"><?= $this->getHtml('P5'); ?>
|
||||
</select>
|
||||
<tr><td><label for="iDue"><?= $this->getHtml('Due') ?></label>
|
||||
<tr><td><label for="iDue"><?= $this->getHtml('Due'); ?></label>
|
||||
<tr><td><input type="datetime-local" id="iDue" name="due" value="<?= $this->printHtml((new \DateTime('NOW'))->format('Y-m-d\TH:i:s')); ?>">
|
||||
<tr><td><label for="iTitle"><?= $this->getHtml('Title') ?></label>
|
||||
<tr><td><input type="text" id="iTitle" name="title" placeholder=" <?= $this->getHtml('Title') ?>" required>
|
||||
<tr><td><label for="iMessage"><?= $this->getHtml('Message') ?></label>
|
||||
<tr><td><label for="iTitle"><?= $this->getHtml('Title'); ?></label>
|
||||
<tr><td><input type="text" id="iTitle" name="title" placeholder=" <?= $this->getHtml('Title'); ?>" required>
|
||||
<tr><td><label for="iMessage"><?= $this->getHtml('Message'); ?></label>
|
||||
<tr><td><?= $this->getData('editor')->render('task-editor'); ?>
|
||||
<tr><td><?= $this->getData('editor')->getData('text')->render('task-editor', 'plain', 'fTask'); ?>
|
||||
</table>
|
||||
|
|
@ -59,18 +59,18 @@ echo $this->getData('nav')->render(); ?>
|
|||
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Media') ?></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('Media'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
<tbody>
|
||||
<tr><td><label for="iMedia"><?= $this->getHtml('Media') ?></label>
|
||||
<tr><td><label for="iMedia"><?= $this->getHtml('Media'); ?></label>
|
||||
<tr><td>
|
||||
<div class="ipt-wrap">
|
||||
<div class="ipt-first"><input type="text" id="iMedia" name="mediaFile" placeholder=" File"></div>
|
||||
<div class="ipt-second"><button><?= $this->getHtml('Select') ?></button></div>
|
||||
<div class="ipt-second"><button><?= $this->getHtml('Select'); ?></button></div>
|
||||
</div>
|
||||
<tr><td><label for="iUpload"><?= $this->getHtml('Upload') ?></label>
|
||||
<tr><td><label for="iUpload"><?= $this->getHtml('Upload'); ?></label>
|
||||
<tr><td>
|
||||
<input type="file" id="iUpload" name="upload" form="fTask" multiple>
|
||||
<input form="fTask" type="hidden" name="type"><td>
|
||||
|
|
|
|||
|
|
@ -35,14 +35,14 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Tasks') ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('Tasks'); ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||
<table id="taskList" class="default">
|
||||
<thead>
|
||||
<td><?= $this->getHtml('Status') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Due/Priority') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td class="wf-100"><?= $this->getHtml('Title') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Creator') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Created') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Status'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Due/Priority'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td class="wf-100"><?= $this->getHtml('Title'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Creator'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Created'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
|
|
@ -50,13 +50,13 @@ echo $this->getData('nav')->render(); ?>
|
|||
$url = UriFactory::build('{/prefix}task/single?{?}&id=' . $task->getId());
|
||||
?>
|
||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td data-label="<?= $this->getHtml('Status') ?>">
|
||||
<td data-label="<?= $this->getHtml('Status'); ?>">
|
||||
<a href="<?= $url; ?>">
|
||||
<span class="tag <?= $this->printHtml('task-status-' . $task->getStatus()); ?>">
|
||||
<?= $this->getHtml('S' . $task->getStatus()) ?>
|
||||
<?= $this->getHtml('S' . $task->getStatus()); ?>
|
||||
</span>
|
||||
</a>
|
||||
<td data-label="<?= $this->getHtml('Due/Priority') ?>">
|
||||
<td data-label="<?= $this->getHtml('Due/Priority'); ?>">
|
||||
<a href="<?= $url; ?>">
|
||||
<?php if ($task->getPriority() === TaskPriority::NONE) : ?>
|
||||
<?= $this->printHtml($task->getDue()->format('Y-m-d H:i')); ?>
|
||||
|
|
@ -64,11 +64,11 @@ echo $this->getData('nav')->render(); ?>
|
|||
<?= $this->getHtml('P' . $task->getPriority()); ?>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<td data-label="<?= $this->getHtml('Title') ?>">
|
||||
<td data-label="<?= $this->getHtml('Title'); ?>">
|
||||
<a href="<?= $url; ?>"><?= $this->printHtml($task->getTitle()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Creator') ?>">
|
||||
<td data-label="<?= $this->getHtml('Creator'); ?>">
|
||||
<a href="<?= $url; ?>"><?= $this->printHtml($task->getCreatedBy()->getName1()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Created') ?>">
|
||||
<td data-label="<?= $this->getHtml('Created'); ?>">
|
||||
<a href="<?= $url; ?>"><?= $this->printHtml($task->getCreatedAt()->format('Y-m-d H:i')); ?></a>
|
||||
<?php endforeach; if ($c == 0) : ?>
|
||||
<tr><td colspan="6" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
</span>
|
||||
<span class="col-xs end-xs plain-grid">
|
||||
<span id="task-status-badge" class="nobreak tag task-status-<?= $this->printHtml($task->getStatus()); ?>">
|
||||
<?= $this->getHtml('S' . $task->getStatus()) ?>
|
||||
<?= $this->getHtml('S' . $task->getStatus()); ?>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -92,18 +92,18 @@ echo $this->getData('nav')->render(); ?>
|
|||
|
||||
<div>
|
||||
<?php if ($task->getPriority() === TaskPriority::NONE) : ?>
|
||||
<?= $this->getHtml('Due') ?>: <?= $this->printHtml($task->getDue()->format('Y/m/d H:i')); ?>
|
||||
<?= $this->getHtml('Due'); ?>: <?= $this->printHtml($task->getDue()->format('Y/m/d H:i')); ?>
|
||||
<?php else : ?>
|
||||
<?= $this->getHtml('Priority') ?>: <?= $this->getHtml('P' . $task->getPriority()) ?>
|
||||
<?= $this->getHtml('Priority'); ?>: <?= $this->getHtml('P' . $task->getPriority()); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-0 end-xs plain-grid">
|
||||
<?php if ($task->isEditable() && $this->request->getHeader()->getAccount() === $task->getCreatedBy()->getId()) : ?>
|
||||
<div class="col-xs end-xs plain-grid">
|
||||
<button class="save hidden"><?= $this->getHtml('Save', '0', '0') ?></button>
|
||||
<button class="cancel hidden"><?= $this->getHtml('Cancel', '0', '0') ?></button>
|
||||
<button class="update"><?= $this->getHtml('Edit', '0', '0') ?></button>
|
||||
<button class="save hidden"><?= $this->getHtml('Save', '0', '0'); ?></button>
|
||||
<button class="cancel hidden"><?= $this->getHtml('Cancel', '0', '0'); ?></button>
|
||||
<button class="update"><?= $this->getHtml('Edit', '0', '0'); ?></button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
@ -143,9 +143,9 @@ echo $this->getData('nav')->render(); ?>
|
|||
|
||||
<div class="col-xs end-xs plain-grid">
|
||||
<input type="hidden" value="" name="id">
|
||||
<button class="save hidden"><?= $this->getHtml('Save', '0', '0') ?></button>
|
||||
<button class="cancel hidden"><?= $this->getHtml('Cancel', '0', '0') ?></button>
|
||||
<button class="update"><?= $this->getHtml('Edit', '0', '0') ?></button>
|
||||
<button class="save hidden"><?= $this->getHtml('Save', '0', '0'); ?></button>
|
||||
<button class="cancel hidden"><?= $this->getHtml('Cancel', '0', '0'); ?></button>
|
||||
<button class="update"><?= $this->getHtml('Edit', '0', '0'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -177,7 +177,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
$element->getCreatedAt()->format('Y-m-d H:i')
|
||||
)); ?>
|
||||
<span class="tag task-status-<?= $this->printHtml($element->getStatus()); ?>">
|
||||
<?= $this->getHtml('S' . $element->getStatus()) ?>
|
||||
<?= $this->getHtml('S' . $element->getStatus()); ?>
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -193,7 +193,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
$element->getCreatedAt()->format('Y-m-d H:i')
|
||||
)); ?>
|
||||
<span class="tag task-priority-<?= $this->printHtml($element->getPriority()); ?>">
|
||||
<?= $this->getHtml('P' . $element->getPriority()) ?>
|
||||
<?= $this->getHtml('P' . $element->getPriority()); ?>
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -256,9 +256,9 @@ echo $this->getData('nav')->render(); ?>
|
|||
&& $previous->getDue()->format('Y/m/d H:i') !== $element->getDue()->format('Y/m/d H:i')
|
||||
)
|
||||
) : ?>
|
||||
<?= $this->getHtml('Due') ?>: <?= $this->printHtml($element->getDue()->format('Y/m/d H:i')); ?>
|
||||
<?= $this->getHtml('Due'); ?>: <?= $this->printHtml($element->getDue()->format('Y/m/d H:i')); ?>
|
||||
<?php elseif ($previous !== null && $previous->getPriority() !== $element->getPriority()) : ?>
|
||||
<?= $this->getHtml('Priority') ?>: <?= $this->getHtml('P' . $element->getPriority()) ?>
|
||||
<?= $this->getHtml('Priority'); ?>: <?= $this->getHtml('P' . $element->getPriority()); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
|
@ -268,9 +268,9 @@ echo $this->getData('nav')->render(); ?>
|
|||
) : ?>
|
||||
<div class="col-xs end-xs plain-grid">
|
||||
<input type="hidden" value="<?= $element->getId(); ?>" name="id">
|
||||
<button class="save hidden"><?= $this->getHtml('Save', '0', '0') ?></button>
|
||||
<button class="cancel hidden"><?= $this->getHtml('Cancel', '0', '0') ?></button>
|
||||
<button class="update"><?= $this->getHtml('Edit', '0', '0') ?></button>
|
||||
<button class="save hidden"><?= $this->getHtml('Save', '0', '0'); ?></button>
|
||||
<button class="cancel hidden"><?= $this->getHtml('Cancel', '0', '0'); ?></button>
|
||||
<button class="update"><?= $this->getHtml('Edit', '0', '0'); ?></button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
@ -285,10 +285,10 @@ echo $this->getData('nav')->render(); ?>
|
|||
) : ?>
|
||||
<section class="box wf-100">
|
||||
<div class="inner">
|
||||
<?= $this->printHtml($element->getCreatedBy()->getName1()); ?> <?= $this->getHtml('forwarded_to') ?>
|
||||
<?= $this->printHtml($element->getCreatedBy()->getName1()); ?> <?= $this->getHtml('forwarded_to'); ?>
|
||||
<?php foreach ($tos as $to) : ?>
|
||||
<?php if ($to instanceof AccountRelation) : ?>
|
||||
<a href="<?= phpOMS\Uri\UriFactory::build('{/prefix}profile/single?{?}&for=' . $to->getRelation()->getId()) ?>"><?= $this->printHtml($to->getRelation()->getName1()); ?></a>
|
||||
<a href="<?= phpOMS\Uri\UriFactory::build('{/prefix}profile/single?{?}&for=' . $to->getRelation()->getId()); ?>"><?= $this->printHtml($to->getRelation()->getName1()); ?></a>
|
||||
<?php elseif ($to instanceof GroupRelation) : ?>
|
||||
<?= $this->printHtml($to->getRelation()->getName()); ?>
|
||||
<?php endif; ?>
|
||||
|
|
@ -309,7 +309,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
data-add-element=".taskElement-content"
|
||||
data-add-tpl="#elementTpl"
|
||||
>
|
||||
<div class="portlet-head"><?= $this->getHtml('Message') ?></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('Message'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<table class="layout wf-100" style="table-layout: fixed">
|
||||
<tr><td><?= $this->getData('editor')->render('task-editor'); ?>
|
||||
|
|
@ -320,36 +320,36 @@ echo $this->getData('nav')->render(); ?>
|
|||
'', '',
|
||||
'/content', '{/api}task?id={?id}'
|
||||
); ?>
|
||||
<tr><td><label for="iPriority"><?= $this->getHtml('Priority') ?></label>
|
||||
<tr><td><label for="iPriority"><?= $this->getHtml('Priority'); ?></label>
|
||||
<tr><td>
|
||||
<select id="iPriority" name="priority">
|
||||
<option value="<?= TaskPriority::NONE; ?>"<?= $task->getPriority() === TaskPriority::NONE ? ' selected' : ''?>><?= $this->getHtml('P0') ?>
|
||||
<option value="<?= TaskPriority::VLOW; ?>"<?= $task->getPriority() === TaskPriority::VLOW ? ' selected' : ''?>><?= $this->getHtml('P1') ?>
|
||||
<option value="<?= TaskPriority::LOW; ?>"<?= $task->getPriority() === TaskPriority::LOW ? ' selected' : ''?>><?= $this->getHtml('P2') ?>
|
||||
<option value="<?= TaskPriority::MEDIUM; ?>"<?= $task->getPriority() === TaskPriority::MEDIUM ? ' selected' : ''?>><?= $this->getHtml('P3') ?>
|
||||
<option value="<?= TaskPriority::HIGH; ?>"<?= $task->getPriority() === TaskPriority::HIGH ? ' selected' : ''?>><?= $this->getHtml('P4') ?>
|
||||
<option value="<?= TaskPriority::VHIGH; ?>"<?= $task->getPriority() === TaskPriority::VHIGH ? ' selected' : ''?>><?= $this->getHtml('P5') ?>
|
||||
<option value="<?= TaskPriority::NONE; ?>"<?= $task->getPriority() === TaskPriority::NONE ? ' selected' : '';?>><?= $this->getHtml('P0'); ?>
|
||||
<option value="<?= TaskPriority::VLOW; ?>"<?= $task->getPriority() === TaskPriority::VLOW ? ' selected' : '';?>><?= $this->getHtml('P1'); ?>
|
||||
<option value="<?= TaskPriority::LOW; ?>"<?= $task->getPriority() === TaskPriority::LOW ? ' selected' : '';?>><?= $this->getHtml('P2'); ?>
|
||||
<option value="<?= TaskPriority::MEDIUM; ?>"<?= $task->getPriority() === TaskPriority::MEDIUM ? ' selected' : '';?>><?= $this->getHtml('P3'); ?>
|
||||
<option value="<?= TaskPriority::HIGH; ?>"<?= $task->getPriority() === TaskPriority::HIGH ? ' selected' : '';?>><?= $this->getHtml('P4'); ?>
|
||||
<option value="<?= TaskPriority::VHIGH; ?>"<?= $task->getPriority() === TaskPriority::VHIGH ? ' selected' : '';?>><?= $this->getHtml('P5'); ?>
|
||||
</select>
|
||||
<tr><td><label for="iDue"><?= $this->getHtml('Due') ?></label>
|
||||
<tr><td><label for="iDue"><?= $this->getHtml('Due'); ?></label>
|
||||
<tr><td><input type="datetime-local" id="iDue" name="due" value="<?= $this->printHtml(
|
||||
!empty($elements) ? \end($elements)->getDue()->format('Y-m-d\TH:i:s') : $task->getDue()->format('Y-m-d\TH:i:s')
|
||||
); ?>">
|
||||
<tr><td><label for="iStatus"><?= $this->getHtml('Status') ?></label>
|
||||
<tr><td><label for="iStatus"><?= $this->getHtml('Status'); ?></label>
|
||||
<tr><td><select id="iStatus" name="status">
|
||||
<option value="<?= TaskStatus::OPEN; ?>"<?= $task->getStatus() === TaskStatus::OPEN ? ' selected' : ''?>><?= $this->getHtml('S1') ?>
|
||||
<option value="<?= TaskStatus::WORKING; ?>"<?= $task->getStatus() === TaskStatus::WORKING ? ' selected' : ''?>><?= $this->getHtml('S2') ?>
|
||||
<option value="<?= TaskStatus::SUSPENDED; ?>"<?= $task->getStatus() === TaskStatus::SUSPENDED ? ' selected' : ''?>><?= $this->getHtml('S3') ?>
|
||||
<option value="<?= TaskStatus::CANCELED; ?>"<?= $task->getStatus() === TaskStatus::CANCELED ? ' selected' : ''?>><?= $this->getHtml('S4') ?>
|
||||
<option value="<?= TaskStatus::DONE; ?>"<?= $task->getStatus() === TaskStatus::DONE ? ' selected' : ''?>><?= $this->getHtml('S5') ?>
|
||||
<option value="<?= TaskStatus::OPEN; ?>"<?= $task->getStatus() === TaskStatus::OPEN ? ' selected' : '';?>><?= $this->getHtml('S1'); ?>
|
||||
<option value="<?= TaskStatus::WORKING; ?>"<?= $task->getStatus() === TaskStatus::WORKING ? ' selected' : '';?>><?= $this->getHtml('S2'); ?>
|
||||
<option value="<?= TaskStatus::SUSPENDED; ?>"<?= $task->getStatus() === TaskStatus::SUSPENDED ? ' selected' : '';?>><?= $this->getHtml('S3'); ?>
|
||||
<option value="<?= TaskStatus::CANCELED; ?>"<?= $task->getStatus() === TaskStatus::CANCELED ? ' selected' : '';?>><?= $this->getHtml('S4'); ?>
|
||||
<option value="<?= TaskStatus::DONE; ?>"<?= $task->getStatus() === TaskStatus::DONE ? ' selected' : '';?>><?= $this->getHtml('S5'); ?>
|
||||
</select>
|
||||
<tr><td><label for="iReceiver"><?= $this->getHtml('To') ?></label>
|
||||
<tr><td><label for="iReceiver"><?= $this->getHtml('To'); ?></label>
|
||||
<tr><td><?= $this->getData('accGrpSelector')->render('iReceiver', 'to', true); ?>
|
||||
<tr><td><label for="iMedia"><?= $this->getHtml('Media') ?></label>
|
||||
<tr><td><label for="iMedia"><?= $this->getHtml('Media'); ?></label>
|
||||
<tr><td><div class="ipt-wrap">
|
||||
<div class="ipt-first"><input type="text" id="iMedia" placeholder=" File"></div>
|
||||
<div class="ipt-second"><button><?= $this->getHtml('Select') ?></button></div>
|
||||
<div class="ipt-second"><button><?= $this->getHtml('Select'); ?></button></div>
|
||||
</div>
|
||||
<tr><td><label for="iUpload"><?= $this->getHtml('Upload') ?></label>
|
||||
<tr><td><label for="iUpload"><?= $this->getHtml('Upload'); ?></label>
|
||||
<tr><td>
|
||||
<input type="file" id="iUpload" name="fileUpload" form="fTask">
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ namespace Modules\Tasks\tests\Admin;
|
|||
class AdminTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
protected const MODULE_NAME = 'Tasks';
|
||||
|
||||
protected const URI_LOAD = 'http://127.0.0.1/en/backend/task';
|
||||
|
||||
use \Modules\tests\ModuleTestTrait;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ use phpOMS\Utils\TestUtils;
|
|||
class BackendControllerTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
protected $app = null;
|
||||
|
||||
protected $module = null;
|
||||
|
||||
protected function setUp() : void
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ use phpOMS\Utils\TestUtils;
|
|||
class ControllerTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
protected $app = null;
|
||||
|
||||
protected $module = null;
|
||||
|
||||
protected function setUp() : void
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user