From 8da34db740d3241df88e9d2107b2bcd3d7ac74b2 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 25 Jun 2016 18:20:27 +0200 Subject: [PATCH] Language fixes --- Controller.php | 11 ++++------- Theme/Backend/Lang/en.lang.php | 1 + Theme/Backend/staff-list.tpl.php | 4 ++-- Theme/backend/Lang/en.lang.php | 1 + Theme/backend/staff-list.tpl.php | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Controller.php b/Controller.php index 9f57fd1..0e6149c 100644 --- a/Controller.php +++ b/Controller.php @@ -15,13 +15,11 @@ */ namespace Modules\HumanResourceManagement; -use phpOMS\Contract\RenderableInterface; use phpOMS\Message\RequestAbstract; use phpOMS\Message\ResponseAbstract; use phpOMS\Module\ModuleAbstract; use phpOMS\Module\WebInterface; use phpOMS\Views\View; -use phpOMS\Views\ViewLayout; use Modules\HumanResourceManagement\Models\EmployeeMapper; /** @@ -84,7 +82,7 @@ class Controller extends ModuleAbstract implements WebInterface * @param ResponseAbstract $response Response * @param mixed $data Generic data * - * @return RenderableInterface + * @return \Serializable * * @since 1.0.0 * @author Dennis Eichhorn @@ -95,8 +93,7 @@ class Controller extends ModuleAbstract implements WebInterface $view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/staff-list'); $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1002402001, $request, $response)); - $mapper = new EmployeeMapper($this->app->dbPool()->get()); - $view->setData('employees', $mapper->getAll()); + $view->setData('employees', EmployeeMapper::getAll()); return $view; } @@ -106,7 +103,7 @@ class Controller extends ModuleAbstract implements WebInterface * @param ResponseAbstract $response Response * @param mixed $data Generic data * - * @return RenderableInterface + * @return \Serializable * * @since 1.0.0 * @author Dennis Eichhorn @@ -125,7 +122,7 @@ class Controller extends ModuleAbstract implements WebInterface * @param ResponseAbstract $response Response * @param mixed $data Generic data * - * @return RenderableInterface + * @return \Serializable * * @since 1.0.0 * @author Dennis Eichhorn diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index b1c7642..dd4a9d9 100644 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -20,6 +20,7 @@ return ['HumanResourceManagement' => [ 'Name' => 'Name', 'Parent' => 'Parent', 'Personnel' => 'Personnel', + 'Position' => 'Position', 'Shifts' => 'Shifts', 'Staff' => 'Staff', 'Status' => 'Status', diff --git a/Theme/Backend/staff-list.tpl.php b/Theme/Backend/staff-list.tpl.php index 18aef4a..de2c377 100644 --- a/Theme/Backend/staff-list.tpl.php +++ b/Theme/Backend/staff-list.tpl.php @@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?> l11n->lang['HumanResourceManagement']['Department']; ?> l11n->lang['HumanResourceManagement']['Status']; ?> - render(); ?> + render(); ?> $value) : $c++; $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/group/settings?id=' . $value->getId()); ?> @@ -50,7 +50,7 @@ echo $this->getData('nav')->render(); ?> getNewestStatus()->getStatus(); ?> - l11n->lang[0]['Empty']; ?> + l11n->lang[0]['Empty']; ?> diff --git a/Theme/backend/Lang/en.lang.php b/Theme/backend/Lang/en.lang.php index b1c7642..dd4a9d9 100644 --- a/Theme/backend/Lang/en.lang.php +++ b/Theme/backend/Lang/en.lang.php @@ -20,6 +20,7 @@ return ['HumanResourceManagement' => [ 'Name' => 'Name', 'Parent' => 'Parent', 'Personnel' => 'Personnel', + 'Position' => 'Position', 'Shifts' => 'Shifts', 'Staff' => 'Staff', 'Status' => 'Status', diff --git a/Theme/backend/staff-list.tpl.php b/Theme/backend/staff-list.tpl.php index 18aef4a..de2c377 100644 --- a/Theme/backend/staff-list.tpl.php +++ b/Theme/backend/staff-list.tpl.php @@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?> l11n->lang['HumanResourceManagement']['Department']; ?> l11n->lang['HumanResourceManagement']['Status']; ?> - render(); ?> + render(); ?> $value) : $c++; $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/group/settings?id=' . $value->getId()); ?> @@ -50,7 +50,7 @@ echo $this->getData('nav')->render(); ?> getNewestStatus()->getStatus(); ?> - l11n->lang[0]['Empty']; ?> + l11n->lang[0]['Empty']; ?>