mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-02-14 19:48:41 +00:00
fix bugs
This commit is contained in:
parent
9e911e099c
commit
c3e7dc2106
|
|
@ -19,7 +19,7 @@
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Groups",
|
"name": "Groups",
|
||||||
"uri": "{/base}/admin/group/list?{?}",
|
"uri": "{/base}/admin/group/list",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 2,
|
"order": 2,
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
"type": 3,
|
"type": 3,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "List",
|
"name": "List",
|
||||||
"uri": "{/base}/admin/group/list?{?}",
|
"uri": "{/base}/admin/group/list",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 1,
|
"order": 1,
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
"type": 3,
|
"type": 3,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Create",
|
"name": "Create",
|
||||||
"uri": "{/base}/admin/group/create?{?}",
|
"uri": "{/base}/admin/group/create",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 5,
|
"order": 5,
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Accounts",
|
"name": "Accounts",
|
||||||
"uri": "{/base}/admin/account/list?{?}",
|
"uri": "{/base}/admin/account/list",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 4,
|
"order": 4,
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
"type": 3,
|
"type": 3,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "List",
|
"name": "List",
|
||||||
"uri": "{/base}/admin/account/list?{?}",
|
"uri": "{/base}/admin/account/list",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 1,
|
"order": 1,
|
||||||
|
|
@ -94,7 +94,7 @@
|
||||||
"type": 3,
|
"type": 3,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Create",
|
"name": "Create",
|
||||||
"uri": "{/base}/admin/account/create?{?}",
|
"uri": "{/base}/admin/account/create",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 5,
|
"order": 5,
|
||||||
|
|
@ -111,7 +111,7 @@
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Modules",
|
"name": "Modules",
|
||||||
"uri": "{/base}/admin/module/list?{?}",
|
"uri": "{/base}/admin/module/list",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 6,
|
"order": 6,
|
||||||
|
|
@ -125,7 +125,7 @@
|
||||||
"type": 3,
|
"type": 3,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Info",
|
"name": "Info",
|
||||||
"uri": "{/base}/admin/module/info?{?}",
|
"uri": "{/base}/admin/module/info",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 1,
|
"order": 1,
|
||||||
|
|
@ -140,7 +140,7 @@
|
||||||
"type": 3,
|
"type": 3,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Settings",
|
"name": "Settings",
|
||||||
"uri": "{/base}/admin/module/settings?{?}",
|
"uri": "{/base}/admin/module/settings",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 5,
|
"order": 5,
|
||||||
|
|
@ -155,7 +155,7 @@
|
||||||
"type": 3,
|
"type": 3,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Routes",
|
"name": "Routes",
|
||||||
"uri": "{/base}/admin/module/route/list?{?}",
|
"uri": "{/base}/admin/module/route/list",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 15,
|
"order": 15,
|
||||||
|
|
@ -170,7 +170,7 @@
|
||||||
"type": 3,
|
"type": 3,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Hooks",
|
"name": "Hooks",
|
||||||
"uri": "{/base}/admin/module/hook/list?{?}",
|
"uri": "{/base}/admin/module/hook/list",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 15,
|
"order": 15,
|
||||||
|
|
@ -185,7 +185,7 @@
|
||||||
"type": 3,
|
"type": 3,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Log",
|
"name": "Log",
|
||||||
"uri": "{/base}/admin/module/log?{?}",
|
"uri": "{/base}/admin/module/log",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 20,
|
"order": 20,
|
||||||
|
|
|
||||||
|
|
@ -1045,14 +1045,12 @@ final class ApiController extends Controller
|
||||||
*/
|
*/
|
||||||
public function apiSettingsDesignSet(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
|
public function apiSettingsDesignSet(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
|
||||||
{
|
{
|
||||||
$uploadedFiles = $request->files;
|
if (!empty($request->files)) {
|
||||||
|
|
||||||
if (!empty($uploadedFiles)) {
|
|
||||||
$upload = new UploadFile();
|
$upload = new UploadFile();
|
||||||
$upload->preserveFileName = false;
|
$upload->preserveFileName = false;
|
||||||
$upload->outputDir = __DIR__ . '/../../../Web/Backend/img';
|
$upload->outputDir = __DIR__ . '/../../../Web/Backend/img';
|
||||||
|
|
||||||
$status = $upload->upload($uploadedFiles, ['logo.png'], true);
|
$status = $upload->upload($request->files, ['logo.png'], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->createStandardUpdateResponse($request, $response, []);
|
$this->createStandardUpdateResponse($request, $response, []);
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ use Modules\Admin\Models\ModuleMapper;
|
||||||
use Modules\Admin\Models\SettingsEnum;
|
use Modules\Admin\Models\SettingsEnum;
|
||||||
use Modules\Auditor\Models\AuditMapper;
|
use Modules\Auditor\Models\AuditMapper;
|
||||||
use Modules\Organization\Models\UnitMapper;
|
use Modules\Organization\Models\UnitMapper;
|
||||||
use phpOMS\Asset\AssetType;
|
|
||||||
use phpOMS\Autoloader;
|
use phpOMS\Autoloader;
|
||||||
use phpOMS\Contract\RenderableInterface;
|
use phpOMS\Contract\RenderableInterface;
|
||||||
use phpOMS\DataStorage\Database\Query\OrderType;
|
use phpOMS\DataStorage\Database\Query\OrderType;
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use Modules\Admin\Models\ModuleStatusUpdateType;
|
use Modules\Admin\Models\ModuleStatusUpdateType;
|
||||||
|
use phpOMS\Module\ModuleInfo;
|
||||||
use phpOMS\Uri\UriFactory;
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -23,31 +24,35 @@ $active = $this->data['active'];
|
||||||
$installed = $this->data['installed'];
|
$installed = $this->data['installed'];
|
||||||
$id = $this->data['id'];
|
$id = $this->data['id'];
|
||||||
|
|
||||||
|
$module = $modules[$id] ?? new ModuleInfo('');
|
||||||
|
|
||||||
if (isset($installed[$id])) {
|
if (isset($installed[$id])) {
|
||||||
echo $this->data['nav']->render();
|
echo $this->data['nav']->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @todo If no id is specified in the url this page looks horrible. Either clean up or return 404 page or something similar.
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-md-6 col-lg-4">
|
<div class="col-xs-12 col-md-6 col-lg-4">
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
<div class="portlet-head"><?= $this->printHtml($modules[$id]->getExternalName()); ?></div>
|
<div class="portlet-head"><?= $this->printHtml($module->getExternalName()); ?></div>
|
||||||
|
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<table class="list wf-100">
|
<table class="list wf-100">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->getHtml('Name'); ?>
|
<td><?= $this->getHtml('Name'); ?>
|
||||||
<td><?= $this->printHtml($modules[$id]->getExternalName()); ?>
|
<td><?= $this->printHtml($module->getExternalName()); ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->getHtml('Version'); ?>
|
<td><?= $this->getHtml('Version'); ?>
|
||||||
<td><?= $this->printHtml($modules[$id]->getVersion()); ?>
|
<td><?= $this->printHtml($module->getVersion()); ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->getHtml('CreatedBy'); ?>
|
<td><?= $this->getHtml('CreatedBy'); ?>
|
||||||
<td><?= $this->printHtml($modules[$id]->get()['creator']['name']); ?>
|
<td><?= $this->printHtml($module->get()['creator']['name'] ?? ''); ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $this->getHtml('Website'); ?>
|
<td><?= $this->getHtml('Website'); ?>
|
||||||
<td><?= $this->printHtml($modules[$id]->get()['creator']['website']); ?>
|
<td><?= $this->printHtml($module->get()['creator']['website'] ?? ''); ?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-foot">
|
<div class="portlet-foot">
|
||||||
|
|
@ -68,7 +73,7 @@ if (isset($installed[$id])) {
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php elseif (isset($modules[$id])) : ?>
|
<?php elseif (isset($module)) : ?>
|
||||||
<div class="ipt-wrap">
|
<div class="ipt-wrap">
|
||||||
<div class="ipt-first">
|
<div class="ipt-first">
|
||||||
<form id="fModuleInstall" action="<?= UriFactory::build('{/api}admin/module/status?module=' . $id . '&csrf={$CSRF}'); ?>" method="POST">
|
<form id="fModuleInstall" action="<?= UriFactory::build('{/api}admin/module/status?module=' . $id . '&csrf={$CSRF}'); ?>" method="POST">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user