From 9fd2b3210798a696c318a8390c6992f5ca0bfcf6 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 19 Dec 2015 19:35:25 +0100 Subject: [PATCH] Templating --- Admin/Install/nav.install.json | 62 +++++++++++++++++++++ Controller.php | 19 +++++++ Theme/backend/purchase-invoice-list.tpl.php | 47 ++++++++++++++++ Theme/lang/backend.en.lang.php | 2 + 4 files changed, 130 insertions(+) create mode 100644 Theme/backend/purchase-invoice-list.tpl.php diff --git a/Admin/Install/nav.install.json b/Admin/Install/nav.install.json index ebee021..7e1fbe9 100644 --- a/Admin/Install/nav.install.json +++ b/Admin/Install/nav.install.json @@ -60,5 +60,67 @@ "children": [] } ] + }, + { + "id": 1005105001, + "pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd", + "type": 2, + "subtype": 1, + "name": "Invoice", + "uri": "/{/lang}/backend/purchase/invoice/list", + "target": "self", + "icon": null, + "order": 5, + "from": "Invoice", + "permission": null, + "parent": 1002101001, + "children": [ + { + "id": 1005105101, + "pid": "722ef87be24d036db431dd65c0418e5502a6eb89", + "type": 3, + "subtype": 1, + "name": "List", + "uri": "/{/lang}/backend/purchase/invoice/list", + "target": "self", + "icon": null, + "order": 1, + "from": "Billing", + "permission": null, + "parent": 1005105001, + "children": [ + { + "id": 1005105201, + "pid": "420c091bd6d9f5cd16b1d62569189feb707d6652", + "type": 3, + "subtype": 1, + "name": "Invoice", + "uri": "/{/lang}/backend/purchase/invoice/single", + "target": "self", + "icon": null, + "order": 1, + "from": "Billing", + "permission": null, + "parent": 1005104101, + "children": [] + } + ] + }, + { + "id": 1005105301, + "pid": "722ef87be24d036db431dd65c0418e5502a6eb89", + "type": 3, + "subtype": 1, + "name": "Create", + "uri": "/{/lang}/backend/purchase/invoice/create", + "target": "self", + "icon": null, + "order": 5, + "from": "Billing", + "permission": null, + "parent": 1005104001, + "children": [] + } + ] } ] diff --git a/Controller.php b/Controller.php index 11fcac0..9a37e77 100644 --- a/Controller.php +++ b/Controller.php @@ -128,6 +128,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 + */ + public function viewBillingPurchaInvoiceList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Billing/Theme/backend/purchase-invoice-list'); + $view->addData('nav', $this->createNavigation(1005104001, $request, $response)); + + return $view; + } + /** * @param int $pageId Page/parent Id for navigation * @param RequestAbstract $request Request diff --git a/Theme/backend/purchase-invoice-list.tpl.php b/Theme/backend/purchase-invoice-list.tpl.php new file mode 100644 index 0000000..411595a --- /dev/null +++ b/Theme/backend/purchase-invoice-list.tpl.php @@ -0,0 +1,47 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ + +$footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response); +$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig'); +$footerView->setPages(20); +$footerView->setPage(1); + +echo $this->getData('nav')->render(); ?> + +
+ + + + + + + + $value) : $count++; ?> + + +
l11n->lang['Billing']['Invoices'] ?>
l11n->lang[0]['ID']; ?> + l11n->lang['Billing']['Type']; ?> + l11n->lang['Billing']['SupplierID']; ?> + l11n->lang['Billing']['Supplier']; ?> + l11n->lang['Billing']['Net']; ?> + l11n->lang['Billing']['Gross']; ?> + l11n->lang['Billing']['Created']; ?> + l11n->lang['Billing']['Due']; ?> +
render(); ?> +
l11n->lang[0]['Empty']; ?> + +
+
diff --git a/Theme/lang/backend.en.lang.php b/Theme/lang/backend.en.lang.php index dbea19f..58b9027 100644 --- a/Theme/lang/backend.en.lang.php +++ b/Theme/lang/backend.en.lang.php @@ -43,6 +43,8 @@ $MODLANG['Billing'] = [ 'Recipient' => 'Recipient', 'Shipment' => 'Shipment', 'Source' => 'Source', + 'Supplier' => 'Supplier', + 'SupplierID' => 'Supplier ID', 'Tax' => 'Tax', 'Total' => 'Total', 'Type' => 'Type',