diff --git a/Theme/Backend/Components/Tasks/list.tpl.php b/Theme/Backend/Components/Tasks/list.tpl.php index a27bb4a..32ce741 100755 --- a/Theme/Backend/Components/Tasks/list.tpl.php +++ b/Theme/Backend/Components/Tasks/list.tpl.php @@ -1,6 +1,20 @@ -
| = $this->getHtml('Title', 'Tasks'); ?> | - tasks as $key => $task) : ++$c; - $url = \phpOMS\Uri\UriFactory::build('{/prefix}task/single?{?}&id=' . $task->getId()); + 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'; } diff --git a/Theme/Backend/task-dashboard.tpl.php b/Theme/Backend/task-dashboard.tpl.php index c4fa06d..e7f4f79 100755 --- a/Theme/Backend/task-dashboard.tpl.php +++ b/Theme/Backend/task-dashboard.tpl.php @@ -48,7 +48,7 @@ echo $this->getData('nav')->render(); ?> $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())); ?>
| diff --git a/tests/BackendControllerTest.php b/tests/BackendControllerTest.php index 4a716a4..75349af 100755 --- a/tests/BackendControllerTest.php +++ b/tests/BackendControllerTest.php @@ -35,6 +35,9 @@ class BackendControllerTest extends \PHPUnit\Framework\TestCase protected $module = null; + /** + * {@inheritdoc} + */ protected function setUp() : void { $this->app = new class() extends ApplicationAbstract diff --git a/tests/ControllerTest.php b/tests/ControllerTest.php index 230ec2d..7818d33 100755 --- a/tests/ControllerTest.php +++ b/tests/ControllerTest.php @@ -40,6 +40,9 @@ class ControllerTest extends \PHPUnit\Framework\TestCase protected $module = null; + /** + * {@inheritdoc} + */ protected function setUp() : void { $this->app = new class() extends ApplicationAbstract |