mirror of
https://github.com/Karaka-Management/oms-Exchange.git
synced 2026-02-04 20:18:40 +00:00
Use root namespace
This commit is contained in:
parent
0bd61648b0
commit
58377a15b4
|
|
@ -38,7 +38,7 @@ class Navigation
|
|||
*/
|
||||
public static function install(string $path = null, DatabasePool $dbPool = null) : void
|
||||
{
|
||||
$navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true);
|
||||
$navData = \json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true);
|
||||
|
||||
$class = '\\Modules\\Navigation\\Admin\\Installer';
|
||||
/** @var $class \Modules\Navigation\Admin\Installer */
|
||||
|
|
|
|||
|
|
@ -151,6 +151,10 @@ final class Controller extends ModuleAbstract implements WebInterface
|
|||
$view->setTemplate('/Modules/Exchange/Theme/Backend/exchange-import');
|
||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1007001001, $request, $response));
|
||||
|
||||
$interface = InterfaceManagerMapper::get((int) $request->getData('id'));
|
||||
|
||||
$view->addData('interface', $interface);
|
||||
|
||||
return $view;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ final class GSDCostCenterMapper extends DataMapperAbstract
|
|||
/**
|
||||
* Columns.
|
||||
*
|
||||
* @var array
|
||||
* @var array<string, array<string, string>>
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $columns = [
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ final class GSDCostObjectMapper extends DataMapperAbstract
|
|||
/**
|
||||
* Columns.
|
||||
*
|
||||
* @var array
|
||||
* @var array<string, array<string, string>>
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $columns = [
|
||||
|
|
|
|||
15
Interfaces/GSD/import.tpl.php
Normal file
15
Interfaces/GSD/import.tpl.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Task') ?></h1></header>
|
||||
|
||||
<div class="inner">
|
||||
<form id="fTask" method="PUT" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/task?{?}&csrf={$CSRF}'); ?>">
|
||||
<table class="layout wf-100" style="table-layout: fixed">
|
||||
<tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -3,6 +3,6 @@
|
|||
"version": "1.0.0",
|
||||
"website": "",
|
||||
"path": "GSD",
|
||||
"export": true,
|
||||
"import": false
|
||||
"export": false,
|
||||
"import": true
|
||||
}
|
||||
|
|
@ -3,6 +3,6 @@
|
|||
"version": "1.0.0",
|
||||
"website": "",
|
||||
"path": "Intrexx",
|
||||
"export": true,
|
||||
"import": false
|
||||
"export": false,
|
||||
"import": true
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ final class InterfaceManager
|
|||
/**
|
||||
* Info data.
|
||||
*
|
||||
* @var array
|
||||
* @var array<string, mixed>
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $info = [];
|
||||
|
|
@ -89,6 +89,18 @@ final class InterfaceManager
|
|||
return $this->path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get info path
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getInterfacePath() : string
|
||||
{
|
||||
return $this->info['path'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get info name
|
||||
*
|
||||
|
|
@ -136,11 +148,11 @@ final class InterfaceManager
|
|||
*/
|
||||
public function load() : void
|
||||
{
|
||||
if (!file_exists($this->path)) {
|
||||
if (!\file_exists($this->path)) {
|
||||
throw new PathException($this->path);
|
||||
}
|
||||
|
||||
$this->info = json_decode(file_get_contents($this->path), true);
|
||||
$this->info = \json_decode(file_get_contents($this->path), true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -152,11 +164,11 @@ final class InterfaceManager
|
|||
*/
|
||||
public function update() : void
|
||||
{
|
||||
if (!file_exists($this->path)) {
|
||||
if (!\file_exists($this->path)) {
|
||||
throw new PathException($this->path);
|
||||
}
|
||||
|
||||
file_put_contents($this->path, json_encode($this->info, JSON_PRETTY_PRINT));
|
||||
\file_put_contents($this->path, \json_encode($this->info, JSON_PRETTY_PRINT));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -182,7 +194,7 @@ final class InterfaceManager
|
|||
/**
|
||||
* Get info data.
|
||||
*
|
||||
* @return array
|
||||
* @return array<string, mixed>
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class InterfaceManagerMapper extends DataMapperAbstract
|
|||
/**
|
||||
* Columns.
|
||||
*
|
||||
* @var array
|
||||
* @var array<string, array<string, string>>
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $columns = [
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ echo $this->getData('nav')->render();
|
|||
<td class="wf-100"><?= $this->getHtml('Title') ?>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach ($interfaces as $key => $value) : $count++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/exchange/export/profile?{?}&id=' . $value->getId()); ?>
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/admin/exchange/import/profile?{?}&id=' . $value->getId()); ?>
|
||||
<tr data-href="<?= $url; ?>">
|
||||
<td data-label="<?= $this->getHtml('Title') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
|||
|
|
@ -14,4 +14,6 @@
|
|||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
echo $this->getData('nav')->render();
|
||||
|
||||
include __DIR__ . '/../../Interfaces/' . $this->getData('interface')->getInterfacePath() . '/import.tpl.php';
|
||||
Loading…
Reference in New Issue
Block a user