Fix absolute path to relative paths

This commit is contained in:
Dennis Eichhorn 2019-02-11 11:38:15 +01:00
parent 4e6b7f0cac
commit d252a78f97
11 changed files with 33 additions and 33 deletions

View File

@ -19,7 +19,7 @@
"type": 2,
"subtype": 1,
"name": "General",
"uri": "/{/lang}/backend/admin/settings/general?{?}",
"uri": "{/lang}/backend/admin/settings/general?{?}",
"target": "self",
"icon": null,
"order": 1,
@ -34,7 +34,7 @@
"type": 2,
"subtype": 1,
"name": "Groups",
"uri": "/{/lang}/backend/admin/group/list?{?}",
"uri": "{/lang}/backend/admin/group/list?{?}",
"target": "self",
"icon": null,
"order": 2,
@ -48,7 +48,7 @@
"type": 3,
"subtype": 1,
"name": "List",
"uri": "/{/lang}/backend/admin/group/list?{?}",
"uri": "{/lang}/backend/admin/group/list?{?}",
"target": "self",
"icon": null,
"order": 1,
@ -63,7 +63,7 @@
"type": 3,
"subtype": 1,
"name": "Create",
"uri": "/{/lang}/backend/admin/group/create?{?}",
"uri": "{/lang}/backend/admin/group/create?{?}",
"target": "self",
"icon": null,
"order": 5,
@ -80,7 +80,7 @@
"type": 2,
"subtype": 1,
"name": "Accounts",
"uri": "/{/lang}/backend/admin/account/list?{?}",
"uri": "{/lang}/backend/admin/account/list?{?}",
"target": "self",
"icon": null,
"order": 3,
@ -94,7 +94,7 @@
"type": 3,
"subtype": 1,
"name": "List",
"uri": "/{/lang}/backend/admin/account/list?{?}",
"uri": "{/lang}/backend/admin/account/list?{?}",
"target": "self",
"icon": null,
"order": 1,
@ -109,7 +109,7 @@
"type": 3,
"subtype": 1,
"name": "Create",
"uri": "/{/lang}/backend/admin/account/create?{?}",
"uri": "{/lang}/backend/admin/account/create?{?}",
"target": "self",
"icon": null,
"order": 5,
@ -126,7 +126,7 @@
"type": 2,
"subtype": 1,
"name": "Modules",
"uri": "/{/lang}/backend/admin/module/list?{?}",
"uri": "{/lang}/backend/admin/module/list?{?}",
"target": "self",
"icon": null,
"order": 4,
@ -140,7 +140,7 @@
"type": 3,
"subtype": 1,
"name": "Settings",
"uri": "/{/lang}/backend/admin/module/setting?{?}",
"uri": "{/lang}/backend/admin/module/setting?{?}",
"target": "self",
"icon": null,
"order": 4,

View File

