Cleanup admin module

This commit is contained in:
Dennis Eichhorn 2017-12-30 23:59:50 +01:00
parent e983ddb4f5
commit fb77ea037b
38 changed files with 518 additions and 351 deletions

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -18,9 +18,9 @@ use phpOMS\Module\ActivateAbstract;
use phpOMS\Module\InfoManager;
/**
* Navigation class.
* Activate class.
*
* @package Modules
* @package Modules\Admin\Install
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -18,9 +18,9 @@ use phpOMS\Module\DeactivateAbstract;
use phpOMS\Module\InfoManager;
/**
* Navigation class.
* Deactivate class.
*
* @package Modules
* @package Modules\Admin\Install
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Install\Providing
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -17,18 +17,28 @@ use phpOMS\DataStorage\Database\DatabasePool;
/**
* Navigation class.
*
* @package Modules
* @package Modules\Admin\Install\Providing
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class Navigation
{
public static function install(string $path, DatabasePool $dbPool)
/**
* Install navigation providing
*
* @param string $path Path to some file
* @param DatabasePool $dbPool Database pool for database interaction
*
* @return void
*
* @since 1.0.0
*/
public static function install(string $path = null, DatabasePool $dbPool = null) /* : void */
{
$navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true);
$class = '\\Modules\\Navigation\\Admin\\Installer';
/** @var $class \Modules\Navigation\Admin\Installer */
$class::installExternal($dbPool, $navData);
}

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -17,9 +17,9 @@ namespace Modules\Admin\Admin;
use phpOMS\Stdlib\Base\Enum;
/**
* Tag type enum.
* Install type enum.
*
* @package Framework
* @package Modules\Admin\Install
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -21,7 +21,7 @@ use phpOMS\Module\InstallerAbstract;
/**
* Admin install class.
*
* @package Modules
* @package Modules\Admin\Install
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0

View File

@ -3,7 +3,6 @@
use phpOMS\Router\RouteVerb;
return [
'^.*/api/admin/settings.*$' => [
[
'dest' => '\Modules\Admin\Controller:apiSettingsSet',

View File

@ -1,3 +1,2 @@
<?php
$moduleRoutes = [];
return [];

View File

@ -1,3 +1,2 @@
<?php
$moduleRoutes = [];
return [];

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -18,9 +18,9 @@ use phpOMS\Module\UninstallAbstract;
use phpOMS\Module\InfoManager;
/**
* Navigation class.
* Uninstall class.
*
* @package Modules
* @package Modules\Admin\Install
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -15,14 +15,13 @@ namespace Modules\Admin\Admin;
use phpOMS\DataStorage\Database\DatabasePool;
use phpOMS\Module\UpdateAbstract;
use phpOMS\System\File\Directory;
use phpOMS\Module\InfoManager;
use phpOMS\System\File\Directory;
/**
* Navigation class.
* Update class.
*
* @package Modules
* @package Modules\Admin\Install
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -14,9 +14,8 @@ declare(strict_types = 1);
namespace Modules\Admin;
use Model\Message\FormValidation;
use Modules\Admin\Models\Account;
use phpOMS\Account\AccountStatus;
use phpOMS\Account\AccountType;
use Modules\Admin\Models\AccountMapper;
use Modules\Admin\Models\AccountPermissionMapper;
use Modules\Admin\Models\NullAccountPermission;
@ -24,18 +23,20 @@ use Modules\Admin\Models\Group;
use Modules\Admin\Models\GroupMapper;
use Modules\Admin\Models\GroupPermissionMapper;
use Modules\Admin\Models\NullGroupPermission;
use Modules\Admin\Models\PermissionState;
use phpOMS\Account\AccountStatus;
use phpOMS\Account\AccountType;
use phpOMS\Account\GroupStatus;
use phpOMS\Account\PermissionType;
use phpOMS\Message\RequestAbstract;
use phpOMS\Message\ResponseAbstract;
use phpOMS\Message\Http\RequestStatusCode;
use phpOMS\Module\ModuleAbstract;
use phpOMS\Module\WebInterface;
use phpOMS\System\MimeType;
use phpOMS\Utils\Parser\Markdown\Markdown;
use phpOMS\Views\View;
use phpOMS\Message\Http\RequestStatusCode;
use phpOMS\Account\PermissionType;
use Modules\Admin\Models\PermissionState;
/**
* Admin controller class.
@ -99,11 +100,16 @@ class Controller extends ModuleAbstract implements WebInterface
protected static $dependencies = [];
/**
* Method which generates the general settings view.
*
* In this view general settings for the entire application can be seen and adjusted. Settings which can be modified
* here are localization, password, database, etc.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return \Serializable
* @return \Serializable Serializable web view
*
* @since 1.0.0
* @codeCoverageIgnore
@ -120,20 +126,10 @@ class Controller extends ModuleAbstract implements WebInterface
return $view;
}
$settings = $this->app->appSettings->get([
1000000009,
1000000019,
1000000020,
1000000021,
1000000022,
1000000023,
1000000027,
1000000028,
]);
$settings = $this->app->appSettings->get([1000000009, 1000000019, 1000000020, 1000000021, 1000000022, 1000000023, 1000000027, 1000000028,]);
$view->setTemplate('/Modules/Admin/Theme/Backend/settings-general');
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000104001, $request, $response));
$view->setData('oname', $settings[1000000009]);
$view->setData('country', $settings[1000000019]);
$view->setData('timezone', $settings[1000000021]);
@ -148,11 +144,13 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Method which generates the account list view.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return \Serializable
* @return \Serializable Serializable web view
*
* @since 1.0.0
* @codeCoverageIgnore
@ -171,7 +169,6 @@ class Controller extends ModuleAbstract implements WebInterface
$view->setTemplate('/Modules/Admin/Theme/Backend/accounts-list');
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000104001, $request, $response));
$view->setData('list:elements', AccountMapper::getNewest(50));
$view->setData('list:count', 1);
@ -179,11 +176,13 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Method which generates the account view of a single account.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return \Serializable
* @return \Serializable Serializable web view
*
* @since 1.0.0
* @codeCoverageIgnore
@ -202,7 +201,6 @@ class Controller extends ModuleAbstract implements WebInterface
$view->setTemplate('/Modules/Admin/Theme/Backend/accounts-single');
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000104001, $request, $response));
$view->addData('account', AccountMapper::get((int) $request->getData('id')));
$permissions = AccountPermissionMapper::getFor((int) $request->getData('id'), 'account');
@ -219,11 +217,13 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Method which generates the create account view.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return \Serializable
* @return \Serializable Serializable web view
*
* @since 1.0.0
* @codeCoverageIgnore
@ -247,11 +247,13 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Method which generates the group list view.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return \Serializable
* @return \Serializable Serializable web view
*
* @since 1.0.0
* @codeCoverageIgnore
@ -270,18 +272,19 @@ class Controller extends ModuleAbstract implements WebInterface
$view->setTemplate('/Modules/Admin/Theme/Backend/groups-list');
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000103001, $request, $response));
$view->setData('list:elements', GroupMapper::getAll());
return $view;
}
/**
* Method which generates the group view of a single group.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return \Serializable
* @return \Serializable Serializable web view
*
* @since 1.0.0
* @codeCoverageIgnore
@ -300,7 +303,6 @@ class Controller extends ModuleAbstract implements WebInterface
$view->setTemplate('/Modules/Admin/Theme/Backend/groups-single');
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000103001, $request, $response));
$view->addData('group', GroupMapper::get((int) $request->getData('id')));
$permissions = GroupPermissionMapper::getFor((int) $request->getData('id'), 'group');
@ -317,11 +319,13 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Method which generates the group create view.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return \Serializable
* @return \Serializable Serializable web view
*
* @since 1.0.0
* @codeCoverageIgnore
@ -345,11 +349,13 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Method which generates the module list view.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return \Serializable
* @return \Serializable Serializable web view
*
* @since 1.0.0
* @codeCoverageIgnore
@ -372,11 +378,13 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Method which generates the module profile view.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return \Serializable
* @return \Serializable Serializable web view
*
* @since 1.0.0
* @codeCoverageIgnore
@ -399,6 +407,8 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Api method for getting settings
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
@ -421,6 +431,8 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Api method for modifying settings
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
@ -448,6 +460,8 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Api method for getting a group
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
@ -471,6 +485,8 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Api method for modifying a group
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
@ -501,6 +517,8 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Validate group create request
*
* @param RequestAbstract $request Request
*
* @return array
@ -524,6 +542,8 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Api method to create a group
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
@ -555,6 +575,8 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Method to create group from request.
*
* @param RequestAbstract $request Request
*
* @return Group
@ -574,6 +596,8 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Api method to delete a group
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
@ -599,6 +623,8 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Api method to get an accoung
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
@ -622,6 +648,8 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Api method to find accounts
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
@ -645,6 +673,8 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Method to validate account creation from request
*
* @param RequestAbstract $request Request
*
* @return array
@ -668,6 +698,8 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Api method to create an account
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
@ -699,6 +731,8 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Method to create an account from a request
*
* @param RequestAbstract $request Request
*
* @return Account
@ -721,6 +755,8 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Api method to delete an account
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
@ -746,6 +782,8 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Api method to update an account
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
@ -779,6 +817,8 @@ class Controller extends ModuleAbstract implements WebInterface
}
/**
* Api method to update the module settigns
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -16,7 +16,7 @@ namespace Modules\Admin\Models;
/**
* Account class.
*
* @package Modules
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -14,13 +14,20 @@ declare(strict_types = 1);
namespace Modules\Admin\Models;
use Modules\Media\Models\MediaMapper;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use phpOMS\DataStorage\Database\Query\Builder;
use phpOMS\DataStorage\Database\Query\Column;
use phpOMS\DataStorage\Database\RelationType;
use phpOMS\DataStorage\Database\DatabaseType;
use phpOMS\Auth\LoginReturnType;
/**
* Account mapper class.
*
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class AccountMapper extends DataMapperAbstract
{
/**
@ -33,15 +40,14 @@ class AccountMapper extends DataMapperAbstract
'account_id' => ['name' => 'account_id', 'type' => 'int', 'internal' => 'id', 'autocomplete' => true],
'account_status' => ['name' => 'account_status', 'type' => 'int', 'internal' => 'status'],
'account_type' => ['name' => 'account_type', 'type' => 'int', 'internal' => 'type'],
'account_login' => ['name' => 'account_login', 'type' => 'string', 'internal' => 'login', 'autocomplete' => true],
'account_login' => ['name' => 'account_login', 'type' => 'string', 'internal' => 'login', 'autocomplete' => true],
'account_name1' => ['name' => 'account_name1', 'type' => 'string', 'internal' => 'name1', 'autocomplete' => true],
'account_name2' => ['name' => 'account_name2', 'type' => 'string', 'internal' => 'name2', 'autocomplete' => true],
'account_name3' => ['name' => 'account_name3', 'type' => 'string', 'internal' => 'name3', 'autocomplete' => true],
'account_password' => ['name' => 'account_password', 'type' => 'string', 'internal' => 'password'],
'account_password' => ['name' => 'account_password', 'type' => 'string', 'internal' => 'password'],
'account_email' => ['name' => 'account_email', 'type' => 'string', 'internal' => 'email', 'autocomplete' => true],
//'account_tries' => ['name' => 'account_tries', 'type' => 'int', 'internal' => 'tries'],
'account_lactive' => ['name' => 'account_lactive', 'type' => 'DateTime',
'internal' => 'lastActive'],
'account_lactive' => ['name' => 'account_lactive', 'type' => 'DateTime', 'internal' => 'lastActive'],
'account_created_at' => ['name' => 'account_created_at', 'type' => 'DateTime', 'internal' => 'createdAt'],
];

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -16,19 +16,32 @@ namespace Modules\Admin\Models;
use phpOMS\Account\PermissionAbstract;
/**
* InfoManager class.
* Account permission class.
*
* Handling the info files for modules
* A single permission for an account consisting of read, create, modify, delete and permission flags.
*
* @package Framework
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class AccountPermission extends PermissionAbstract
{
/**
* Account id
*
* @var int
* @since 1.0.0
*/
private $account = 0;
/**
* Get account id
*
* @return int
*
* @since 1.0.0
*/
public function getAccount() : int
{
return $this->account;

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -14,8 +14,15 @@ declare(strict_types = 1);
namespace Modules\Admin\Models;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use phpOMS\DataStorage\Database\RelationType;
/**
* Account permission mapper class.
*
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class AccountPermissionMapper extends DataMapperAbstract
{
@ -26,16 +33,16 @@ class AccountPermissionMapper extends DataMapperAbstract
* @since 1.0.0
*/
protected static $columns = [
'account_permission_id' => ['name' => 'account_permission_id', 'type' => 'int', 'internal' => 'id'],
'account_permission_account' => ['name' => 'account_permission_account', 'type' => 'int', 'internal' => 'account'],
'account_permission_unit' => ['name' => 'account_permission_unit', 'type' => 'int', 'internal' => 'unit'],
'account_permission_app' => ['name' => 'account_permission_app', 'type' => 'int', 'internal' => 'app'],
'account_permission_module' => ['name' => 'account_permission_module', 'type' => 'int', 'internal' => 'module'],
'account_permission_from' => ['name' => 'account_permission_from', 'type' => 'int', 'internal' => 'from'],
'account_permission_type' => ['name' => 'account_permission_type', 'type' => 'int', 'internal' => 'type'],
'account_permission_element' => ['name' => 'account_permission_element', 'type' => 'int', 'internal' => 'element'],
'account_permission_component' => ['name' => 'account_permission_component', 'type' => 'int', 'internal' => 'component'],
'account_permission_permission' => ['name' => 'account_permission_permission', 'type' => 'int', 'internal' => 'permission'],
'account_permission_id' => ['name' => 'account_permission_id', 'type' => 'int', 'internal' => 'id'],
'account_permission_account' => ['name' => 'account_permission_account', 'type' => 'int', 'internal' => 'account'],
'account_permission_unit' => ['name' => 'account_permission_unit', 'type' => 'int', 'internal' => 'unit'],
'account_permission_app' => ['name' => 'account_permission_app', 'type' => 'int', 'internal' => 'app'],
'account_permission_module' => ['name' => 'account_permission_module', 'type' => 'int', 'internal' => 'module'],
'account_permission_from' => ['name' => 'account_permission_from', 'type' => 'int', 'internal' => 'from'],
'account_permission_type' => ['name' => 'account_permission_type', 'type' => 'int', 'internal' => 'type'],
'account_permission_element' => ['name' => 'account_permission_element', 'type' => 'int', 'internal' => 'element'],
'account_permission_component' => ['name' => 'account_permission_component', 'type' => 'int', 'internal' => 'component'],
'account_permission_permission' => ['name' => 'account_permission_permission', 'type' => 'int', 'internal' => 'permission'],
];
/**

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -16,7 +16,7 @@ namespace Modules\Admin\Models;
/**
* Account group class.
*
* @package Framework
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
@ -39,6 +39,12 @@ class Group extends \phpOMS\Account\Group
*/
protected $createdBy = 0;
/**
* Group raw description.
*
* @var string
* @since 1.0.0
*/
protected $descriptionRaw = '';
/**
@ -77,16 +83,41 @@ class Group extends \phpOMS\Account\Group
return $this->createdBy;
}
/**
* Set created by
*
* @param mixed $createdBy Group created by
*
* @return void
*
* @since 1.0.0
*/
public function setCreatedBy($createdBy) /* : void */
{
$this->createdBy = $createdBy;
}
/**
* Set raw description
*
* @param string $description Description
*
* @return void
*
* @since 1.0.0
*/
public function setDescriptionRaw(string $description) /* : void */
{
$this->descriptionRaw = $description;
}
/**
* Get raw description
*
* @return string Raw description
*
* @since 1.0.0
*/
public function getDescriptionRaw() : string
{
return $this->descriptionRaw;

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -14,8 +14,15 @@ declare(strict_types = 1);
namespace Modules\Admin\Models;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use phpOMS\DataStorage\Database\RelationType;
/**
* Group mapper class.
*
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class GroupMapper extends DataMapperAbstract
{
@ -26,12 +33,12 @@ class GroupMapper extends DataMapperAbstract
* @since 1.0.0
*/
protected static $columns = [
'group_id' => ['name' => 'group_id', 'type' => 'int', 'internal' => 'id'],
'group_name' => ['name' => 'group_name', 'type' => 'string', 'internal' => 'name'],
'group_status' => ['name' => 'group_status', 'type' => 'int', 'internal' => 'status'],
'group_desc' => ['name' => 'group_desc', 'type' => 'string', 'internal' => 'description'],
'group_desc_raw' => ['name' => 'group_desc_raw', 'type' => 'string', 'internal' => 'descriptionRaw'],
'group_created' => ['name' => 'group_created', 'type' => 'DateTime', 'internal' => 'createdAt'],
'group_id' => ['name' => 'group_id', 'type' => 'int', 'internal' => 'id'],
'group_name' => ['name' => 'group_name', 'type' => 'string', 'internal' => 'name'],
'group_status' => ['name' => 'group_status', 'type' => 'int', 'internal' => 'status'],
'group_desc' => ['name' => 'group_desc', 'type' => 'string', 'internal' => 'description'],
'group_desc_raw' => ['name' => 'group_desc_raw', 'type' => 'string', 'internal' => 'descriptionRaw'],
'group_created' => ['name' => 'group_created', 'type' => 'DateTime', 'internal' => 'createdAt'],
];
/**

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -16,19 +16,32 @@ namespace Modules\Admin\Models;
use phpOMS\Account\PermissionAbstract;
/**
* InfoManager class.
* Group permission class.
*
* Handling the info files for modules
* A single permission for a group consisting of read, create, modify, delete and permission flags.
*
* @package Framework
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class GroupPermission extends PermissionAbstract
{
/**
* Group id
*
* @var int
* @since 1.0.0
*/
private $group = 0;
/**
* Get group id
*
* @return int
*
* @since 1.0.0
*/
public function getGroup() : int
{
return $this->group;

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -14,8 +14,15 @@ declare(strict_types = 1);
namespace Modules\Admin\Models;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use phpOMS\DataStorage\Database\RelationType;
/**
* Group permission mapper class.
*
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class GroupPermissionMapper extends DataMapperAbstract
{
@ -26,16 +33,16 @@ class GroupPermissionMapper extends DataMapperAbstract
* @since 1.0.0
*/
protected static $columns = [
'group_permission_id' => ['name' => 'group_permission_id', 'type' => 'int', 'internal' => 'id'],
'group_permission_id' => ['name' => 'group_permission_id', 'type' => 'int', 'internal' => 'id'],
'group_permission_group' => ['name' => 'group_permission_group', 'type' => 'int', 'internal' => 'group'],
'group_permission_unit' => ['name' => 'group_permission_unit', 'type' => 'int', 'internal' => 'unit'],
'group_permission_app' => ['name' => 'group_permission_app', 'type' => 'string', 'internal' => 'app'],
'group_permission_module' => ['name' => 'group_permission_module', 'type' => 'int', 'internal' => 'module'],
'group_permission_from' => ['name' => 'group_permission_from', 'type' => 'int', 'internal' => 'from'],
'group_permission_type' => ['name' => 'group_permission_type', 'type' => 'int', 'internal' => 'type'],
'group_permission_element' => ['name' => 'group_permission_element', 'type' => 'int', 'internal' => 'element'],
'group_permission_component' => ['name' => 'group_permission_component', 'type' => 'int', 'internal' => 'component'],
'group_permission_permission' => ['name' => 'group_permission_permission', 'type' => 'int', 'internal' => 'permission'],
'group_permission_unit' => ['name' => 'group_permission_unit', 'type' => 'int', 'internal' => 'unit'],
'group_permission_app' => ['name' => 'group_permission_app', 'type' => 'string', 'internal' => 'app'],
'group_permission_module' => ['name' => 'group_permission_module', 'type' => 'int', 'internal' => 'module'],
'group_permission_from' => ['name' => 'group_permission_from', 'type' => 'int', 'internal' => 'from'],
'group_permission_type' => ['name' => 'group_permission_type', 'type' => 'int', 'internal' => 'type'],
'group_permission_element' => ['name' => 'group_permission_element', 'type' => 'int', 'internal' => 'element'],
'group_permission_component' => ['name' => 'group_permission_component', 'type' => 'int', 'internal' => 'component'],
'group_permission_permission' => ['name' => 'group_permission_permission', 'type' => 'int', 'internal' => 'permission'],
];
/**

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -16,9 +16,9 @@ namespace Modules\Admin\Models;
use phpOMS\Module\ModuleStatus;
/**
* Account group class.
* Module class.
*
* @package Framework
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
@ -198,7 +198,11 @@ class Module
}
/**
* {@inheritdoc}
* To array
*
* @return array
*
* @since 1.0.0
*/
public function toArray() : array
{

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -14,8 +14,15 @@ declare(strict_types = 1);
namespace Modules\Admin\Models;
use phpOMS\DataStorage\Database\DataMapperAbstract;
use phpOMS\DataStorage\Database\RelationType;
/**
* Module mapper class.
*
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class ModuleMapper extends DataMapperAbstract
{
@ -26,8 +33,8 @@ class ModuleMapper extends DataMapperAbstract
* @since 1.0.0
*/
protected static $columns = [
'module_id' => ['name' => 'module_id', 'type' => 'string', 'internal' => 'id'],
'module_active' => ['name' => 'module_active', 'type' => 'int', 'internal' => 'status'],
'module_id' => ['name' => 'module_id', 'type' => 'string', 'internal' => 'id'],
'module_active' => ['name' => 'module_active', 'type' => 'int', 'internal' => 'status'],
];
/**

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -13,6 +13,14 @@
declare(strict_types = 1);
namespace Modules\Admin\Models;
/**
* Null model
*
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class NullAccount extends Account
{
}

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -13,6 +13,14 @@
declare(strict_types = 1);
namespace Modules\Admin\Models;
/**
* Null model
*
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class NullAccountPermission extends AccountPermission
{
}

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -13,6 +13,14 @@
declare(strict_types = 1);
namespace Modules\Admin\Models;
/**
* Null model
*
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class NullGroup extends Group
{
}

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -13,6 +13,14 @@
declare(strict_types = 1);
namespace Modules\Admin\Models;
/**
* Null model
*
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
class NullGroupPermission extends GroupPermission
{
}

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
@ -19,7 +19,7 @@ use phpOMS\Stdlib\Base\Enum;
/**
* Permision state enum.
*
* @package Tasks
* @package Modules\Admin
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0

View File

@ -4,21 +4,23 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Language\Backend
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://website.orange-management.de
*/
return ['Navigation' => [
'Admin' => 'Admin',
'Create' => 'Create',
'Front' => 'Front',
'General' => 'General',
'Groups' => 'Groups',
'List' => 'List',
'Members' => 'Members',
'Modules' => 'Modules',
'Account' => 'Account',
'Accounts' => 'Accounts',
]];
return [
'Navigation' => [
'Admin' => 'Admin',
'Create' => 'Create',
'Front' => 'Front',
'General' => 'General',
'Groups' => 'Groups',
'List' => 'List',
'Members' => 'Members',
'Modules' => 'Modules',
'Account' => 'Account',
'Accounts' => 'Accounts',
]
];

View File

@ -4,7 +4,7 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Language\Backend
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0

View File

@ -4,136 +4,138 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Language\Backend
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://website.orange-management.de
*/
return ['Admin' => [
'Account' => 'Account',
'Account/Group' => 'Account/Group',
'Accounts' => 'Accounts',
'Active' => 'Active',
'Activate' => 'Activate',
'Activity' => 'Activity',
'Available' => 'Available',
'All' => 'All',
'Area' => 'Area',
'Banned' => 'Banned',
'Cache' => 'Cache',
'Children' => 'Children',
'Close' => 'Close',
'Country' => 'Country',
'Created' => 'Created',
'CreatedBy' => 'Created By',
'Currency' => 'Currency',
'DecimalPoint' => 'Decimal Point',
'Description' => 'Description',
'Delete' => 'Delete',
'Deactivate' => 'Deactivate',
'Email' => 'Email',
'EmailAdmin' => 'Email Admin',
'Fast' => 'Fast',
'Features' => 'Features',
'File' => 'File',
'General' => 'General',
'Glass' => 'Glass',
'Group' => 'Group',
'Groups' => 'Groups',
'Heavy' => 'Heavy',
'Inactive' => 'Inactive',
'Install' => 'Install',
'Installed' => 'Installed',
'LAddress' => 'Local Address',
'Language' => 'Language',
'Large' => 'Large',
'Length' => 'Length',
'Light' => 'Light',
'Localization' => 'Localization',
'Long' => 'Long',
'Loginname' => 'Login Name',
'Lowercase' => 'Lowercase',
'Maintenance' => 'Maintenance',
'Medium' => 'Medium',
'Member' => 'Member',
'Members' => 'Members',
'Memcache' => 'Memcache',
'MemoryLimit' => 'Memory Limit',
'Message' => 'Message',
'Module' => 'Module',
'Modules' => 'Modules',
'Name' => 'Name',
'Name1' => 'Name 1',
'Name2' => 'Name 2',
'Name3' => 'Name 3',
'None' => 'None',
'Numberformat' => 'Numberformat',
'Numeric' => 'Numeric',
'Organization' => 'Organization',
'OrganizationName' => 'Organization Name',
'Page' => 'Page',
'Parent' => 'Parent',
'Parents' => 'Parents',
'Password' => 'Password',
'PasswordRegex' => 'Password Regex',
'Permissions' => 'Permissions',
'Person' => 'Person',
'Profile' => 'Profile',
'RAddress' => 'Remote Address',
'ReCache' => 'Re-Cache',
'Running' => 'Running',
'Short' => 'Short',
'Sea' => 'Sea',
'Settings' => 'Settings',
'SettingsGeneral' => 'Settings - General',
'Single' => 'Single',
'Slow' => 'Slow',
'Small' => 'Small',
'Speed' => 'Speed',
'Specialchar' => 'Special character',
'Status' => 'Status',
'Total' => 'Total',
'Release' => 'Release',
'Tablespoon' => 'Tablespoon',
'Teaspoon' => 'Teaspoon',
'Temperature' => 'Temperature',
'Theme' => 'Theme',
'ThousandsSeparator' => 'Thousands Separator',
'Time' => 'Time',
'Timestamp' => 'Timestamp',
'Timeformat' => 'Timeformat',
'Timeout' => 'Timeout',
'Timezone' => 'Timezone',
'Type' => 'Type',
'Uninstall' => 'Uninstall',
'Uppercase' => 'Uppercase',
'Username' => 'Username',
'Version' => 'Version',
'VeryFast' => 'Very Fast',
'VeryHeavy' => 'Very Heavy',
'VeryLarge' => 'Very Large',
'VeryLight' => 'Very Light',
'VeryLong' => 'Very Long',
'VerySlow' => 'Very Slow',
'VeryShort' => 'Very Short',
'VerySmall' => 'Very Small',
'Volume' => 'Volume',
'Warnings' => 'Warnings',
'Website' => 'Website',
'Weight' => 'Weight',
'i:loc' => 'IP address or URL for remote access.',
'i:mail' => 'Email address.',
'i:oname' => 'Organization name.',
'i:rem' => 'IP address or URL for remote access.',
'i:rc' => 'Forcing re-cache for every user.',
'i:timef' => 'Time format.',
'Status0' => 'None',
'Status1' => 'Active',
'Status2' => 'Inactive',
'Status3' => 'Timehout',
'Status4' => 'Banned',
'GroupStatus1' => 'Active',
'GroupStatus2' => 'Inactive',
'GroupStatus4' => 'Hidden',
]];
return [
'Admin' => [
'Account' => 'Account',
'Account/Group' => 'Account/Group',
'Accounts' => 'Accounts',
'Active' => 'Active',
'Activate' => 'Activate',
'Activity' => 'Activity',
'Available' => 'Available',
'All' => 'All',
'Area' => 'Area',
'Banned' => 'Banned',
'Cache' => 'Cache',
'Children' => 'Children',
'Close' => 'Close',
'Country' => 'Country',
'Created' => 'Created',
'CreatedBy' => 'Created By',
'Currency' => 'Currency',
'DecimalPoint' => 'Decimal Point',
'Description' => 'Description',
'Delete' => 'Delete',
'Deactivate' => 'Deactivate',
'Email' => 'Email',
'EmailAdmin' => 'Email Admin',
'Fast' => 'Fast',
'Features' => 'Features',
'File' => 'File',
'General' => 'General',
'Glass' => 'Glass',
'Group' => 'Group',
'Groups' => 'Groups',
'Heavy' => 'Heavy',
'Inactive' => 'Inactive',
'Install' => 'Install',
'Installed' => 'Installed',
'LAddress' => 'Local Address',
'Language' => 'Language',
'Large' => 'Large',
'Length' => 'Length',
'Light' => 'Light',
'Localization' => 'Localization',
'Long' => 'Long',
'Loginname' => 'Login Name',
'Lowercase' => 'Lowercase',
'Maintenance' => 'Maintenance',
'Medium' => 'Medium',
'Member' => 'Member',
'Members' => 'Members',
'Memcache' => 'Memcache',
'MemoryLimit' => 'Memory Limit',
'Message' => 'Message',
'Module' => 'Module',
'Modules' => 'Modules',
'Name' => 'Name',
'Name1' => 'Name 1',
'Name2' => 'Name 2',
'Name3' => 'Name 3',
'None' => 'None',
'Numberformat' => 'Numberformat',
'Numeric' => 'Numeric',
'Organization' => 'Organization',
'OrganizationName' => 'Organization Name',
'Page' => 'Page',
'Parent' => 'Parent',
'Parents' => 'Parents',
'Password' => 'Password',
'PasswordRegex' => 'Password Regex',
'Permissions' => 'Permissions',
'Person' => 'Person',
'Profile' => 'Profile',
'RAddress' => 'Remote Address',
'ReCache' => 'Re-Cache',
'Running' => 'Running',
'Short' => 'Short',
'Sea' => 'Sea',
'Settings' => 'Settings',
'SettingsGeneral' => 'Settings - General',
'Single' => 'Single',
'Slow' => 'Slow',
'Small' => 'Small',
'Speed' => 'Speed',
'Specialchar' => 'Special character',
'Status' => 'Status',
'Total' => 'Total',
'Release' => 'Release',
'Tablespoon' => 'Tablespoon',
'Teaspoon' => 'Teaspoon',
'Temperature' => 'Temperature',
'Theme' => 'Theme',
'ThousandsSeparator' => 'Thousands Separator',
'Time' => 'Time',
'Timestamp' => 'Timestamp',
'Timeformat' => 'Timeformat',
'Timeout' => 'Timeout',
'Timezone' => 'Timezone',
'Type' => 'Type',
'Uninstall' => 'Uninstall',
'Uppercase' => 'Uppercase',
'Username' => 'Username',
'Version' => 'Version',
'VeryFast' => 'Very Fast',
'VeryHeavy' => 'Very Heavy',
'VeryLarge' => 'Very Large',
'VeryLight' => 'Very Light',
'VeryLong' => 'Very Long',
'VerySlow' => 'Very Slow',
'VeryShort' => 'Very Short',
'VerySmall' => 'Very Small',
'Volume' => 'Volume',
'Warnings' => 'Warnings',
'Website' => 'Website',
'Weight' => 'Weight',
'i:loc' => 'IP address or URL for remote access.',
'i:mail' => 'Email address.',
'i:oname' => 'Organization name.',
'i:rem' => 'IP address or URL for remote access.',
'i:rc' => 'Forcing re-cache for every user.',
'i:timef' => 'Time format.',
'Status0' => 'None',
'Status1' => 'Active',
'Status2' => 'Inactive',
'Status3' => 'Timehout',
'Status4' => 'Banned',
'GroupStatus1' => 'Active',
'GroupStatus2' => 'Inactive',
'GroupStatus4' => 'Hidden',
]
];

View File

@ -4,12 +4,16 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Template\Backend
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://website.orange-management.de
*/
/**
* @var \phpOMS\Views\View $this
*/
echo $this->getData('nav')->render(); ?>
<div class="row">

View File

@ -4,26 +4,17 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Template\Backend
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://website.orange-management.de
*/
/**
* @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($this->getData('list:count') / 25);
$footerView->setPage(1);
$footerView->setResults($this->getData('list:count'));
echo $this->getData('nav')->render();
?>
echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12">
@ -56,7 +47,7 @@ echo $this->getData('nav')->render();
<?php endforeach; ?>
<?php if ($c === 0) : ?>
<tr><td colspan="5" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
<?php endif; ?>
<?php endif; ?>
</table>
</div>
</div>

View File

@ -4,16 +4,16 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Template\Backend
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://website.orange-management.de
*/
/*
* UI Logic
*/
/**
* @var \phpOMS\Views\View $this
*/
$account = $this->getData('account');
$permissions = $this->getData('permissions');

View File

@ -4,16 +4,16 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Template\Backend
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://website.orange-management.de
*/
/*
* UI Logic
*/
/**
* @var \phpOMS\Views\View $this
*/
echo $this->getData('nav')->render(); ?>
<div class="row">
@ -25,9 +25,11 @@ echo $this->getData('nav')->render(); ?>
<table class="layout wf-100">
<tbody>
<tr><td colspan="2"><label for="iStatus"><?= $this->getHtml('Status'); ?></label>
<tr><td colspan="2"><select id="iStatus" name="status">
<tr><td colspan="2">
<select id="iStatus" name="status">
<option value="<?= $this->printHtml(\phpOMS\Account\GroupStatus::ACTIVE); ?>" selected><?= $this->getHtml('Active'); ?>
<option value="<?= $this->printHtml(\phpOMS\Account\GroupStatus::INACTIVE); ?>"><?= $this->getHtml('Inactive'); ?>
</select>
<tr><td><label for="iGname"><?= $this->getHtml('Name'); ?></label>
<tr><td><input id="iGname" name="name" type="text" placeholder="&#xf0c0; Guest" required>
<tr><td><label for="iGroupDescription"><?= $this->getHtml('Description'); ?></label>

View File

@ -4,23 +4,16 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Template\Backend
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://website.orange-management.de
*/
/**
* @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($this->getData('list:count') ?? 0 / 25);
$footerView->setPage(1);
$footerView->setResults($this->getData('list:count') ?? 1);
echo $this->getData('nav')->render(); ?>
<div class="row">

View File

@ -4,16 +4,16 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Template\Backend
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://website.orange-management.de
*/
/*
* UI Logic
*/
/**
* @var \phpOMS\Views\View $this
*/
$group = $this->getData('group');
$permissions = $this->getData('permissions');
$accounts = $this->getData('accounts');

View File

@ -4,26 +4,20 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Template\Backend
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://website.orange-management.de
*/
/**
* @var \phpOMS\Views\View $this
*/
$footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response);
$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
$modules = $this->app->moduleManager->getAllModules();
$active = $this->app->moduleManager->getActiveModules();
$installed = $this->app->moduleManager->getInstalledModules();
$footerView->setPages(count($modules) / 25);
$footerView->setPage(1);
$footerView->setResults(count($modules));
?>
<div class="row">

View File

@ -4,16 +4,16 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Template\Backend
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://website.orange-management.de
*/
/**
* @var \phpOMS\Views\View $this
*/
$modules = $this->app->moduleManager->getAllModules();
$active = $this->app->moduleManager->getActiveModules();
$installed = $this->app->moduleManager->getInstalledModules();

View File

@ -4,16 +4,16 @@
*
* PHP Version 7.1
*
* @package TBD
* @package Modules\Admin\Template\Backend
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://website.orange-management.de
*/
/*
* UI Logic
*/
/**
* @var \phpOMS\Views\View $this
*/
$_oname = $this->getData('oname') ?? '';
$_timezone = $this->getData('timezone') ?? '';
$_timeformat = $this->getData('timeformat') ?? '';
@ -72,31 +72,36 @@ $currencies = \phpOMS\Localization\ISO4217Enum::getConstants();
<table class="layout wf-100">
<tbody>
<tr><td colspan="2"><label for="iCountries"><?= $this->getHtml('Country'); ?></label>
<tr><td colspan="2"><select id="iCountries" name="country">
<tr><td colspan="2">
<select id="iCountries" name="country">
<?php foreach ($countries as $code => $country) : ?>
<option value="<?= $this->printHtml($code); ?>"<?= $this->printHtml(strtolower($code) == strtolower($_country) ? ' selected' : ''); ?>><?= $this->printHtml($country); ?>
<?php endforeach; ?>
</select>
<tr><td colspan="2"><label for="iTimezones"><?= $this->getHtml('Timezone'); ?></label>
<tr><td colspan="2"><select id="iTimezones" name="timezone">
<tr><td colspan="2">
<select id="iTimezones" name="timezone">
<?php foreach ($timezones as $code => $timezone) : ?>
<option value="<?= $this->printHtml($code); ?>"<?= $this->printHtml($timezone == $_timezone ? ' selected' : ''); ?>><?= $this->printHtml($timezone); ?>
<?php endforeach; ?>
</select>
<tr><td colspan="2"><label for="iTimeformats"><?= $this->getHtml('Timeformat'); ?></label>
<tr><td colspan="2"><select id="iTimeformats" name="timeformat">
<tr><td colspan="2">
<select id="iTimeformats" name="timeformat">
<?php foreach ($timeformats as $code => $timeformat) : ?>
<option value="<?= $this->printHtml($code); ?>"<?= $this->printHtml(strtolower($timeformat) == strtolower($_timeformat) ? ' selected' : ''); ?>><?= $this->printHtml($timeformat); ?>
<?php endforeach; ?>
</select>
<tr><td colspan="2"><label for="iLanguages"><?= $this->getHtml('Language'); ?></label>
<tr><td colspan="2"><select id="iLanguages" name="language">
<tr><td colspan="2">
<select id="iLanguages" name="language">
<?php foreach ($languages as $code => $language) : ?>
<option value="<?= $this->printHtml($code); ?>"<?= $this->printHtml(strtolower($code) == strtolower($_language) ? ' selected' : ''); ?>><?= $this->printHtml($language); ?>
<?php endforeach; ?>
</select>
<tr><td colspan="2"><label for="iTemperature"><?= $this->getHtml('Temperature'); ?></label>
<tr><td colspan="2"><select id="iTemperature" name="temperature">
<tr><td colspan="2">
<select id="iTemperature" name="temperature">
</select>
<tr><td colspan="2"><input type="submit" value="<?= $this->getHtml('Save', 0); ?>">
</table>
@ -112,7 +117,8 @@ $currencies = \phpOMS\Localization\ISO4217Enum::getConstants();
<form>
<table class="layout wf-100">
<tr><td colspan="2"><label for="iCurrencies"><?= $this->getHtml('Currency'); ?></label>
<tr><td colspan="2"><select form="fLocalization" id="iCurrencies" name="currency">
<tr><td colspan="2">
<select form="fLocalization" id="iCurrencies" name="currency">
<?php foreach ($currencies as $code => $currency) : ?>
<option value="<?= $this->printHtml($code); ?>"<?= $this->printHtml(strtolower($code) == strtolower($_currency) ? ' selected' : ''); ?>><?= $this->printHtml($currency); ?>
<?php endforeach; ?>
@ -137,19 +143,19 @@ $currencies = \phpOMS\Localization\ISO4217Enum::getConstants();
<tbody>
<tr><label for="iVeryLight"><?= $this->getHtml('VeryLight'); ?></label>
<tr><select form="fLocalization" id="iVeryLight" name="very_light">
</select>
</select>
<tr><label for="iLight"><?= $this->getHtml('Light'); ?></label>
<tr><select form="fLocalization" id="iLight" name="light">
</select>
</select>
<tr><label for="iMedium"><?= $this->getHtml('Medium'); ?></label>
<tr><select form="fLocalization" id="iMedium" name="medium">
</select>
</select>
<tr><label for="iHeavy"><?= $this->getHtml('Heavy'); ?></label>
<tr><select form="fLocalization" id="iHeavy" name="heavy">
</select>
</select>
<tr><label for="iVeryHeavy"><?= $this->getHtml('VeryHeavy'); ?></label>
<tr><select form="fLocalization" id="iVeryHeavy" name="very_heavy">
</select>
</select>
</table>
</form>
</div>
@ -167,22 +173,22 @@ $currencies = \phpOMS\Localization\ISO4217Enum::getConstants();
<tbody>
<tr><label for="iVerySlow"><?= $this->getHtml('VerySlow'); ?></label>
<tr><select form="fLocalization" id="iVerySlow" name="very_slow">
</select>
</select>
<tr><label for="iSlow"><?= $this->getHtml('Slow'); ?></label>
<tr><select form="fLocalization" id="iSlow" name="slow">
</select>
</select>
<tr><label for="iMedium"><?= $this->getHtml('Medium'); ?></label>
<tr><select form="fLocalization" id="iMedium" name="medium">
</select>
</select>
<tr><label for="iFast"><?= $this->getHtml('Fast'); ?></label>
<tr><select form="fLocalization" id="iFast" name="fast">
</select>
</select>
<tr><label for="iVeryFast"><?= $this->getHtml('VeryFast'); ?></label>
<tr><select form="fLocalization" id="iVeryFast" name="very_fast">
</select>
</select>
<tr><label for="iSeaSpeed"><?= $this->getHtml('Sea'); ?></label>
<tr><select form="fLocalization" id="iSeaSpeed" name="sea_speed">
</select>
</select>
</table>
</form>
</div>
@ -198,22 +204,22 @@ $currencies = \phpOMS\Localization\ISO4217Enum::getConstants();
<tbody>
<tr><label for="iVeryShort"><?= $this->getHtml('VeryShort'); ?></label>
<tr><select form="fLocalization" id="iVeryShort" name="very_short">
</select>
</select>
<tr><label for="iShort"><?= $this->getHtml('Short'); ?></label>
<tr><select form="fLocalization" id="iShort" name="short">
</select>
</select>
<tr><label for="iMedium"><?= $this->getHtml('Medium'); ?></label>
<tr><select form="fLocalization" id="iMedium" name="medium">
</select>
</select>
<tr><label for="iLong"><?= $this->getHtml('Long'); ?></label>
<tr><select form="fLocalization" id="iLong" name="long">
</select>
</select>
<tr><label for="iVeryLong"><?= $this->getHtml('VeryLong'); ?></label>
<tr><select form="fLocalization" id="iVeryLong" name="very_long">
</select>
</select>
<tr><label for="iSeaLength"><?= $this->getHtml('Sea'); ?></label>
<tr><select form="fLocalization" id="iSeaLength" name="sea_length">
</select>
</select>
</table>
</form>
</div>
@ -229,19 +235,19 @@ $currencies = \phpOMS\Localization\ISO4217Enum::getConstants();
<tbody>
<tr><label for="iVerySmall"><?= $this->getHtml('VerySmall'); ?></label>
<tr><select form="fLocalization" id="iVerySmall" name="very_small">
</select>
</select>
<tr><label for="iSmall"><?= $this->getHtml('Small'); ?></label>
<tr><select form="fLocalization" id="iSmall" name="small">
</select>
</select>
<tr><label for="iMedium"><?= $this->getHtml('Medium'); ?></label>
<tr><select form="fLocalization" id="iMedium" name="medium">
</select>
</select>
<tr><label for="iLarge"><?= $this->getHtml('Large'); ?></label>
<tr><select form="fLocalization" id="iLarge" name="large">
</select>
</select>
<tr><label for="iVeryLarge"><?= $this->getHtml('VeryLarge'); ?></label>
<tr><select form="fLocalization" id="iVeryLarge" name="very_large">
</select>
</select>
</table>
</form>
</div>
@ -259,28 +265,28 @@ $currencies = \phpOMS\Localization\ISO4217Enum::getConstants();
<tbody>
<tr><label for="iVerySmall"><?= $this->getHtml('VerySmall'); ?></label>
<tr><select form="fLocalization" id="iVerySmall" name="very_small">
</select>
</select>
<tr><label for="iSmall"><?= $this->getHtml('Small'); ?></label>
<tr><select form="fLocalization" id="iSmall" name="small">
</select>
</select>
<tr><label for="iMedium"><?= $this->getHtml('Medium'); ?></label>
<tr><select form="fLocalization" id="iMedium" name="medium">
</select>
</select>
<tr><label for="iLarge"><?= $this->getHtml('Large'); ?></label>
<tr><select form="fLocalization" id="iLarge" name="large">
</select>
</select>
<tr><label for="iVeryLarge"><?= $this->getHtml('VeryLarge'); ?></label>
<tr><select form="fLocalization" id="iVeryLarge" name="very_large">
</select>
</select>
<tr><label for="iTeaspoon"><?= $this->getHtml('Teaspoon'); ?></label>
<tr><select form="fLocalization" id="iTeaspoon" name="teaspoon">
</select>
</select>
<tr><label for="iTablespoon"><?= $this->getHtml('Tablespoon'); ?></label>
<tr><select form="fLocalization" id="iTablespoon" name="tablespoon">
</select>
</select>
<tr><label for="iGlass"><?= $this->getHtml('Glass'); ?></label>
<tr><select form="fLocalization" id="iGlass" name="glass">
</select>
</select>
</table>
</form>
</div>