Language fixes

This commit is contained in:
Dennis Eichhorn 2016-06-25 18:20:27 +02:00
parent 73f054461b
commit 8da34db740
5 changed files with 10 additions and 11 deletions

View File

@ -15,13 +15,11 @@
*/ */
namespace Modules\HumanResourceManagement; namespace Modules\HumanResourceManagement;
use phpOMS\Contract\RenderableInterface;
use phpOMS\Message\RequestAbstract; use phpOMS\Message\RequestAbstract;
use phpOMS\Message\ResponseAbstract; use phpOMS\Message\ResponseAbstract;
use phpOMS\Module\ModuleAbstract; use phpOMS\Module\ModuleAbstract;
use phpOMS\Module\WebInterface; use phpOMS\Module\WebInterface;
use phpOMS\Views\View; use phpOMS\Views\View;
use phpOMS\Views\ViewLayout;
use Modules\HumanResourceManagement\Models\EmployeeMapper; use Modules\HumanResourceManagement\Models\EmployeeMapper;
/** /**
@ -84,7 +82,7 @@ class Controller extends ModuleAbstract implements WebInterface
* @param ResponseAbstract $response Response * @param ResponseAbstract $response Response
* @param mixed $data Generic data * @param mixed $data Generic data
* *
* @return RenderableInterface * @return \Serializable
* *
* @since 1.0.0 * @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com> * @author Dennis Eichhorn <d.eichhorn@oms.com>
@ -95,8 +93,7 @@ class Controller extends ModuleAbstract implements WebInterface
$view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/staff-list'); $view->setTemplate('/Modules/HumanResourceManagement/Theme/Backend/staff-list');
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1002402001, $request, $response)); $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1002402001, $request, $response));
$mapper = new EmployeeMapper($this->app->dbPool()->get()); $view->setData('employees', EmployeeMapper::getAll());
$view->setData('employees', $mapper->getAll());
return $view; return $view;
} }
@ -106,7 +103,7 @@ class Controller extends ModuleAbstract implements WebInterface
* @param ResponseAbstract $response Response * @param ResponseAbstract $response Response
* @param mixed $data Generic data * @param mixed $data Generic data
* *
* @return RenderableInterface * @return \Serializable
* *
* @since 1.0.0 * @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com> * @author Dennis Eichhorn <d.eichhorn@oms.com>
@ -125,7 +122,7 @@ class Controller extends ModuleAbstract implements WebInterface
* @param ResponseAbstract $response Response * @param ResponseAbstract $response Response
* @param mixed $data Generic data * @param mixed $data Generic data
* *
* @return RenderableInterface * @return \Serializable
* *
* @since 1.0.0 * @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com> * @author Dennis Eichhorn <d.eichhorn@oms.com>

View File

@ -20,6 +20,7 @@ return ['HumanResourceManagement' => [
'Name' => 'Name', 'Name' => 'Name',
'Parent' => 'Parent', 'Parent' => 'Parent',
'Personnel' => 'Personnel', 'Personnel' => 'Personnel',
'Position' => 'Position',
'Shifts' => 'Shifts', 'Shifts' => 'Shifts',
'Staff' => 'Staff', 'Staff' => 'Staff',
'Status' => 'Status', 'Status' => 'Status',

View File

@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?>
<td><?= $this->l11n->lang['HumanResourceManagement']['Department']; ?> <td><?= $this->l11n->lang['HumanResourceManagement']['Department']; ?>
<td><?= $this->l11n->lang['HumanResourceManagement']['Status']; ?> <td><?= $this->l11n->lang['HumanResourceManagement']['Status']; ?>
<tfoot> <tfoot>
<tr><td colspan="4"><?= $footerView->render(); ?> <tr><td colspan="5"><?= $footerView->render(); ?>
<tbody> <tbody>
<?php $c = 0; foreach ($employees as $key => $value) : $c++; <?php $c = 0; foreach ($employees as $key => $value) : $c++;
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/group/settings?id=' . $value->getId()); ?> $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/group/settings?id=' . $value->getId()); ?>
@ -50,7 +50,7 @@ echo $this->getData('nav')->render(); ?>
<td><a href="<?= $url; ?>"><?= $value->getNewestStatus()->getStatus(); ?></a> <td><a href="<?= $url; ?>"><?= $value->getNewestStatus()->getStatus(); ?></a>
<?php endforeach; ?> <?php endforeach; ?>
<?php if($c === 0) : ?> <?php if($c === 0) : ?>
<tr><td colspan="4" class="empty"><?= $this->l11n->lang[0]['Empty']; ?> <tr><td colspan="5" class="empty"><?= $this->l11n->lang[0]['Empty']; ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
</div> </div>

View File

@ -20,6 +20,7 @@ return ['HumanResourceManagement' => [
'Name' => 'Name', 'Name' => 'Name',
'Parent' => 'Parent', 'Parent' => 'Parent',
'Personnel' => 'Personnel', 'Personnel' => 'Personnel',
'Position' => 'Position',
'Shifts' => 'Shifts', 'Shifts' => 'Shifts',
'Staff' => 'Staff', 'Staff' => 'Staff',
'Status' => 'Status', 'Status' => 'Status',

View File

@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?>
<td><?= $this->l11n->lang['HumanResourceManagement']['Department']; ?> <td><?= $this->l11n->lang['HumanResourceManagement']['Department']; ?>
<td><?= $this->l11n->lang['HumanResourceManagement']['Status']; ?> <td><?= $this->l11n->lang['HumanResourceManagement']['Status']; ?>
<tfoot> <tfoot>
<tr><td colspan="4"><?= $footerView->render(); ?> <tr><td colspan="5"><?= $footerView->render(); ?>
<tbody> <tbody>
<?php $c = 0; foreach ($employees as $key => $value) : $c++; <?php $c = 0; foreach ($employees as $key => $value) : $c++;
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/group/settings?id=' . $value->getId()); ?> $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/group/settings?id=' . $value->getId()); ?>
@ -50,7 +50,7 @@ echo $this->getData('nav')->render(); ?>
<td><a href="<?= $url; ?>"><?= $value->getNewestStatus()->getStatus(); ?></a> <td><a href="<?= $url; ?>"><?= $value->getNewestStatus()->getStatus(); ?></a>
<?php endforeach; ?> <?php endforeach; ?>
<?php if($c === 0) : ?> <?php if($c === 0) : ?>
<tr><td colspan="4" class="empty"><?= $this->l11n->lang[0]['Empty']; ?> <tr><td colspan="5" class="empty"><?= $this->l11n->lang[0]['Empty']; ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
</div> </div>