fix templates

This commit is contained in:
Dennis Eichhorn 2024-04-17 17:45:06 +00:00
parent ad71a79dfb
commit 5532981071
8 changed files with 59 additions and 144 deletions

View File

@ -156,8 +156,8 @@
"pid": "/", "pid": "/",
"type": 2, "type": 2,
"subtype": 1, "subtype": 1,
"name": "BatchPostings", "name": "Postings",
"uri": "{/base}/accounting/stack/list", "uri": "{/base}/accounting/posting/list",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 10, "order": 10,
@ -171,7 +171,7 @@
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "List", "name": "List",
"uri": "{/base}/accounting/stack/list", "uri": "{/base}/accounting/posting/list",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 5, "order": 5,
@ -186,7 +186,7 @@
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Archive", "name": "Archive",
"uri": "{/base}/accounting/stack/archive/list", "uri": "{/base}/accounting/posting/archive",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 10, "order": 10,
@ -200,8 +200,8 @@
"pid": "/", "pid": "/",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Predefined", "name": "Template",
"uri": "{/base}/accounting/stack/predefined/list", "uri": "{/base}/accounting/posting/template/list",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 10, "order": 10,
@ -209,21 +209,6 @@
"permission": { "permission": 2, "category": null, "element": null }, "permission": { "permission": 2, "category": null, "element": null },
"parent": 1002605001, "parent": 1002605001,
"children": [] "children": []
},
{
"id": 1002605401,
"pid": "/",
"type": 3,
"subtype": 1,
"name": "Create",
"uri": "{/base}/accounting/stack/create",
"target": "self",
"icon": null,
"order": 15,
"from": "Accounting",
"permission": { "permission": 4, "category": null, "element": null },
"parent": 1002605001,
"children": []
} }
] ]
}, },
@ -233,7 +218,7 @@
"type": 2, "type": 2,
"subtype": 1, "subtype": 1,
"name": "Entries", "name": "Entries",
"uri": "{/base}/accounting/entries/dashboard", "uri": "{/base}/accounting/entry/dashboard",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 1, "order": 1,

View File

@ -18,7 +18,7 @@ use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb; use phpOMS\Router\RouteVerb;
return [ return [
'^/accounting/entries/dashboard(\?.*$|$)' => [ '^/accounting/entry/dashboard(\?.*$|$)' => [
[ [
'dest' => '\Modules\Accounting\Controller\BackendController:viewEntries', 'dest' => '\Modules\Accounting\Controller\BackendController:viewEntries',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -30,63 +30,63 @@ return [
], ],
], ],
], ],
'^/accounting/stack/list(\?.*$|$)' => [ '^/accounting/entry/list(\?.*$|$)' => [
[ [
'dest' => '\Modules\Accounting\Controller\BackendController:viewStackList', 'dest' => '\Modules\Accounting\Controller\BackendController:viewEntryList',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
'active' => true, 'active' => true,
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionCategory::STACK, 'state' => PermissionCategory::ENTRY,
], ],
], ],
], ],
'^/accounting/stack/entries(\?.*$|$)' => [ '^/accounting/entry/view(\?.*$|$)' => [
[ [
'dest' => '\Modules\Accounting\Controller\BackendController:viewStackEntries', 'dest' => '\Modules\Accounting\Controller\BackendController:viewEntryView',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
'active' => true, 'active' => true,
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionCategory::STACK, 'state' => PermissionCategory::ENTRY,
], ],
], ],
], ],
'^/accounting/stack/archive/list(\?.*$|$)' => [ '^/accounting/entry/create(\?.*$|$)' => [
[ [
'dest' => '\Modules\Accounting\Controller\BackendController:viewStackArchiveList', 'dest' => '\Modules\Accounting\Controller\BackendController:viewEntryCreate',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
'active' => true, 'active' => true,
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionCategory::STACK, 'state' => PermissionCategory::ENTRY,
], ],
], ],
], ],
'^/accounting/stack/create(\?.*$|$)' => [ '^/accounting/entry/archive(\?.*$|$)' => [
[ [
'dest' => '\Modules\Accounting\Controller\BackendController:viewStackCreate', 'dest' => '\Modules\Accounting\Controller\BackendController:viewEntryArchiveList',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::STACK,
],
],
],
'^/accounting/stack/predefined/list(\?.*$|$)' => [
[
'dest' => '\Modules\Accounting\Controller\BackendController:viewStackPredefinedList',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
'active' => true, 'active' => true,
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionCategory::STACK, 'state' => PermissionCategory::ENTRY,
],
],
],
'^/accounting/entry/template/list(\?.*$|$)' => [
[
'dest' => '\Modules\Accounting\Controller\BackendController:viewEntryTemplateList',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::ENTRY,
], ],
], ],
], ],
@ -126,54 +126,6 @@ return [
], ],
], ],
], ],
'^/accounting/dun/print(\?.*$|$)' => [
[
'dest' => '\Modules\Accounting\Controller\BackendController:viewCostCenterView',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::COST_CENTER,
],
],
],
'^/accounting/statement/print(\?.*$|$)' => [
[
'dest' => '\Modules\Accounting\Controller\BackendController:viewCostCenterView',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::ACCOUNT,
],
],
],
'^/accounting/balances/print(\?.*$|$)' => [
[
'dest' => '\Modules\Accounting\Controller\BackendController:viewCostCenterView',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::ACCOUNT,
],
],
],
'^/accounting/accountform/print(\?.*$|$)' => [
[
'dest' => '\Modules\Accounting\Controller\BackendController:viewCostCenterView',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::ACCOUNT,
],
],
],
'^/accounting/costcenter/list(\?.*$|$)' => [ '^/accounting/costcenter/list(\?.*$|$)' => [
[ [
@ -296,28 +248,4 @@ return [
], ],
], ],
], ],
'^/accounting/supplier/entries(\?.*$|$)' => [
[
'dest' => '\Modules\Accounting\Controller\BackendController:viewSupplierView',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::SUPPLIER,
],
],
],
'^/accounting/client/entries(\?.*$|$)' => [
[
'dest' => '\Modules\Accounting\Controller\BackendController:viewClientView',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::CLIENT,
],
],
],
]; ];

