mirror of
https://github.com/Karaka-Management/oms-ItemManagement.git
synced 2026-02-08 00:08:41 +00:00
Templating
This commit is contained in:
parent
d33147c79a
commit
e8b53ec982
|
|
@ -122,5 +122,67 @@
|
|||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1004807001,
|
||||
"pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd",
|
||||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "Stock",
|
||||
"uri": "/{/lang}/backend/warehousing/stock/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 10,
|
||||
"from": "ItemManagement",
|
||||
"permission": null,
|
||||
"parent": 1001301001,
|
||||
"children": [
|
||||
{
|
||||
"id": 1004807101,
|
||||
"pid": "e9b2adda603aaee5f852c05fabe394bd56cf0426",
|
||||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "List",
|
||||
"uri": "/{/lang}/backend/warehousing/stock/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
"from": "ItemManagement",
|
||||
"permission": null,
|
||||
"parent": 1004807001,
|
||||
"children": [
|
||||
{
|
||||
"id": 1004807301,
|
||||
"pid": "4a41925386568368ad4dd823b3945199e8e2628e",
|
||||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "Article",
|
||||
"uri": "/{/lang}/backend/warehousing/stock/single",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
"from": "ItemManagement",
|
||||
"permission": null,
|
||||
"parent": 1004807101,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1004807201,
|
||||
"pid": "e9b2adda603aaee5f852c05fabe394bd56cf0426",
|
||||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "Create",
|
||||
"uri": "/{/lang}/backend/warehousing/stock/create",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 5,
|
||||
"from": "ItemManagement",
|
||||
"permission": null,
|
||||
"parent": 1004807001,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -85,8 +85,10 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
protected static $routes = [
|
||||
'^.*/backend/sales/item/list.*$' => [['dest' => '\Modules\ItemManagement\Controller:viewItemManagementSalesList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||
'^.*/backend/purchase/item/list.*$' => [['dest' => '\Modules\ItemManagement\Controller:viewItemManagementPurchaseList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||
'^.*/backend/warehousing/stock/list.*$' => [['dest' => '\Modules\ItemManagement\Controller:viewItemManagementWarehousingList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||
'^.*/backend/sales/item/create.*$' => [['dest' => '\Modules\ItemManagement\Controller:viewItemManagementSalesCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||
'^.*/backend/purchase/item/create.*$' => [['dest' => '\Modules\ItemManagement\Controller:viewItemManagementPurchaseCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||
'^.*/backend/warehousing/stock/create.*$' => [['dest' => '\Modules\ItemManagement\Controller:viewItemManagementWarehousingCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
@ -127,6 +129,25 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
* @param mixed $data Generic data
|
||||
*
|
||||
* @return RenderableInterface
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function viewItemManagementWarehousingList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
||||
{
|
||||
$view = new View($this->app, $request, $response);
|
||||
$view->setTemplate('/Modules/ItemManagement/Theme/backend/stock-list');
|
||||
$view->addData('nav', $this->createNavigation(1004807001, $request, $response));
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
|
|
@ -165,6 +186,25 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
* @param mixed $data Generic data
|
||||
*
|
||||
* @return RenderableInterface
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
*/
|
||||
public function viewItemManagementWarehousingCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
||||
{
|
||||
$view = new View($this->app, $request, $response);
|
||||
$view->setTemplate('/Modules/ItemManagement/Theme/backend/item-create');
|
||||
$view->addData('nav', $this->createNavigation(1004807001, $request, $response));
|
||||
|
||||
return $view;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $pageId Page/parent Id for navigation
|
||||
* @param RequestAbstract $request Request
|
||||
|
|
|
|||
53
Theme/backend/stock-list.tpl.php
Normal file
53
Theme/backend/stock-list.tpl.php
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
|
||||
$footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response);
|
||||
$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
|
||||
|
||||
$footerView->setPages(1 / 25);
|
||||
$footerView->setPage(1);
|
||||
$footerView->setResults(1);
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
|
||||
<section class="box w-100">
|
||||
<table class="table">
|
||||
<caption><?= $this->l11n->lang['ItemManagement']['Stock']; ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->l11n->lang[0]['ID']; ?>
|
||||
<td class="wf-100"><?= $this->l11n->lang['ItemManagement']['Article']; ?>
|
||||
<td><?= $this->l11n->lang['ItemManagement']['Quantity']; ?>
|
||||
<tfoot>
|
||||
<tr><td colspan="8"><?= $footerView->render(); ?>
|
||||
<tbody>
|
||||
<?php $c = 0; foreach ([] as $key => $value) : $c++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/business/department/profile?id=' . $value->getId()); ?>
|
||||
<tr>
|
||||
<td><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $value->getName(); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $value->getParent(); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $value->getUnit(); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if($c === 0) : ?>
|
||||
<tr>
|
||||
<td colspan="8" class="empty"><?= $this->l11n->lang[0]['Empty']; ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</section>
|
||||
|
|
@ -23,7 +23,8 @@
|
|||
{
|
||||
"pid": [
|
||||
"e3d6f58661c6f42309e273740944547c93ff76a0",
|
||||
"e9b2adda603aaee5f852c05fabe394bd56cf0426"
|
||||
"e9b2adda603aaee5f852c05fabe394bd56cf0426",
|
||||
"69737ca3a3dfa6a55a1a0402474ac634c371ea9f"
|
||||
],
|
||||
"type": 4,
|
||||
"for": 0,
|
||||
|
|
@ -42,7 +43,8 @@
|
|||
{
|
||||
"pid": [
|
||||
"e3d6f58661c6f42309e273740944547c93ff76a0",
|
||||
"e9b2adda603aaee5f852c05fabe394bd56cf0426"
|
||||
"e9b2adda603aaee5f852c05fabe394bd56cf0426",
|
||||
"69737ca3a3dfa6a55a1a0402474ac634c371ea9f"
|
||||
],
|
||||
"type": 5,
|
||||
"for": "Content",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user