mirror of
https://github.com/Karaka-Management/oms-Kanban.git
synced 2026-02-10 09:18:40 +00:00
many fixes and expands and module expansions
This commit is contained in:
parent
d434686dfb
commit
8a8c0216cb
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 8.0
|
||||
*
|
||||
* @package Modules\News
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link https://orange-management.org
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use Modules\News\Models\NewsType;
|
||||
use phpOMS\Uri\UriFactory;
|
||||
|
||||
/** @var \phpOMS\Views\View $this */
|
||||
/** @var \Modules\News\Models\NewsArticle[] $boards */
|
||||
$boards = $this->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(); ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Archive'); ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||
<table id="kanbanArchiveList" class="default">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="wf-100"><?= $this->getHtml('Title'); ?>
|
||||
<label for="kanbanArchiveList-sort-3">
|
||||
<input type="radio" name="kanbanArchiveList-sort" id="kanbanArchiveList-sort-3">
|
||||
<i class="sort-asc fa fa-chevron-up"></i>
|
||||
</label>
|
||||
<label for="kanbanArchiveList-sort-4">
|
||||
<input type="radio" name="kanbanArchiveList-sort" id="kanbanArchiveList-sort-4">
|
||||
<i class="sort-desc fa fa-chevron-down"></i>
|
||||
</label>
|
||||
<label>
|
||||
<i class="filter fa fa-filter"></i>
|
||||
</label>
|
||||
<td><?= $this->getHtml('Date'); ?>
|
||||
<label for="kanbanArchiveList-sort-7">
|
||||
<input type="radio" name="kanbanArchiveList-sort" id="kanbanArchiveList-sort-7">
|
||||
<i class="sort-asc fa fa-chevron-up"></i>
|
||||
</label>
|
||||
<label for="kanbanArchiveList-sort-8">
|
||||
<input type="radio" name="kanbanArchiveList-sort" id="kanbanArchiveList-sort-8">
|
||||
<i class="sort-desc fa fa-chevron-down"></i>
|
||||
</label>
|
||||
<label>
|
||||
<i class="filter fa fa-filter"></i>
|
||||
</label>
|
||||
<tbody>
|
||||
<?php
|
||||
$count = 0;
|
||||
|
||||
foreach ($boards as $key => $board) : ++$count;
|
||||
$url = UriFactory::build('{/prefix}kanban/board?{?}&id=' . $board->getId());
|
||||
?>
|
||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($board->title); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($board->getPublish()->format('Y-m-d')); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($count === 0) : ?>
|
||||
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="portlet-foot">
|
||||
<a class="button" href="<?= UriFactory::build($previous); ?>"><?= $this->getHtml('Previous', '0', '0'); ?></a>
|
||||
<a class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -42,4 +42,4 @@ echo $this->getData('nav')->render(); ?>
|
|||
</a>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div>
|
||||
<div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user