@ -5,9 +5,9 @@
{
"key": 1, "listener": "click", "action": [
{"key": 1, "type": "dom.popup", "selector": "#group-selector-tpl", "aniIn": "fadeIn", "id": "<?= $this->printHtml($this->getId()); ?>"},
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/group?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/group?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
{"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1},
{"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/group?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
{"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/group?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
{"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}
]
}

View File

@ -21,7 +21,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box wf-100">
<header><h1><?= $this->getHtml('Account'); ?></h1></header>
<div class="inner">
<form id="fAccount" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/account'); ?>" method="put">
<form id="fAccount" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/account'); ?>" method="put">
<table class="layout wf-100">
<tbody>
<tr><td><label for="iType"><?= $this->getHtml('Type'); ?></label>

View File

@ -34,7 +34,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td colspan="5">
<tbody>
<?php $c = 0; foreach ($this->getData('list:elements') as $key => $value) : $c++;
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/account/settings?{?}&id=' . $value->getId());
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/admin/account/settings?{?}&id=' . $value->getId());
$color = 'darkred';
if ($value->getStatus() === AccountStatus::ACTIVE) { $color = 'green'; }
elseif ($value->getStatus() === AccountStatus::INACTIVE) { $color = 'darkblue'; }

View File

@ -28,7 +28,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box wf-100">
<header><h1><?= $this->getHtml('Account'); ?></h1></header>
<div class="inner">
<form id="account-edit" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/account'); ?>" method="post">
<form id="account-edit" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/account'); ?>" method="post">
<table class="layout wf-100">
<tbody>
<tr><td><label for="iId"><?= $this->getHtml('ID', 0, 0); ?></label>
@ -103,7 +103,7 @@ echo $this->getData('nav')->render(); ?>
<td class="wf-100"><?= $this->getHtml('Name') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<tbody>
<?php $c = 0; $groups = $account->getGroups(); foreach ($groups 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()); ?>
<tr data-href="<?= $url; ?>">
<td><a href="#"><i class="fa fa-times"></i></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
@ -117,7 +117,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box wf-100">
<header><h1><?= $this->getHtml('Groups'); ?></h1></header>
<div class="inner">
<form id="iAddGroupToAccount" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/account/group'); ?>" method="put">
<form id="iAddGroupToAccount" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/account/group'); ?>" method="put">
<table class="layout wf-100">
<tbody>
<tr><td><label for="iGroup"><?= $this->getHtml('Name'); ?></label>
@ -173,7 +173,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box wf-100">
<header><h1><?= $this->getHtml('Permissions'); ?></h1></header>
<div class="inner">
<form id="fAccountAddPermission" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/account/permission'); ?>" method="put">
<form id="fAccountAddPermission" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/account/permission'); ?>" method="put">
<table class="layout wf-100">
<tbody>
<tr><td><label for="iPermissionUnit"><?= $this->getHtml('Unit'); ?></label>

View File

@ -21,7 +21,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box wf-100">
<header><h1><?= $this->getHtml('Group'); ?></h1></header>
<div class="inner">
<form id="fGroupCreate" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/group'); ?>" method="put">
<form id="fGroupCreate" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/group'); ?>" method="put">
<table class="layout wf-100" style="table-layout: fixed">
<tbody>
<tr><td><label for="iStatus"><?= $this->getHtml('Status'); ?></label>

View File

@ -30,7 +30,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td colspan="5">
<tbody>
<?php $c = 0; foreach ($this->getData('list:elements') 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());
$color = 'darkred';
if ($value->getStatus() === \phpOMS\Account\GroupStatus::ACTIVE) { $color = 'green'; }
elseif ($value->getStatus() === \phpOMS\Account\GroupStatus::INACTIVE) { $color = 'darkblue'; }

View File

@ -35,7 +35,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box wf-100">
<header><h1><?= $this->getHtml('Group'); ?></h1></header>
<div class="inner">
<form id="fGroupEdit" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/group'); ?>" method="post">
<form id="fGroupEdit" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/group'); ?>" method="post">
<table class="layout wf-100" style="table-layout: fixed">
<tbody>
<tr><td><label for="iGid"><?= $this->getHtml('ID', 0, 0); ?></label>
@ -68,7 +68,7 @@ echo $this->getData('nav')->render(); ?>
<?php $c = 0; foreach ($accounts as $key => $value) : $c++; ?>
<tr>
<td><a href="#"><i class="fa fa-times"></i></a>
<td><a href="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/account/settings?{?}&id=' . $value->getId()) ?>"><?= $value->getName1(); ?></a>
<td><a href="<?= \phpOMS\Uri\UriFactory::build('{/lang}/backend/admin/account/settings?{?}&id=' . $value->getId()) ?>"><?= $value->getName1(); ?></a>
<?php endforeach; ?>
<?php if ($c === 0) : ?>
<tr><td colspan="2" class="empty"><?= $this->getHtml('Empty', 0, 0); ?>
@ -78,7 +78,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box wf-100">
<header><h1><?= $this->getHtml('Accounts'); ?></h1></header>
<div class="inner">
<form id="iAddAccountToGroup" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/group/account'); ?>" method="put">
<form id="iAddAccountToGroup" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/group/account'); ?>" method="put">
<table class="layout wf-100">
<tbody>
<tr><td><label for="iGParentName"><?= $this->getHtml('Name'); ?></label>
@ -134,7 +134,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box wf-100">
<header><h1><?= $this->getHtml('Permissions'); ?></h1></header>
<div class="inner">
<form id="fGroupAddPermission" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/group/permission'); ?>" method="put">
<form id="fGroupAddPermission" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/group/permission'); ?>" method="put">
<table class="layout wf-100">
<tbody>
<tr><td><label for="iPermissionUnit"><?= $this->getHtml('Unit'); ?></label>

View File

@ -37,7 +37,7 @@ $installed = $this->app->moduleManager->getInstalledModules();
<td colspan="4">
<tbody>
<?php $count = 0; foreach ($modules as $key => $module) : $count++;
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/module/settings?{?}&id=' . $module['name']['internal']);
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/admin/module/settings?{?}&id=' . $module['name']['internal']);
if (isset($active[$module['name']['internal']])) { $status = ModuleStatus::ACTIVE; }
elseif (isset($installed[$module['name']['internal']])) { $status = ModuleStatus::INACTIVE; }
else { $status = ModuleStatus::AVAILABLE; }

View File

@ -54,21 +54,21 @@ if ($nav !== null) {
<tr>
<td colspan="2">
<?php if (isset($active[$id])) : ?>
<form id="fModuleDeactivate" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/module/status?module=' . $id); ?>" method="POST">
<form id="fModuleDeactivate" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/module/status?module=' . $id); ?>" method="POST">
<button id="fModuleDeactivateButton" name="status" type="submit" value="<?= ModuleStatusUpdateType::DEACTIVATE ?>"><?= $this->getHtml('Deactivate'); ?></button>
</form>
<?php elseif (isset($installed[$id])) : ?>
<form id="fModuleUninstall" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/module/status?module=' . $id); ?>" method="POST">
<form id="fModuleUninstall" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/module/status?module=' . $id); ?>" method="POST">
<button id="fModuleUninstallButton" name="status" type="submit" value="<?= ModuleStatusUpdateType::UNINSTALL ?>"><?= $this->getHtml('Uninstall'); ?></button>
</form>
<form id="fModuleActivate" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/module/status?module=' . $id); ?>" method="POST">
<form id="fModuleActivate" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/module/status?module=' . $id); ?>" method="POST">
<button id="fModuleActivateButton" name="status" type="submit" value="<?= ModuleStatusUpdateType::ACTIVATE ?>"><?= $this->getHtml('Activate'); ?></button>
</form>
<?php elseif (isset($modules[$id])) : ?>
<form id="fModuleInstall" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/module/status?module=' . $id); ?>" method="POST">
<form id="fModuleInstall" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/module/status?module=' . $id); ?>" method="POST">
<button id="fModuleInstallButton" name="status" type="submit" value="<?= ModuleStatusUpdateType::INSTALL ?>"><?= $this->getHtml('Install'); ?></button>
</form>
<form id="fModuleDelete" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/module/status?module=' . $id); ?>" method="POST">
<form id="fModuleDelete" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/module/status?module=' . $id); ?>" method="POST">
<button id="fModuleDeleteButton" name="status" type="submit" value="<?= ModuleStatusUpdateType::DELETE ?>"><?= $this->getHtml('Delete'); ?></button>
</form>
<?php endif; ?>

View File

@ -46,7 +46,7 @@ $temperatures = \phpOMS\Utils\Converter\TemperatureType::getConstants();
<section class="box wf-100">
<header><h1><?= $this->getHtml('Settings'); ?></h1></header>
<div class="inner">
<form id="iGeneralSettings" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/settings/general'); ?>" method="post">
<form id="iGeneralSettings" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/settings/general'); ?>" method="post">
<table class="layout wf-100">
<tbody>
<tr><td><label for="iOname"><?= $this->getHtml('OrganizationName'); ?></label>
@ -62,7 +62,7 @@ $temperatures = \phpOMS\Utils\Converter\TemperatureType::getConstants();
<section class="box wf-100">
<header><h1><?= $this->getHtml('Security'); ?></h1></header>
<div class="inner">
<form id="iSecuritySettings" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/settings/general'); ?>" method="post">
<form id="iSecuritySettings" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/settings/general'); ?>" method="post">
<table class="layout wf-100">
<tbody>
<tr><td>
@ -96,7 +96,7 @@ $temperatures = \phpOMS\Utils\Converter\TemperatureType::getConstants();
<section class="box wf-100">
<header><h1><?= $this->getHtml('Logging'); ?></h1></header>
<div class="inner">
<form id="iLoggingSettings" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/settings/general'); ?>" method="post">
<form id="iLoggingSettings" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/settings/general'); ?>" method="post">
<table class="layout wf-100">
<tbody>
<tr><td>
@ -121,7 +121,7 @@ $temperatures = \phpOMS\Utils\Converter\TemperatureType::getConstants();
<section class="box wf-100">
<header><h1><?= $this->getHtml('Localization'); ?></h1></header>
<div class="inner">
<form id="fLocalization" name="fLocalization" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/admin/settings/localization'); ?>" method="post">
<form id="fLocalization" name="fLocalization" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/settings/localization'); ?>" method="post">
<table class="layout wf-100">
<tbody>
<tr><td><label for="iDefaultLocalizations"><?= $this->getHtml('Defaults'); ?></label>