diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e1e05f8..278096d 100755 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,10 +13,15 @@ on: - cron: '0 0 1,15 * *' jobs: - general_module_workflow: + general_module_workflow_php: uses: Karaka-Management/Karaka/.github/workflows/php_template.yml@develop secrets: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_PAT: ${{ secrets.GH_PAT }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - + general_module_workflow_js: + uses: Karaka-Management/Karaka/.github/workflows/js_template.yml@develop + secrets: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_PAT: ${{ secrets.GH_PAT }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index ad9ed4f..4ed27ee 100755 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -125,7 +125,7 @@ "type": 3, "subtype": 1, "name": "Info", - "uri": "{/base}/admin/module/info", + "uri": "{/base}/admin/module/info?id={?id}", "target": "self", "icon": null, "order": 1, @@ -140,7 +140,7 @@ "type": 3, "subtype": 1, "name": "Settings", - "uri": "{/base}/admin/module/settings", + "uri": "{/base}/admin/module/settings?id={?id}", "target": "self", "icon": null, "order": 5, @@ -155,7 +155,7 @@ "type": 3, "subtype": 1, "name": "Routes", - "uri": "{/base}/admin/module/route/list", + "uri": "{/base}/admin/module/route/list?id={?id}", "target": "self", "icon": null, "order": 15, @@ -170,7 +170,7 @@ "type": 3, "subtype": 1, "name": "Hooks", - "uri": "{/base}/admin/module/hook/list", + "uri": "{/base}/admin/module/hook/list?id={?id}", "target": "self", "icon": null, "order": 15, @@ -185,7 +185,7 @@ "type": 3, "subtype": 1, "name": "Log", - "uri": "{/base}/admin/module/log", + "uri": "{/base}/admin/module/log?id={?id}", "target": "self", "icon": null, "order": 20, diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php index 6beca4e..5b55015 100755 --- a/Admin/Routes/Web/Api.php +++ b/Admin/Routes/Web/Api.php @@ -250,7 +250,7 @@ return [ ], ], ], - '^.*/admin/account/localization(\?.*|$)' => [ + '^.*/admin/localization(\?.*|$)' => [ [ 'dest' => '\Modules\Admin\Controller\ApiController:apiSettingsAccountLocalizationSet', 'verb' => RouteVerb::SET, diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index 9a834cd..108a6ae 100755 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -53,9 +53,9 @@ return [ ], ], ], - '^/admin/account/settings(\?.*$|$)' => [ + '^/admin/account/view(\?.*$|$)' => [ [ - 'dest' => '\Modules\Admin\Controller\BackendController:viewAccountSettings', + 'dest' => '\Modules\Admin\Controller\BackendController:viewAccountView', 'verb' => RouteVerb::GET, 'active' => true, 'permission' => [ @@ -89,9 +89,9 @@ return [ ], ], ], - '^/admin/group/settings(\?.*$|$)' => [ + '^/admin/group/view(\?.*$|$)' => [ [ - 'dest' => '\Modules\Admin\Controller\BackendController:viewGroupSettings', + 'dest' => '\Modules\Admin\Controller\BackendController:viewGroupView', 'verb' => RouteVerb::GET, 'active' => true, 'permission' => [ diff --git a/Admin/Settings/Theme/Backend/settings.tpl.php b/Admin/Settings/Theme/Backend/settings.tpl.php index c54ad75..961bf83 100755 --- a/Admin/Settings/Theme/Backend/settings.tpl.php +++ b/Admin/Settings/Theme/Backend/settings.tpl.php @@ -12,30 +12,18 @@ */ declare(strict_types=1); +use Modules\Admin\Models\SettingsEnum; use Modules\Organization\Models\UnitMapper; use phpOMS\Application\ApplicationStatus; use phpOMS\Localization\NullLocalization; +use phpOMS\Message\Mail\SubmitType; use phpOMS\Uri\UriFactory; $generalSettings = $this->data['generalSettings'] ?? []; $settings = $this->data['settings'] ?? []; -$countryCodes = \phpOMS\Localization\ISO3166TwoEnum::getConstants(); -$countries = \phpOMS\Localization\ISO3166NameEnum::getConstants(); -$timezones = \phpOMS\Localization\TimeZoneEnumArray::getConstants(); -$timeformats = \phpOMS\Localization\ISO8601EnumArray::getConstants(); -$languages = \phpOMS\Localization\ISO639Enum::getConstants(); -$currencies = \phpOMS\Localization\ISO4217Enum::getConstants(); -$l11nDefinitions = \phpOMS\System\File\Local\Directory::list(__DIR__ . '/../../../../phpOMS/Localization/Defaults/Definitions'); - -$weights = \phpOMS\Utils\Converter\WeightType::getConstants(); -$speeds = \phpOMS\Utils\Converter\SpeedType::getConstants(); -$areas = \phpOMS\Utils\Converter\AreaType::getConstants(); -$lengths = \phpOMS\Utils\Converter\LengthType::getConstants(); -$volumes = \phpOMS\Utils\Converter\VolumeType::getConstants(); -$temperatures = \phpOMS\Utils\Converter\TemperatureType::getConstants(); - $serverModes = ApplicationStatus::getConstants(); +$mailServerModes = SubmitType::getConstants(); $l11n = $this->data['default_localization'] ?? new NullLocalization(); @@ -62,7 +50,7 @@ echo $this->data['nav']->render();
- where('id', 1)->execute(); ?>
- +
@@ -99,7 +99,7 @@ $temperatures = TemperatureType::getConstants();
-

getHtml('Timeformat'); ?>

+

getHtml('Timeformat'); ?>

@@ -152,9 +152,11 @@ $temperatures = TemperatureType::getConstants();
-

getHtml('Numberformat'); ?>

+

getHtml('Numberformat'); ?>

+
diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php index be2ed8c..5b2e3aa 100755 --- a/Theme/Backend/Lang/de.lang.php +++ b/Theme/Backend/Lang/de.lang.php @@ -150,6 +150,7 @@ return ['Admin' => [ 'ServerMode-3' => 'Deaktiviert', 'ServerStatus' => 'Serverstatus', 'Settings' => 'Einstellungen', + 'Setting' => 'Einstellung', 'SettingsGeneral' => 'Einstellungen - Allgemein', 'Short' => 'Kurz', 'Single' => 'Single', @@ -221,4 +222,12 @@ return ['Admin' => [ 'Contacts' => 'Kontakte', 'Subtype' => 'Untertyp', 'Content' => 'Inhalt', + 'OutServer' => 'Ausgangsserver', + 'OutPort' => 'Ausgangsport', + 'InServer' => 'Eingangsserver', + 'InPort' => 'Eingangsport', + 'EmailType' => 'Emailtyp', + 'EmailUsername' => 'Email Benutzername', + 'EmailPassword' => 'Email Password', + 'EmailAddress' => 'Email Adresse', ]]; diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index e2c515a..04e910b 100755 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -150,6 +150,7 @@ return ['Admin' => [ 'ServerMode-3' => 'Disabled', 'ServerStatus' => 'Server Status', 'Settings' => 'Settings', + 'Setting' => 'Setting', 'SettingsGeneral' => 'Settings - General', 'Short' => 'Short', 'Single' => 'Single', @@ -221,4 +222,12 @@ return ['Admin' => [ 'Contacts' => 'Contacts', 'Subtype' => 'Subtype', 'Content' => 'Content', + 'OutServer' => 'Out Server', + 'OutPort' => 'Out Port', + 'InServer' => 'In Server', + 'InPort' => 'In Port', + 'EmailType' => 'Email Type', + 'EmailUsername' => 'Email Username', + 'EmailPassword' => 'Email Password', + 'EmailAddress' => 'Email Address', ]]; diff --git a/Theme/Backend/accounts-create.tpl.php b/Theme/Backend/accounts-create.tpl.php index fe2fa8a..4ec3132 100755 --- a/Theme/Backend/accounts-create.tpl.php +++ b/Theme/Backend/accounts-create.tpl.php @@ -92,7 +92,7 @@ echo $this->data['nav']->render(); ?>
- +
diff --git a/Theme/Backend/accounts-list.tpl.php b/Theme/Backend/accounts-list.tpl.php index 12e88b6..a611d43 100755 --- a/Theme/Backend/accounts-list.tpl.php +++ b/Theme/Backend/accounts-list.tpl.php @@ -86,7 +86,7 @@ echo $this->data['nav']->render(); ?> $value) : ++$c; - $url = UriFactory::build('{/base}/admin/account/settings?{?}&id=' . $value->id); + $url = UriFactory::build('{/base}/admin/account/view?{?}&id=' . $value->id); $color = 'darkred'; if ($value->status === AccountStatus::ACTIVE) { $color = 'green'; } diff --git a/Theme/Backend/groups-create.tpl.php b/Theme/Backend/groups-create.tpl.php index d05be63..4510bc3 100755 --- a/Theme/Backend/groups-create.tpl.php +++ b/Theme/Backend/groups-create.tpl.php @@ -41,13 +41,13 @@ echo $this->data['nav']->render(); ?>
- getData('editor')->render('group-editor'); ?> + data['editor']->render('group-editor'); ?>
- getData('editor')->getData('text')->render('group-editor', 'description', 'fGroupCreate'); ?> + data['editor']->getData('text')->render('group-editor', 'description', 'fGroupCreate'); ?>
- +
diff --git a/Theme/Backend/groups-list.tpl.php b/Theme/Backend/groups-list.tpl.php index 0035010..80e7357 100755 --- a/Theme/Backend/groups-list.tpl.php +++ b/Theme/Backend/groups-list.tpl.php @@ -85,7 +85,7 @@ echo $this->data['nav']->render(); ?> $value) : ++$c; - $url = UriFactory::build('{/base}/admin/group/settings?{?}&id=' . $value->id); + $url = UriFactory::build('{/base}/admin/group/view?{?}&id=' . $value->id); $color = 'darkred'; if ($value->status === GroupStatus::ACTIVE) { $color = 'green'; } diff --git a/Theme/Backend/modules-settings.tpl.php b/Theme/Backend/modules-settings.tpl.php index 618117a..9cf6d49 100755 --- a/Theme/Backend/modules-settings.tpl.php +++ b/Theme/Backend/modules-settings.tpl.php @@ -23,121 +23,6 @@ if ($this->hasData('settingsTpl') && \is_file($this->getData('settingsTpl')) ) : include $this->data['settingsTpl']; -else : ?> -
-
-
-
getHtml('Settings'); ?>download
-
- - - - - $setting) : ++$count; - ?> - -
- getHtml('ID', '0', '0'); ?> - - - - getHtml('Name'); ?> - - - - getHtml('Value'); ?> - getHtml('Unit'); ?> - - - - getHtml('App'); ?> - - - - getHtml('Group'); ?> - - - - getHtml('Account'); ?> - - - -
settings - id; ?> - - name; - - if ($this->getData('settings_class') !== null) { - $name = $this->getData('settings_class')::getName($setting->name); - - if (!\is_string($name)) { - $name = $setting->name; - } - } - ?> - printHtml($name); ?> - printHtml($setting->content); ?> - printHtml((string) $setting->unit); ?> - printHtml((string) $setting->app); ?> - printHtml($setting->group); ?> - printHtml($setting->account); ?> - - -
getHtml('Empty', '0', '0'); ?> - -
-
-
-
-
- +else : + include __DIR__ . '/settings.tpl.php'; +endif; ?> diff --git a/Theme/Backend/settings-general.tpl.php b/Theme/Backend/settings-general.tpl.php deleted file mode 100755 index f58d936..0000000 --- a/Theme/Backend/settings-general.tpl.php +++ /dev/null @@ -1,777 +0,0 @@ -data['generalSettings'] ?? []; -$settings = $this->data['settings'] ?? []; - -$countryCodes = \phpOMS\Localization\ISO3166TwoEnum::getConstants(); -$countries = \phpOMS\Localization\ISO3166NameEnum::getConstants(); -$timezones = \phpOMS\Localization\TimeZoneEnumArray::getConstants(); -$timeformats = \phpOMS\Localization\ISO8601EnumArray::getConstants(); -$languages = \phpOMS\Localization\ISO639Enum::getConstants(); -$currencies = \phpOMS\Localization\ISO4217Enum::getConstants(); -$l11nDefinitions = \phpOMS\System\File\Local\Directory::list(__DIR__ . '/../../../../phpOMS/Localization/Defaults/Definitions'); - -$weights = \phpOMS\Utils\Converter\WeightType::getConstants(); -$speeds = \phpOMS\Utils\Converter\SpeedType::getConstants(); -$areas = \phpOMS\Utils\Converter\AreaType::getConstants(); -$lengths = \phpOMS\Utils\Converter\LengthType::getConstants(); -$volumes = \phpOMS\Utils\Converter\VolumeType::getConstants(); -$temperatures = \phpOMS\Utils\Converter\TemperatureType::getConstants(); - -$l11n = $this->data['default_localization'] ?? new NullLocalization(); -?> - -
-
- -
-
- request->uri->fragment === 'c-tab-1' ? ' checked' : ''; ?>> -
-
-
-
-
-
getHtml('Settings'); ?>
-
-
- - -
-
-
-
-
-
- -
-
-
-
getHtml('Security'); ?>
-
-
- - - -
- -
- - - -
- -
- - - -
- -
- - - -
- -
- - - -
- -
-
- -
-
-
-
- -
-
-
-
getHtml('Logging'); ?>
-
-
- -
- -
- - -
-
-
- -
-
-
-
-
-
- request->uri->fragment === 'c-tab-2' ? ' checked' : ''; ?>> -
-
-
-
-
-
getHtml('Localization'); ?>
-
-
- -
-
-
-
-
-
- -
- - -
- -
- - -
- -
- - -
-
-
- -
-
-
-
- -
-
-
getHtml('Time'); ?>
-
-
- - -
- -
- - -
- -

getHtml('Timeformat'); ?>

- -
- - -
- -
- - -
- -
- - -
- -
- - -
-
-
-
- -
-
-
getHtml('Numeric'); ?>
-
-
- - -
- -
- - -
- -

getHtml('Numberformat'); ?>

- -
-
- - -
- -
- - -
-
-
-
-
- -
-
-
getHtml('Precision'); ?>
-
-
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
-
-
-
- -
-
-
getHtml('Weight'); ?>
-
-
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
-
-
-
- -
-
-
getHtml('Speed'); ?>
-
-
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
-
-
-
- -
-
-
getHtml('Length'); ?>
-
-
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
-
-
-
- -
-
-
getHtml('Area'); ?>
-
-
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
-
-
-
- -
-
-
getHtml('Volume'); ?>
-
-
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
-
-
-
-
-
- request->uri->fragment === 'c-tab-3' ? ' checked' : ''; ?>> -
-
-
-
-
getHtml('Settings'); ?>download
-
- - - - - id . '&ptype=p'; - $nextSettings = empty($settings) ? 'admin/settings/general' : 'admin/settings/general?{?}&sid=' . \end($settings)->id . '&ptype=n'; - - foreach ($settings as $key => $setting) : ++$count; - ?> - -
- getHtml('ID', '0', '0'); ?> - - - - getHtml('Name'); ?> - - - - getHtml('Value'); ?> - getHtml('Module'); ?> - - - - getHtml('Group'); ?> - - - - getHtml('Account'); ?> - - - -
settings - id; ?> - printHtml($setting->name); ?> - printHtml($setting->content); ?> - printHtml($setting->module); ?> - printHtml($setting->group); ?> - printHtml($setting->account); ?> - - -
getHtml('Empty', '0', '0'); ?> - -
-
- -
-
-
-
- request->uri->fragment === 'c-tab-4' ? ' checked' : ''; ?>> -
-
-
-
-
getHtml('Images'); ?>
-
-
- -
- <?= $this->getHtml('LoginImage'); ?> - -
-
-
-
-
-
-
-
-
diff --git a/Theme/Backend/settings.tpl.php b/Theme/Backend/settings.tpl.php new file mode 100644 index 0000000..99eb032 --- /dev/null +++ b/Theme/Backend/settings.tpl.php @@ -0,0 +1,148 @@ + +
+
+
+
getHtml('Settings'); ?>download
+
+ + + + + + + $setting) : ++$count; + ?> + +
+ getHtml('ID', '0', '0'); ?> + + + + getHtml('Name'); ?> + + + + getHtml('Value'); ?> + getHtml('Unit'); ?> + + + + getHtml('App'); ?> + + + + getHtml('Group'); ?> + + + + getHtml('Account'); ?> + + + +
settings + id; ?> + + name; + + if ($this->getData('settings_class') !== null) { + $name = $this->getData('settings_class')::getName($setting->name); + + if (!\is_string($name)) { + $name = $setting->name; + } + } + ?> + printHtml($name); ?> + printHtml($setting->content); ?> + printHtml((string) $setting->unit); ?> + printHtml((string) $setting->app); ?> + printHtml($setting->group); ?> + printHtml($setting->account); ?> + + +
getHtml('Empty', '0', '0'); ?> + +
+
+
+
+
\ No newline at end of file