diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index b1fec6f..4edea02 100755 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -27,36 +27,6 @@ "permission": { "permission": 2, "type": null, "element": null }, "parent": 1006201001, "children": [] - }, - { - "id": 1006203001, - "pid": "/admin/audit", - "type": 3, - "subtype": 1, - "name": "Modules", - "uri": "{/prefix}admin/audit/module/list", - "target": "self", - "icon": null, - "order": 5, - "from": "Auditor", - "permission": { "permission": 2, "type": null, "element": null }, - "parent": 1006201001, - "children": [] - }, - { - "id": 1006204001, - "pid": "/admin/audit", - "type": 3, - "subtype": 1, - "name": "Accounts", - "uri": "{/prefix}admin/audit/account/list", - "target": "self", - "icon": null, - "order": 10, - "from": "Auditor", - "permission": { "permission": 2, "type": null, "element": null }, - "parent": 1006201001, - "children": [] } ] } diff --git a/Admin/Install/db.json b/Admin/Install/db.json index f578867..b26d2fc 100755 --- a/Admin/Install/db.json +++ b/Admin/Install/db.json @@ -23,12 +23,12 @@ }, "auditor_audit_type": { "name": "auditor_audit_type", - "type": "TINYINT", + "type": "INT", "null": false }, "auditor_audit_subtype": { "name": "auditor_audit_subtype", - "type": "TINYINT", + "type": "INT", "null": false }, "auditor_audit_content": { diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 0906d18..2c9388f 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -111,7 +111,7 @@ final class ApiController extends Controller return; } - $audit = new Audit(new NullAccount($account), $oldString, $newString, $type, $subtype, $module, $ref, $content, \ip2long($ip ?? '127.0.0.1')); + $audit = new Audit(new NullAccount($account), $oldString, $newString, $type, $subtype, $module, $ref, $content, \ip2long($ip ?? '127.0.0.1')); AuditMapper::create($audit); } diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 3f13058..5da0387 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -86,101 +86,4 @@ final class BackendController extends Controller return $view; } - - /** - * Routing end-point for application behaviour. - * - * @param RequestAbstract $request Request - * @param ResponseAbstract $response Response - * @param mixed $data Generic data - * - * @return RenderableInterface - * - * @since 1.0.0 - * @codeCoverageIgnore - */ - public function viewAuditorModuleList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface - { - $view = new View($this->app->l11nManager, $request, $response); - $view->setTemplate('/Modules/Auditor/Theme/Backend/module-list'); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1006201001, $request, $response)); - - $list = $this->app->moduleManager->getAllModules(); - $view->setData('modules', $list); - - return $view; - } - - /** - * Routing end-point for application behaviour. - * - * @param RequestAbstract $request Request - * @param ResponseAbstract $response Response - * @param mixed $data Generic data - * - * @return RenderableInterface - * - * @since 1.0.0 - * @codeCoverageIgnore - */ - public function viewAuditorModuleSingle(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface - { - $view = new View($this->app->l11nManager, $request, $response); - $view->setTemplate('/Modules/Auditor/Theme/Backend/module-single'); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1006201001, $request, $response)); - - /** @var \Modules\Auditor\Models\Audit[] $list */ - $list = AuditMapper::get(50); - $view->setData('audits', $list); - - return $view; - } - - /** - * Routing end-point for application behaviour. - * - * @param RequestAbstract $request Request - * @param ResponseAbstract $response Response - * @param mixed $data Generic data - * - * @return RenderableInterface - * - * @since 1.0.0 - * @codeCoverageIgnore - */ - public function viewAuditorAccountList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface - { - $view = new View($this->app->l11nManager, $request, $response); - $view->setTemplate('/Modules/Auditor/Theme/Backend/account-list'); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1006201001, $request, $response)); - - $view->setData('accounts', AccountMapper::getNewest(50, null, RelationType::NONE)); - - return $view; - } - - /** - * Routing end-point for application behaviour. - * - * @param RequestAbstract $request Request - * @param ResponseAbstract $response Response - * @param mixed $data Generic data - * - * @return RenderableInterface - * - * @since 1.0.0 - * @codeCoverageIgnore - */ - public function viewAuditorAccountSingle(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface - { - $view = new View($this->app->l11nManager, $request, $response); - $view->setTemplate('/Modules/Auditor/Theme/Backend/account-single'); - $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1006201001, $request, $response)); - - /** @var \Modules\Auditor\Models\Audit[] $list */ - $list = AuditMapper::get(50); - $view->setData('audits', $list); - - return $view; - } } diff --git a/Theme/Backend/account-list.tpl.php b/Theme/Backend/account-list.tpl.php deleted file mode 100755 index 7a49cac..0000000 --- a/Theme/Backend/account-list.tpl.php +++ /dev/null @@ -1,48 +0,0 @@ -getData('accounts'); - -echo $this->getData('nav')->render(); ?> - -
| = $this->getHtml('ID', '0', '0'); ?> - | = $this->getHtml('Name') ?> - | = $this->getHtml('Email') ?> - |
| = $this->printHtml($account->getId()); ?> - | = $this->printHtml( - \sprintf('%3$s %2$s %1$s', $account->getName1(), $account->getName2(), $account->getName3()) - ); ?> - | = $this->printHtml($account->getEmail()); ?> - - - |
| = $this->getHtml('Empty', '0', '0'); ?> - - | ||
| Type + | + getOld() === null) : echo 'CREATE'; ?> + getOld() !== null && $audit->getNew() !== null) : echo 'UPDATE'; ?> + getNew() === null) : echo 'DELETE'; ?> + + + | ||||||
|---|---|---|---|---|---|---|---|
| Created By | = $audit->getCreatedBy()->getName1(); ?>
diff --git a/Theme/Backend/module-list.tpl.php b/Theme/Backend/module-list.tpl.php
deleted file mode 100755
index 2f0b13b..0000000
--- a/Theme/Backend/module-list.tpl.php
+++ /dev/null
@@ -1,45 +0,0 @@
-getData('modules');
-
-echo $this->getData('nav')->render(); ?>
-
-
-
\ No newline at end of file
diff --git a/Theme/Backend/module-single.tpl.php b/Theme/Backend/module-single.tpl.php
deleted file mode 100755
index 9105097..0000000
--- a/Theme/Backend/module-single.tpl.php
+++ /dev/null
@@ -1,19 +0,0 @@
-getData('nav')->render();
-
-
-
-
| ||||||