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(); ?>
-
- = $this->getHtml('Account'); ?>
-
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(); ?>
-
+
+
= $this->getHtml('Accounts') ?>
- = $this->getHtml('Groups') ?>
= $this->getHtml('ID', '0', '0'); ?>
@@ -55,6 +55,7 @@ echo $this->getData('nav')->render(); ?>
= $this->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(); ?>
-
- = $this->getHtml('Account'); ?>
-
-
+
+
+ = $this->getHtml('Account'); ?>
+
-
+
+
+
+
-
- = $this->getHtml('Groups') ?>
-
-
-
- = $this->getHtml('ID', '0', '0'); ?>
- = $this->getHtml('Name') ?>
-
- getGroups(); foreach ($groups as $key => $value) : ++$c;
- $url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?>
-
-
- = $this->printHtml($value->getId()); ?>
- = $this->printHtml($value->getName()); ?>
-
-
- = $this->getHtml('Empty', '0', '0'); ?>
-
-
+
+
= $this->getHtml('Groups') ?>
+
+
-
- = $this->getHtml('Groups'); ?>
-
-
+
+
+ = $this->getHtml('Groups'); ?>
+
-
+
+
+
+
-
- = $this->getHtml('Permissions') ?>
-
-
-
-
- = $this->getHtml('ID', '0', '0'); ?>
- = $this->getHtml('Unit'); ?>
- = $this->getHtml('App'); ?>
- = $this->getHtml('Module'); ?>
- = $this->getHtml('Type'); ?>
- = $this->getHtml('Ele'); ?>
- = $this->getHtml('Comp'); ?>
- = $this->getHtml('Perm'); ?>
-
- $value) : ++$c; $permission = $value->getPermission(); ?>
-
-
-
- = $value->getId(); ?>
- = $value->getUnit(); ?>
- = $value->getApp(); ?>
- = $value->getModule(); ?>
- = $value->getType(); ?>
- = $value->getElement(); ?>
- = $value->getComponent(); ?>
-
- = (PermissionType::CREATE | $permission) === $permission ? 'C' : ''; ?>
- = (PermissionType::READ | $permission) === $permission ? 'R' : ''; ?>
- = (PermissionType::MODIFY | $permission) === $permission ? 'U' : ''; ?>
- = (PermissionType::DELETE | $permission) === $permission ? 'D' : ''; ?>
- = (PermissionType::PERMISSION | $permission) === $permission ? 'P' : ''; ?>
-
-
- = $this->getHtml('Empty', '0', '0'); ?>
-
-
+
+
= $this->getHtml('Permissions') ?>
+
+
+
+
+
+ = $this->getHtml('ID', '0', '0'); ?>
+ = $this->getHtml('Unit'); ?>
+ = $this->getHtml('App'); ?>
+ = $this->getHtml('Module'); ?>
+ = $this->getHtml('Type'); ?>
+ = $this->getHtml('Ele'); ?>
+ = $this->getHtml('Comp'); ?>
+ = $this->getHtml('Perm'); ?>
+
+ $value) : ++$c; $permission = $value->getPermission(); ?>
+
+
+
+ = $value->getId(); ?>
+ = $value->getUnit(); ?>
+ = $value->getApp(); ?>
+ = $value->getModule(); ?>
+ = $value->getType(); ?>
+ = $value->getElement(); ?>
+ = $value->getComponent(); ?>
+
+ = (PermissionType::CREATE | $permission) === $permission ? 'C' : ''; ?>
+ = (PermissionType::READ | $permission) === $permission ? 'R' : ''; ?>
+ = (PermissionType::MODIFY | $permission) === $permission ? 'U' : ''; ?>
+ = (PermissionType::DELETE | $permission) === $permission ? 'D' : ''; ?>
+ = (PermissionType::PERMISSION | $permission) === $permission ? 'P' : ''; ?>
+
+
+ = $this->getHtml('Empty', '0', '0'); ?>
+
+
+
-
- = $this->getHtml('Permissions'); ?>
-
-
+
+
+ = $this->getHtml('Permissions'); ?>
+
-
+
+
+
+
\ 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(); ?>
-
- = $this->getHtml('Group'); ?>
-
-
+
+
+ = $this->getHtml('Group'); ?>
+
-
+
+
+
+
\ 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(); ?>
-
- = $this->getHtml('Groups') ?>
-
-
- = $this->getHtml('ID', '0', '0'); ?>
- = $this->getHtml('Status') ?>
- = $this->getHtml('Name') ?>
- = $this->getHtml('Members') ?>
-
-
-
- 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'; } ?>
-
- = $this->printHtml($value->getId()); ?>
- = $this->getHtml('Status'. $value->getStatus()); ?>
- = $this->printHtml($value->getName()); ?>
-
-
-
- = $this->getHtml('Empty', '0', '0'); ?>
-
-
+
+
= $this->getHtml('Groups') ?>
+
+
+
+ = $this->getHtml('ID', '0', '0'); ?>
+ = $this->getHtml('Status') ?>
+ = $this->getHtml('Name') ?>
+ = $this->getHtml('Members') ?>
+
+ 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'; } ?>
+
+ = $this->printHtml($value->getId()); ?>
+ = $this->getHtml('Status'. $value->getStatus()); ?>
+ = $this->printHtml($value->getName()); ?>
+
+
+
+ = $this->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(); ?>
-
- = $this->getHtml('Group'); ?>
-
-
+
+
+ = $this->getHtml('Group'); ?>
+
= $this->getHtml('ID', '0', '0'); ?>
= $this->getHtml('Name'); ?>
@@ -81,105 +83,116 @@ echo $this->getData('nav')->render(); ?>
$group->getDescriptionRaw(),
$group->getDescription()
); ?>
+
+
-
+
+
+
-
- = $this->getHtml('Accounts') ?>
-
-
- = $this->getHtml('ID', '0', '0'); ?>
- = $this->getHtml('Name'); ?>
-
- $value) : ++$c; ?>
-
-
- = $value->getName1(); ?>
-
-
- = $this->getHtml('Empty', '0', '0'); ?>
-
-
+
+
= $this->getHtml('Accounts') ?>
+
+
+
+ = $this->getHtml('ID', '0', '0'); ?>
+ = $this->getHtml('Name'); ?>
+
+ $value) : ++$c; ?>
+
+
+ = $value->getName1(); ?>
+
+
+ = $this->getHtml('Empty', '0', '0'); ?>
+
+
+
+
-
- = $this->getHtml('Accounts'); ?>
-
-
+
+
+ = $this->getHtml('Accounts'); ?>
+
= $this->getHtml('Name'); ?>
= $this->getData('accGrpSelector')->render('iAccount', 'group', true); ?>
+
+
-
+
+
+
-
- = $this->getHtml('Permissions') ?>
-
-
-
-
- = $this->getHtml('ID', '0', '0'); ?>
- = $this->getHtml('Unit'); ?>
- = $this->getHtml('App'); ?>
- = $this->getHtml('Module'); ?>
- = $this->getHtml('Type'); ?>
- = $this->getHtml('Ele'); ?>
- = $this->getHtml('Comp'); ?>
- = $this->getHtml('Perm'); ?>
-
-
+
+
= $this->getHtml('Permissions') ?>
+
+
+
+
+
+ = $this->getHtml('ID', '0', '0'); ?>
+ = $this->getHtml('Unit'); ?>
+ = $this->getHtml('App'); ?>
+ = $this->getHtml('Module'); ?>
+ = $this->getHtml('Type'); ?>
+ = $this->getHtml('Ele'); ?>
+ = $this->getHtml('Comp'); ?>
+ = $this->getHtml('Perm'); ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $value) : ++$c; $permission = $value->getPermission(); ?>
-
-
-
-
-
-
-
+ = $value->getId(); ?>
+ = $value->getUnit(); ?>
+ = $value->getApp(); ?>
+ = $value->getModule(); ?>
+ = $value->getType(); ?>
+ = $value->getElement(); ?>
+ = $value->getComponent(); ?>
-
-
-
-
-
-
-
-
- $value) : ++$c; $permission = $value->getPermission(); ?>
-
-
-
- = $value->getId(); ?>
- = $value->getUnit(); ?>
- = $value->getApp(); ?>
- = $value->getModule(); ?>
- = $value->getType(); ?>
- = $value->getElement(); ?>
- = $value->getComponent(); ?>
-
- = (\phpOMS\Account\PermissionType::CREATE | $permission) === $permission ? 'C' : ''; ?>
- = (\phpOMS\Account\PermissionType::READ | $permission) === $permission ? 'R' : ''; ?>
- = (\phpOMS\Account\PermissionType::MODIFY | $permission) === $permission ? 'U' : ''; ?>
- = (\phpOMS\Account\PermissionType::DELETE | $permission) === $permission ? 'D' : ''; ?>
- = (\phpOMS\Account\PermissionType::PERMISSION | $permission) === $permission ? 'P' : ''; ?>
-
-
- = $this->getHtml('Empty', '0', '0'); ?>
-
-
+ = (\phpOMS\Account\PermissionType::CREATE | $permission) === $permission ? 'C' : ''; ?>
+ = (\phpOMS\Account\PermissionType::READ | $permission) === $permission ? 'R' : ''; ?>
+ = (\phpOMS\Account\PermissionType::MODIFY | $permission) === $permission ? 'U' : ''; ?>
+ = (\phpOMS\Account\PermissionType::DELETE | $permission) === $permission ? 'D' : ''; ?>
+ = (\phpOMS\Account\PermissionType::PERMISSION | $permission) === $permission ? 'P' : ''; ?>
+
+
+
= $this->getHtml('Empty', '0', '0'); ?>
+
+
+
+
-
- = $this->getHtml('Permissions'); ?>
-
-
+
+
+
+ = $this->getHtml('Permissions'); ?>
+
-
+
+
+
+
@@ -232,23 +246,26 @@ echo $this->getData('nav')->render(); ?>
-
- = $this->getHtml('AuditLog') ?>
-
-
- = $this->getHtml('ID', '0', '0'); ?>
- Name
-
- $value) : ++$c; ?>
-
-
-
-
-
-
- = $this->getHtml('Empty', '0', '0'); ?>
-
-
+
+
= $this->getHtml('AuditLog') ?>
+
+
+
+ = $this->getHtml('ID', '0', '0'); ?>
+ Name
+
+ $value) : ++$c; ?>
+
+
+
+
+
+
+ = $this->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') ?? [];
?>
-
+
+
= $this->getHtml('Modules') ?>
- = $this->getHtml('Modules') ?>
= $this->getHtml('ID', '0', '0'); ?>
@@ -71,6 +71,7 @@ $installed = $this->app->moduleManager->getInstalledModules();
= $this->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) {
-
- = $this->printHtml($modules[$id]['name']['external']); ?>
+
+
= $this->printHtml($modules[$id]['name']['external']); ?>
-
+
@@ -53,74 +53,76 @@ if ($nav !== null) {
= $this->getHtml('Description'); ?>
= $this->printHtml($modules[$id]['description']); ?>
-
-
-
-
- = $this->getHtml('Deactivate'); ?>
-
-
-
-
-
- = $this->getHtml('Uninstall'); ?>
-
-
-
-
- = $this->getHtml('Activate'); ?>
-
-
-
-
-
-
-
- = $this->getHtml('Install'); ?>
-
-
-
-
- = $this->getHtml('Delete'); ?>
-
-
-
-
-
+
+
-
- = $this->getHtml('Settings'); ?>
+
+
= $this->getHtml('Settings'); ?>
-
-
- = $this->getHtml('Permissions') ?>
-
-
- = $this->getHtml('ID', '0', '0'); ?>
- Type
- = $this->getHtml('Name'); ?>
-
- getData('groupPermissions');
- foreach ($groupPermissions as $key => $value) : ++$c;
- $url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?>
-
-
- Group
- = $value->getName(); ?>
-
-
- = $this->getHtml('Empty', '0', '0'); ?>
-
-
+
+
+ = $this->getHtml('Permissions') ?>
+
+
+ = $this->getHtml('ID', '0', '0'); ?>
+ Type
+ = $this->getHtml('Name'); ?>
+
+ getData('groupPermissions');
+ foreach ($groupPermissions as $key => $value) : ++$c;
+ $url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?>
+
+
+ Group
+ = $value->getName(); ?>
+
+
+ = $this->getHtml('Empty', '0', '0'); ?>
+
+
+