From a0a4518ebe6f3ec04df6e39e6e3e021bf4d42fe3 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 17 Apr 2024 17:45:07 +0000 Subject: [PATCH] fix templates --- Controller/BackendController.php | 71 +++++++++++++++++++++++ Theme/Backend/stock-location-view.tpl.php | 4 +- Theme/Backend/stock-type-view.tpl.php | 8 +++ 3 files changed, 81 insertions(+), 2 deletions(-) diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 63b203a..0a6f76f 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -147,6 +147,28 @@ final class BackendController extends Controller return $view; } + /** + * Routing end-point for application behavior. + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return RenderableInterface Returns a renderable object + * + * @since 1.0.0 + * @codeCoverageIgnore + */ + public function viewStockCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface + { + $view = new View($this->app->l11nManager, $request, $response); + + $view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-view'); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001302001, $request, $response); + + return $view; + } + /** * Routing end-point for application behavior. * @@ -180,6 +202,28 @@ final class BackendController extends Controller return $view; } + /** + * Routing end-point for application behavior. + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return RenderableInterface Returns a renderable object + * + * @since 1.0.0 + * @codeCoverageIgnore + */ + public function viewStockTypeCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface + { + $view = new View($this->app->l11nManager, $request, $response); + + $view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-type-view'); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001302001, $request, $response); + + return $view; + } + /** * Routing end-point for application behavior. * @@ -245,4 +289,31 @@ final class BackendController extends Controller return $view; } + + /** + * Routing end-point for application behavior. + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param array $data Generic data + * + * @return RenderableInterface Returns a renderable object + * + * @since 1.0.0 + * @codeCoverageIgnore + */ + public function viewStockLocationCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface + { + $view = new View($this->app->l11nManager, $request, $response); + + $view->setTemplate('/Modules/WarehouseManagement/Theme/Backend/stock-location-view'); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1001302001, $request, $response); + + $view->data['types'] = StockTypeMapper::getAll() + ->with('l11n') + ->where('l11n/language', $request->header->l11n->language) + ->executeGetArray(); + + return $view; + } } diff --git a/Theme/Backend/stock-location-view.tpl.php b/Theme/Backend/stock-location-view.tpl.php index e1ba979..b5310a8 100644 --- a/Theme/Backend/stock-location-view.tpl.php +++ b/Theme/Backend/stock-location-view.tpl.php @@ -34,7 +34,7 @@ echo $this->data['nav']->render();
- > + >
@@ -46,7 +46,7 @@ echo $this->data['nav']->render();
diff --git a/Theme/Backend/stock-type-view.tpl.php b/Theme/Backend/stock-type-view.tpl.php index abf3418..99dfa0c 100644 --- a/Theme/Backend/stock-type-view.tpl.php +++ b/Theme/Backend/stock-type-view.tpl.php @@ -36,6 +36,14 @@ echo $this->data['nav']->render(); > +
+ + + + + + +