mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-01-27 04:28:41 +00:00
fix bugs
This commit is contained in:
parent
9e911e099c
commit
c3e7dc2106
|
|
@ -19,7 +19,7 @@
|
|||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "Groups",
|
||||
"uri": "{/base}/admin/group/list?{?}",
|
||||
"uri": "{/base}/admin/group/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 2,
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "List",
|
||||
"uri": "{/base}/admin/group/list?{?}",
|
||||
"uri": "{/base}/admin/group/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "Create",
|
||||
"uri": "{/base}/admin/group/create?{?}",
|
||||
"uri": "{/base}/admin/group/create",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 5,
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "Accounts",
|
||||
"uri": "{/base}/admin/account/list?{?}",
|
||||
"uri": "{/base}/admin/account/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 4,
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "List",
|
||||
"uri": "{/base}/admin/account/list?{?}",
|
||||
"uri": "{/base}/admin/account/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "Create",
|
||||
"uri": "{/base}/admin/account/create?{?}",
|
||||
"uri": "{/base}/admin/account/create",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 5,
|
||||
|
|
@ -111,7 +111,7 @@
|
|||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "Modules",
|
||||
"uri": "{/base}/admin/module/list?{?}",
|
||||
"uri": "{/base}/admin/module/list",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 6,
|
||||
|
|
@ -125,7 +125,7 @@
|
|||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "Info",
|
||||
"uri": "{/base}/admin/module/info?{?}",
|
||||
"uri": "{/base}/admin/module/info",
|
||||
"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",
|
||||
"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",
|
||||
"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",
|
||||
"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",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 20,
|
||||
|
|
|
|||
|
|
@ -1045,14 +1045,12 @@ final class ApiController extends Controller
|
|||
*/
|
||||
public function apiSettingsDesignSet(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void
|
||||
{
|
||||
$uploadedFiles = $request->files;
|
||||
|
||||
if (!empty($uploadedFiles)) {
|
||||
if (!empty($request->files)) {
|
||||
$upload = new UploadFile();
|
||||
$upload->preserveFileName = false;
|
||||
$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, []);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ use Modules\Admin\Models\ModuleMapper;
|
|||
use Modules\Admin\Models\SettingsEnum;
|
||||
use Modules\Auditor\Models\AuditMapper;
|
||||
use Modules\Organization\Models\UnitMapper;
|
||||
use phpOMS\Asset\AssetType;
|
||||
use phpOMS\Autoloader;
|
||||
use phpOMS\Contract\RenderableInterface;
|
||||
use phpOMS\DataStorage\Database\Query\OrderType;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
declare(strict_types=1);
|
||||
|
||||
use Modules\Admin\Models\ModuleStatusUpdateType;
|
||||
use phpOMS\Module\ModuleInfo;
|
||||
use phpOMS\Uri\UriFactory;
|
||||
|
||||
/**
|
||||
|
|
@ -23,31 +24,35 @@ $active = $this->data['active'];
|
|||
$installed = $this->data['installed'];
|
||||
$id = $this->data['id'];
|
||||
|
||||
$module = $modules[$id] ?? new ModuleInfo('');
|
||||
|
||||
if (isset($installed[$id])) {
|
||||
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="col-xs-12 col-md-6 col-lg-4">
|
||||
<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">
|
||||
<table class="list wf-100">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('Name'); ?>
|
||||
<td><?= $this->printHtml($modules[$id]->getExternalName()); ?>
|
||||
<td><?= $this->printHtml($module->getExternalName()); ?>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('Version'); ?>
|
||||
<td><?= $this->printHtml($modules[$id]->getVersion()); ?>
|
||||
<td><?= $this->printHtml($module->getVersion()); ?>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('CreatedBy'); ?>
|
||||
<td><?= $this->printHtml($modules[$id]->get()['creator']['name']); ?>
|
||||
<td><?= $this->printHtml($module->get()['creator']['name'] ?? ''); ?>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('Website'); ?>
|
||||
<td><?= $this->printHtml($modules[$id]->get()['creator']['website']); ?>
|
||||
<td><?= $this->printHtml($module->get()['creator']['website'] ?? ''); ?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="portlet-foot">
|
||||
|
|
@ -68,7 +73,7 @@ if (isset($installed[$id])) {
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php elseif (isset($modules[$id])) : ?>
|
||||
<?php elseif (isset($module)) : ?>
|
||||
<div class="ipt-wrap">
|
||||
<div class="ipt-first">
|
||||
<form id="fModuleInstall" action="<?= UriFactory::build('{/api}admin/module/status?module=' . $id . '&csrf={$CSRF}'); ?>" method="POST">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user