add/change docs

This commit is contained in:
Dennis Eichhorn 2021-08-29 10:55:43 +02:00
parent dab378debe
commit 34ca097f55
4 changed files with 27 additions and 4 deletions

View File

@ -1,6 +1,20 @@
<?php declare(strict_types=1);
<?php
/**
* Orange Management
*
* PHP Version 8.0
*
* @package Modules\Tasks
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
use Modules\Tasks\Models\TaskPriority;
use Modules\Tasks\Models\TaskStatus;
use phpOMS\Uri\UriFactory;
?>
<table class="default">
@ -10,8 +24,11 @@ use Modules\Tasks\Models\TaskStatus;
<td class="wf-100"><?= $this->getHtml('Title', 'Tasks'); ?>
<tfoot>
<tbody>
<?php $c = 0; foreach ($this->tasks as $key => $task) : ++$c;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}task/single?{?}&id=' . $task->getId());
<?php
$c = 0;
foreach ($this->tasks as $key => $task) : ++$c;
$url = UriFactory::build(!empty($task->redirect) ? $task->redirect : ('{/prefix}task/single?{?}&id=' . $task->getId()));
$color = 'darkred';
if ($task->getStatus() === TaskStatus::DONE) { $color = 'green'; }
elseif ($task->getStatus() === TaskStatus::OPEN) { $color = 'darkblue'; }

View File

@ -48,7 +48,7 @@ echo $this->getData('nav')->render(); ?>
<tbody>
<?php
$c = 0; foreach ($tasks as $key => $task) : ++$c;
$url = UriFactory::build('{/prefix}task/single?{?}&id=' . $task->getId());
$url = UriFactory::build(!empty($task->redirect) ? $task->redirect : ('{/prefix}task/single?{?}&id=' . $task->getId()));
?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Status'); ?>">

View File

@ -35,6 +35,9 @@ class BackendControllerTest extends \PHPUnit\Framework\TestCase
protected $module = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->app = new class() extends ApplicationAbstract

View File

@ -40,6 +40,9 @@ class ControllerTest extends \PHPUnit\Framework\TestCase
protected $module = null;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->app = new class() extends ApplicationAbstract