mirror of
https://github.com/Karaka-Management/oms-Auditor.git
synced 2026-02-01 14:58:41 +00:00
prepare for module/account audits
This commit is contained in:
parent
b0574d74af
commit
612a10232e
|
|
@ -14,9 +14,11 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\Auditor\Controller;
|
||||
|
||||
use Modules\Admin\Models\AccountMapper;
|
||||
use Modules\Auditor\Models\AuditMapper;
|
||||
|
||||
use phpOMS\Contract\RenderableInterface;
|
||||
use phpOMS\DataStorage\Database\RelationType;
|
||||
use phpOMS\Message\RequestAbstract;
|
||||
use phpOMS\Message\ResponseAbstract;
|
||||
use phpOMS\Views\View;
|
||||
|
|
@ -91,8 +93,8 @@ final class BackendController extends Controller
|
|||
$view->setTemplate('/Modules/Auditor/Theme/Backend/module-list');
|
||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1006201001, $request, $response));
|
||||
|
||||
$list = AuditMapper::getNewest(50);
|
||||
$view->setData('audits', $list);
|
||||
$list = $this->app->moduleManager->getAllModules();
|
||||
$view->setData('modules', $list);
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
|
@ -135,8 +137,7 @@ final class BackendController extends Controller
|
|||
$view->setTemplate('/Modules/Auditor/Theme/Backend/account-list');
|
||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1006201001, $request, $response));
|
||||
|
||||
$list = AuditMapper::getNewest(50);
|
||||
$view->setData('audits', $list);
|
||||
$view->setData('accounts', AccountMapper::getNewest(50, null, RelationType::NONE));
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
$accounts = $this->getData('accounts');
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
|
|
@ -25,18 +26,18 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tr>
|
||||
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Name') ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Date') ?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<td colspan="2">
|
||||
<tbody>
|
||||
<?php $count = 0; foreach ($audits as $key => $audit) : ++$count;
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/audit/single?{?}&id=' . $audit->getId()); ?>
|
||||
<?php $count = 0; foreach ($accounts as $key => $account) : ++$count;
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/audit/single?{?}&id=' . $account->getId()); ?>
|
||||
<tr data-href="<?= $url; ?>">
|
||||
<td>
|
||||
<td><?= $this->printHtml($account->getId()); ?>
|
||||
<td><?= $this->printHtml($account->getName1()); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($count === 0) : ?>
|
||||
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@
|
|||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
|
||||
$modules = $this->getData('modules');
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<div class="row">
|
||||
|
|
@ -25,18 +27,18 @@ echo $this->getData('nav')->render(); ?>
|
|||
<tr>
|
||||
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Name') ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Date') ?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<td colspan="2">
|
||||
<tbody>
|
||||
<?php $count = 0; foreach ($audits as $key => $audit) : ++$count;
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/audit/single?{?}&id=' . $audit->getId()); ?>
|
||||
<?php $count = 0; foreach ($modules as $key => $module) : ++$count;
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/audit/single?{?}&id=' . $module['name']['id']); ?>
|
||||
<tr data-href="<?= $url; ?>">
|
||||
<td>
|
||||
<td><?= $this->printHtml($module['name']['id']); ?>
|
||||
<td><?= $this->printHtml($module['name']['external']); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($count === 0) : ?>
|
||||
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user