From 8a8c0216cb59af88b862d07bd6ab9c9dc8ba5146 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 4 Apr 2021 17:10:52 +0200 Subject: [PATCH] many fixes and expands and module expansions --- Controller/ApiController.php | 1 + Controller/BackendController.php | 7 +++ Theme/Backend/kanban-archive.tpl.php | 79 ++++++++++++++++++++++++++ Theme/Backend/kanban-dashboard.tpl.php | 2 +- 4 files changed, 88 insertions(+), 1 deletion(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 95d6961..c022033 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -33,6 +33,7 @@ use phpOMS\Message\RequestAbstract; use phpOMS\Message\ResponseAbstract; use phpOMS\Model\Message\FormValidation; use phpOMS\Utils\Parser\Markdown\Markdown; +use phpOMS\Message\Http\HttpResponse; /** * Kanban controller class. diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 53e2b62..7226d1a 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -135,6 +135,13 @@ final class BackendController extends Controller { $view = new View($this->app->l11nManager, $request, $response); $view->setTemplate('/Modules/Kanban/Theme/Backend/kanban-archive'); + $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005801001, $request, $response)); + + $list = KanbanBoardMapper::with('columns', models: null) + ::with('language', $response->getLanguage()) + ::getNewest(20, depth: 3); + + $view->setData('boards', $list); return $view; } diff --git a/Theme/Backend/kanban-archive.tpl.php b/Theme/Backend/kanban-archive.tpl.php index e69de29..8ec388f 100755 --- a/Theme/Backend/kanban-archive.tpl.php +++ b/Theme/Backend/kanban-archive.tpl.php @@ -0,0 +1,79 @@ +getData('boards') ?? []; + +$previous = empty($boards) ? '{/prefix}kanban/archive' : '{/prefix}kanban/archive?{?}&id=' . \reset($boards)->getId() . '&ptype=p'; +$next = empty($boards) ? '{/prefix}kanban/archive' : '{/prefix}kanban/archive?{?}&id=' . \end($boards)->getId() . '&ptype=n'; + +echo $this->getData('nav')->render(); ?> + +
+
+
+
getHtml('Archive'); ?>
+ + + + + $board) : ++$count; + $url = UriFactory::build('{/prefix}kanban/board?{?}&id=' . $board->getId()); + ?> + +
getHtml('Title'); ?> + + + + getHtml('Date'); ?> + + + +
printHtml($board->title); ?> + printHtml($board->getPublish()->format('Y-m-d')); ?> + + +
getHtml('Empty', '0', '0'); ?> + +
+ +
+
+
diff --git a/Theme/Backend/kanban-dashboard.tpl.php b/Theme/Backend/kanban-dashboard.tpl.php index b551594..6b05b1a 100755 --- a/Theme/Backend/kanban-dashboard.tpl.php +++ b/Theme/Backend/kanban-dashboard.tpl.php @@ -42,4 +42,4 @@ echo $this->getData('nav')->render(); ?> -
\ No newline at end of file +