diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 3f3b6cc..9b310cb 100644 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -273,6 +273,10 @@ final class BackendController extends Controller $view = new View($this->app->l11nManager, $request, $response); $view->setTemplate('/Modules/Admin/Theme/Backend/modules-list'); + $view->setData('modules', $this->app->moduleManager->getAllModules()); + $view->setData('active', $this->app->moduleManager->getActiveModules()); + $view->setData('installed', $this->app->moduleManager->getInstalledModules()); + return $view; } diff --git a/Theme/Backend/accounts-create.tpl.php b/Theme/Backend/accounts-create.tpl.php index bb42074..c86263d 100644 --- a/Theme/Backend/accounts-create.tpl.php +++ b/Theme/Backend/accounts-create.tpl.php @@ -12,18 +12,19 @@ */ declare(strict_types=1); +use phpOMS\Uri\UriFactory; - /** +/** * @var \phpOMS\Views\View $this */ echo $this->getData('nav')->render(); ?>
-
-

getHtml('Account'); ?>

-
-
+
+ +
getHtml('Account'); ?>
+
@@ -50,10 +51,12 @@ echo $this->getData('nav')->render(); ?>
-
- -
-
+
+
+ +
+ +
diff --git a/Theme/Backend/accounts-list.tpl.php b/Theme/Backend/accounts-list.tpl.php index 83a4a05..1dd00ec 100644 --- a/Theme/Backend/accounts-list.tpl.php +++ b/Theme/Backend/accounts-list.tpl.php @@ -22,9 +22,9 @@ echo $this->getData('nav')->render(); ?>
-
+
+
getHtml('Accounts') ?>
-
getHtml('Groups') ?>
getHtml('ID', '0', '0'); ?> @@ -55,6 +55,7 @@ echo $this->getData('nav')->render(); ?>
getHtml('Empty', '0', '0'); ?>
+
diff --git a/Theme/Backend/accounts-single.tpl.php b/Theme/Backend/accounts-single.tpl.php index e016463..bdfe565 100644 --- a/Theme/Backend/accounts-single.tpl.php +++ b/Theme/Backend/accounts-single.tpl.php @@ -15,6 +15,7 @@ declare(strict_types=1); use phpOMS\Account\AccountStatus; use phpOMS\Account\AccountType; use phpOMS\Account\PermissionType; +use phpOMS\Uri\UriFactory; /** * @todo Orange-Management/Modules#122 @@ -41,10 +42,10 @@ echo $this->getData('nav')->render(); ?>
-
-

getHtml('Account'); ?>

-
-
+
+ +
getHtml('Account'); ?>
+
@@ -102,105 +103,111 @@ echo $this->getData('nav')->render(); ?>
or
-
- -
- -
-
+
+
+ + +
+ +
- - - - - - getGroups(); foreach ($groups as $key => $value) : ++$c; - $url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?> - -
getHtml('Groups') ?>
- getHtml('ID', '0', '0'); ?> - getHtml('Name') ?> -
- printHtml($value->getId()); ?> - printHtml($value->getName()); ?> - - -
getHtml('Empty', '0', '0'); ?> - -
+
+
getHtml('Groups') ?>
+ + + + + getGroups(); foreach ($groups as $key => $value) : ++$c; + $url = UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?> + +
+ getHtml('ID', '0', '0'); ?> + getHtml('Name') ?> +
+ printHtml($value->getId()); ?> + printHtml($value->getName()); ?> + + +
getHtml('Empty', '0', '0'); ?> + +
+
-
-

getHtml('Groups'); ?>

-
-
+
+ +
getHtml('Groups'); ?>
+
getData('grpSelector')->render('iGroup', true); ?> -
- -
- -
-
+
+
+ + +
+ +
- - - - - - $value) : ++$c; $permission = $value->getPermission(); ?> - -
getHtml('Permissions') ?>
- - getHtml('ID', '0', '0'); ?> - getHtml('Unit'); ?> - getHtml('App'); ?> - getHtml('Module'); ?> - getHtml('Type'); ?> - getHtml('Ele'); ?> - getHtml('Comp'); ?> - getHtml('Perm'); ?> -
- - getId(); ?> - getUnit(); ?> - getApp(); ?> - getModule(); ?> - getType(); ?> - getElement(); ?> - getComponent(); ?> - - - - - - - - -
getHtml('Empty', '0', '0'); ?> - -
+
+
getHtml('Permissions') ?>
+ + + + + $value) : ++$c; $permission = $value->getPermission(); ?> + +
+ + getHtml('ID', '0', '0'); ?> + getHtml('Unit'); ?> + getHtml('App'); ?> + getHtml('Module'); ?> + getHtml('Type'); ?> + getHtml('Ele'); ?> + getHtml('Comp'); ?> + getHtml('Perm'); ?> +
+ + getId(); ?> + getUnit(); ?> + getApp(); ?> + getModule(); ?> + getType(); ?> + getElement(); ?> + getComponent(); ?> + + + + + + + + +
getHtml('Empty', '0', '0'); ?> + +
+
-
-

getHtml('Permissions'); ?>

-
-
+
+ +
getHtml('Permissions'); ?>
+
@@ -237,13 +244,14 @@ echo $this->getData('nav')->render(); ?> -
- - -
- -
-
+
+
+ + + +
+ + \ No newline at end of file diff --git a/Theme/Backend/groups-create.tpl.php b/Theme/Backend/groups-create.tpl.php index 20c3fb1..f39ccdd 100644 --- a/Theme/Backend/groups-create.tpl.php +++ b/Theme/Backend/groups-create.tpl.php @@ -12,6 +12,7 @@ */ declare(strict_types=1); +use phpOMS\Uri\UriFactory; /** * @var \phpOMS\Views\View $this @@ -20,10 +21,10 @@ echo $this->getData('nav')->render(); ?>
-
-

getHtml('Group'); ?>

-
-
+
+ +
getHtml('Group'); ?>
+
@@ -36,10 +37,12 @@ echo $this->getData('nav')->render(); ?>
getData('editor')->render('group-editor'); ?>
getData('editor')->getData('text')->render('group-editor', 'description', 'fGroupCreate'); ?> -
- -
-
+
+
+ +
+ +
\ No newline at end of file diff --git a/Theme/Backend/groups-list.tpl.php b/Theme/Backend/groups-list.tpl.php index eb28335..1b2f2e8 100644 --- a/Theme/Backend/groups-list.tpl.php +++ b/Theme/Backend/groups-list.tpl.php @@ -20,32 +20,33 @@ echo $this->getData('nav')->render(); ?>
- - - - - - - getData('list:elements') as $key => $value) : ++$c; - $url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); - $color = 'darkred'; - if ($value->getStatus() === \phpOMS\Account\GroupStatus::ACTIVE) { $color = 'green'; } - elseif ($value->getStatus() === \phpOMS\Account\GroupStatus::INACTIVE) { $color = 'darkblue'; } - elseif ($value->getStatus() === \phpOMS\Account\GroupStatus::HIDDEN) { $color = 'purple'; } ?> - -
getHtml('Groups') ?>
getHtml('ID', '0', '0'); ?> - getHtml('Status') ?> - getHtml('Name') ?> - getHtml('Members') ?> -
-
printHtml($value->getId()); ?> - getHtml('Status'. $value->getStatus()); ?> - printHtml($value->getName()); ?> - - - -
getHtml('Empty', '0', '0'); ?> - -
+
+
getHtml('Groups') ?>
+ + + + + getData('list:elements') as $key => $value) : ++$c; + $url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); + $color = 'darkred'; + if ($value->getStatus() === \phpOMS\Account\GroupStatus::ACTIVE) { $color = 'green'; } + elseif ($value->getStatus() === \phpOMS\Account\GroupStatus::INACTIVE) { $color = 'darkblue'; } + elseif ($value->getStatus() === \phpOMS\Account\GroupStatus::HIDDEN) { $color = 'purple'; } ?> + +
getHtml('ID', '0', '0'); ?> + getHtml('Status') ?> + getHtml('Name') ?> + getHtml('Members') ?> +
printHtml($value->getId()); ?> + getHtml('Status'. $value->getStatus()); ?> + printHtml($value->getName()); ?> + + + +
getHtml('Empty', '0', '0'); ?> + +
+
+
\ No newline at end of file diff --git a/Theme/Backend/groups-single.tpl.php b/Theme/Backend/groups-single.tpl.php index 0351025..fba1bd2 100644 --- a/Theme/Backend/groups-single.tpl.php +++ b/Theme/Backend/groups-single.tpl.php @@ -12,6 +12,8 @@ */ declare(strict_types=1); +use phpOMS\Uri\UriFactory; + /** * @todo Orange-Management/Modules#122 * Add group account removal @@ -59,10 +61,10 @@ echo $this->getData('nav')->render(); ?>
-
-

getHtml('Group'); ?>

-
-
+
+ +
getHtml('Group'); ?>
+
@@ -81,105 +83,116 @@ echo $this->getData('nav')->render(); ?> $group->getDescriptionRaw(), $group->getDescription() ); ?> +
+
- -
-
+
+ +
- - - - - - $value) : ++$c; ?> - -
getHtml('Accounts') ?>
getHtml('ID', '0', '0'); ?> - getHtml('Name'); ?> -
- getName1(); ?> - - -
getHtml('Empty', '0', '0'); ?> - -
+
+
getHtml('Accounts') ?>
+ + + + + $value) : ++$c; ?> + +
getHtml('ID', '0', '0'); ?> + getHtml('Name'); ?> +
+ getName1(); ?> + + +
getHtml('Empty', '0', '0'); ?> + +
+
+
-
-

getHtml('Accounts'); ?>

-
-
+
+ +
getHtml('Accounts'); ?>
+
getData('accGrpSelector')->render('iAccount', 'group', true); ?> +
+
- -
-
+
+ +
- - - - - - - $value) : ++$c; $permission = $value->getPermission(); ?> - -
getHtml('Permissions') ?>
- - getHtml('ID', '0', '0'); ?> - getHtml('Unit'); ?> - getHtml('App'); ?> - getHtml('Module'); ?> - getHtml('Type'); ?> - getHtml('Ele'); ?> - getHtml('Comp'); ?> - getHtml('Perm'); ?> -
- - getId(); ?> - getUnit(); ?> - getApp(); ?> - getModule(); ?> - getType(); ?> - getElement(); ?> - getComponent(); ?> - - - - - - - - -
getHtml('Empty', '0', '0'); ?> - -
+ + + + + + + + getHtml('Empty', '0', '0'); ?> + + +
+
-
-

getHtml('Permissions'); ?>

-
-
+ +
+ +
getHtml('Permissions'); ?>
+
@@ -216,14 +229,15 @@ echo $this->getData('nav')->render(); ?> -
- - -
- -
-
+ +
+ + + +
+ + @@ -232,23 +246,26 @@ echo $this->getData('nav')->render(); ?>
- - - - - - $value) : ++$c; ?> - -
getHtml('AuditLog') ?>
getHtml('ID', '0', '0'); ?> - Name -
- - - - -
getHtml('Empty', '0', '0'); ?> - -
+
+
getHtml('AuditLog') ?>
+ + + + + $value) : ++$c; ?> + +
getHtml('ID', '0', '0'); ?> + Name +
+ + + + +
getHtml('Empty', '0', '0'); ?> + +
+
+
diff --git a/Theme/Backend/modules-list.tpl.php b/Theme/Backend/modules-list.tpl.php index 95efc7c..94dc36a 100644 --- a/Theme/Backend/modules-list.tpl.php +++ b/Theme/Backend/modules-list.tpl.php @@ -18,16 +18,16 @@ use phpOMS\Module\ModuleStatus; * @var \phpOMS\Views\View $this */ -$modules = $this->app->moduleManager->getAllModules(); -$active = $this->app->moduleManager->getActiveModules(); -$installed = $this->app->moduleManager->getInstalledModules(); +$modules = $this->getData('modules') ?? []; +$active = $this->getData('active') ?? []; +$isntalled = $this->getData('isntalled') ?? []; ?>
-
+
+
getHtml('Modules') ?>
-
getHtml('Modules') ?>
getHtml('ID', '0', '0'); ?> @@ -71,6 +71,7 @@ $installed = $this->app->moduleManager->getInstalledModules();
getHtml('Empty', '0', '0'); ?>
+
diff --git a/Theme/Backend/modules-single.tpl.php b/Theme/Backend/modules-single.tpl.php index 3727223..631365d 100644 --- a/Theme/Backend/modules-single.tpl.php +++ b/Theme/Backend/modules-single.tpl.php @@ -32,10 +32,10 @@ if ($nav !== null) {
-
-

printHtml($modules[$id]['name']['external']); ?>

+
+
printHtml($modules[$id]['name']['external']); ?>
-
+
@@ -53,74 +53,76 @@ if ($nav !== null) { -
getHtml('Description'); ?> printHtml($modules[$id]['description']); ?> -
- -
- -
- -
-
-
- -
-
-
-
- -
-
-
- -
-
-
- -
-
-
-
- -
-
-
-
-
+
+ +
+ +
+ +
+
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+ +
+
+
+ +
+
-
-

getHtml('Settings'); ?>

+
+
getHtml('Settings'); ?>
-
+
-
+
- - - - - - getData('groupPermissions'); - foreach ($groupPermissions as $key => $value) : ++$c; - $url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?> - -
getHtml('Permissions') ?>
getHtml('ID', '0', '0'); ?> - Type - getHtml('Name'); ?> -
- Group - getName(); ?> - - -
getHtml('Empty', '0', '0'); ?> - -
+
+ + + + + + getData('groupPermissions'); + foreach ($groupPermissions as $key => $value) : ++$c; + $url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?> + +
getHtml('Permissions') ?>
getHtml('ID', '0', '0'); ?> + Type + getHtml('Name'); ?> +
+ Group + getName(); ?> + + +
getHtml('Empty', '0', '0'); ?> + +
+