View File

@ -104,10 +104,10 @@ final class BackendController extends Controller
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function viewStackList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface public function viewEntryList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
{ {
$view = new View($this->app->l11nManager, $request, $response); $view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/Accounting/Theme/Backend/stack-list'); $view->setTemplate('/Modules/Accounting/Theme/Backend/entry-list');
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002605001, $request, $response); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002605001, $request, $response);
return $view; return $view;
@ -125,10 +125,10 @@ final class BackendController extends Controller
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function viewStackPredefinedList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface public function viewEntryTemplateList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
{ {
$view = new View($this->app->l11nManager, $request, $response); $view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/Accounting/Theme/Backend/stack-predefined-list'); $view->setTemplate('/Modules/Accounting/Theme/Backend/entry-template-list');
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002605001, $request, $response); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002605001, $request, $response);
return $view; return $view;
@ -146,10 +146,10 @@ final class BackendController extends Controller
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function viewStackCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface public function viewEntryCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
{ {
$view = new View($this->app->l11nManager, $request, $response); $view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/Accounting/Theme/Backend/stack-create'); $view->setTemplate('/Modules/Accounting/Theme/Backend/entry-create');
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002605001, $request, $response); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002605001, $request, $response);
return $view; return $view;
@ -167,10 +167,10 @@ final class BackendController extends Controller
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function viewStackEntries(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface public function viewEntryView(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
{ {
$view = new View($this->app->l11nManager, $request, $response); $view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/Accounting/Theme/Backend/stack-entries'); $view->setTemplate('/Modules/Accounting/Theme/Backend/entry-view');
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002605001, $request, $response); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002605001, $request, $response);
return $view; return $view;
@ -188,10 +188,10 @@ final class BackendController extends Controller
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function viewStackArchiveList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface public function viewEntryArchiveList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
{ {
$view = new View($this->app->l11nManager, $request, $response); $view = new View($this->app->l11nManager, $request, $response);
$view->setTemplate('/Modules/Accounting/Theme/Backend/stack-archive-list'); $view->setTemplate('/Modules/Accounting/Theme/Backend/entry-archive-list');
$view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002605001, $request, $response); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1002605001, $request, $response);
return $view; return $view;

View File

@ -23,7 +23,7 @@ echo $this->data['nav']->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="portlet"> <section class="portlet">
<div class="portlet-head"><?= $this->getHtml('COA'); ?><i class="g-icon download btn end-xs">download</i></div> <div class="portlet-head"><?= $this->getHtml('COA'); ?><i class="g-icon download btn end-xs">download</i></div>
<div class="slider"> <div class="slider">
<table class="default sticky"> <table class="default sticky">
@ -43,6 +43,6 @@ echo $this->data['nav']->render(); ?>
<tr><td colspan="5" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?> <tr><td colspan="5" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
</div> </section>
</div> </div>
</div> </div>

View File

@ -26,7 +26,7 @@ $next = empty($costcenter) ? '{/base}/accounting/costcenter/list' : '{/base}
echo $this->data['nav']->render(); ?> echo $this->data['nav']->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="portlet"> <section class="portlet">
<div class="portlet-head"><?= $this->getHtml('CostCenters'); ?><i class="g-icon download btn end-xs">download</i></div> <div class="portlet-head"><?= $this->getHtml('CostCenters'); ?><i class="g-icon download btn end-xs">download</i></div>
<table class="default sticky"> <table class="default sticky">
<thead> <thead>
@ -45,6 +45,7 @@ echo $this->data['nav']->render(); ?>
<?php if ($count === 0) : ?> <?php if ($count === 0) : ?>
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?> <tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
</section>
</div> </div>
</div> </div>

View File

@ -26,7 +26,7 @@ $next = empty($costobject) ? '{/base}/accounting/costobject/list' : '{/base}
echo $this->data['nav']->render(); ?> echo $this->data['nav']->render(); ?>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="portlet"> <section class="portlet">
<div class="portlet-head"><?= $this->getHtml('CostObjects'); ?><i class="g-icon download btn end-xs">download</i></div> <div class="portlet-head"><?= $this->getHtml('CostObjects'); ?><i class="g-icon download btn end-xs">download</i></div>
<table class="default sticky"> <table class="default sticky">
<thead> <thead>
@ -45,6 +45,7 @@ echo $this->data['nav']->render(); ?>
<?php if ($count === 0) : ?> <?php if ($count === 0) : ?>
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?> <tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
</section>
</div> </div>
</div> </div>

View File

@ -90,7 +90,7 @@ $footerView->setResults(1);
<div class="tab"> <div class="tab">
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="portlet"> <section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Entries'); ?><i class="g-icon download btn end-xs">download</i></div> <div class="portlet-head"><?= $this->getHtml('Entries'); ?><i class="g-icon download btn end-xs">download</i></div>
<div class="slider"> <div class="slider">
<table class="default sticky"> <table class="default sticky">
@ -119,7 +119,7 @@ $footerView->setResults(1);
<?php endif; ?> <?php endif; ?>
</table> </table>
</div> </div>
</div> </section>
</div> </div>
</div> </div>
</div> </div>
@ -127,7 +127,7 @@ $footerView->setResults(1);
<div class="tab"> <div class="tab">
<div class="row"> <div class="row">
<div class="col-xs-4"> <div class="col-xs-4">
<div class="portlet"> <section class="portlet">
<div class="portlet-head"><?= $this->getHtml('Accounts'); ?><i class="g-icon download btn end-xs">download</i></div> <div class="portlet-head"><?= $this->getHtml('Accounts'); ?><i class="g-icon download btn end-xs">download</i></div>
<div class="slider"> <div class="slider">
<table class="default sticky"> <table class="default sticky">
@ -146,10 +146,10 @@ $footerView->setResults(1);
<?php endif; ?> <?php endif; ?>
</table> </table>
</div> </div>
</div> </section>
</div> </div>
<div class="col-xs-4"> <div class="col-xs-4">
<div class="portlet"> <section class="portlet">
<div class="portlet-head"><?= $this->getHtml('CostCenter'); ?><i class="g-icon download btn end-xs">download</i></div> <div class="portlet-head"><?= $this->getHtml('CostCenter'); ?><i class="g-icon download btn end-xs">download</i></div>
<div class="slider"> <div class="slider">
<table class="default sticky"> <table class="default sticky">
@ -168,10 +168,10 @@ $footerView->setResults(1);
<?php endif; ?> <?php endif; ?>
</table> </table>
</div> </div>
</div> </section>
</div> </div>
<div class="col-xs-4"> <div class="col-xs-4">
<div class="portlet"> <section class="portlet">
<div class="portlet-head"><?= $this->getHtml('CostObject'); ?><i class="g-icon download btn end-xs">download</i></div> <div class="portlet-head"><?= $this->getHtml('CostObject'); ?><i class="g-icon download btn end-xs">download</i></div>
<div class="slider"> <div class="slider">
<table class="default sticky"> <table class="default sticky">
@ -190,7 +190,7 @@ $footerView->setResults(1);
<?php endif; ?> <?php endif; ?>
</table> </table>
</div> </div>
</div> </section>
</div> </div>
</div> </div>
</div> </div>

View File

@ -210,7 +210,7 @@ echo $this->data['nav']->render(); ?>
<section class="portlet hl-4"> <section class="portlet hl-4">
<div class="portlet-body"> <div class="portlet-body">
<textarea class="undecorated"><?= $this->printHtml($account->info); ?></textarea> <textarea class="undecorated"><?= $this->printTextarea($account->info); ?></textarea>
</div> </div>
</section> </section>
<?php endif; ?> <?php endif; ?>