Make app,localization in url optional+tld+subdomain

This commit is contained in:
Dennis Eichhorn 2019-03-09 23:21:29 +01:00
parent bf542291f7
commit bb3fbb1146
7 changed files with 20 additions and 20 deletions

View File

@ -1,11 +1,11 @@
[ [
{ {
"id": 1007001001, "id": 1007001001,
"pid": "/backend", "pid": "/",
"type": 2, "type": 2,
"subtype": 1, "subtype": 1,
"name": "Exchange", "name": "Exchange",
"uri": "{/lang}/backend/admin/exchange/dashboard?{?}", "uri": "{/prefix}admin/exchange/dashboard?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 50, "order": 50,
@ -15,11 +15,11 @@
"children": [ "children": [
{ {
"id": 1007002001, "id": 1007002001,
"pid": "/backend/admin/exchange", "pid": "/admin/exchange",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Dashboard", "name": "Dashboard",
"uri": "{/lang}/backend/admin/exchange/dashboard?{?}", "uri": "{/prefix}admin/exchange/dashboard?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 1, "order": 1,
@ -30,11 +30,11 @@
}, },
{ {
"id": 1007002002, "id": 1007002002,
"pid": "/backend/admin/exchange", "pid": "/admin/exchange",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Import", "name": "Import",
"uri": "{/lang}/backend/admin/exchange/import/list?{?}", "uri": "{/prefix}admin/exchange/import/list?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 5, "order": 5,
@ -45,11 +45,11 @@
}, },
{ {
"id": 1007002003, "id": 1007002003,
"pid": "/backend/admin/exchange", "pid": "/admin/exchange",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Export", "name": "Export",
"uri": "{/lang}/backend/admin/exchange/export/list?{?}", "uri": "{/prefix}admin/exchange/export/list?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 10, "order": 10,

View File

@ -6,7 +6,7 @@ use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb; use phpOMS\Router\RouteVerb;
return [ return [
'^.*/api/admin/exchange/import/profile.*$' => [ '^.*/admin/exchange/import/profile.*$' => [
[ [
'dest' => '\Modules\Exchange\Controller\ApiController:apiExchangeImport', 'dest' => '\Modules\Exchange\Controller\ApiController:apiExchangeImport',
'verb' => RouteVerb::SET, 'verb' => RouteVerb::SET,
@ -17,7 +17,7 @@ return [
], ],
], ],
], ],
'^.*/api/admin/exchange/export/profile.*$' => [ '^.*/admin/exchange/export/profile.*$' => [
[ [
'dest' => '\Modules\Exchange\Controller\ApiController:apiExchangeExport', 'dest' => '\Modules\Exchange\Controller\ApiController:apiExchangeExport',
'verb' => RouteVerb::SET, 'verb' => RouteVerb::SET,

View File

@ -6,7 +6,7 @@ use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb; use phpOMS\Router\RouteVerb;
return [ return [
'^.*/backend/admin/exchange/import/list.*$' => [ '^.*/admin/exchange/import/list.*$' => [
[ [
'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeImportList', 'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeImportList',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -17,7 +17,7 @@ return [
], ],
], ],
], ],
'^.*/backend/admin/exchange/export/list.*$' => [ '^.*/admin/exchange/export/list.*$' => [
[ [
'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeExportList', 'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeExportList',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -28,7 +28,7 @@ return [
], ],
], ],
], ],
'^.*/backend/admin/exchange/import/profile.*$' => [ '^.*/admin/exchange/import/profile.*$' => [
[ [
'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeImport', 'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeImport',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -39,7 +39,7 @@ return [
], ],
], ],
], ],
'^.*/backend/admin/exchange/export/profile.*$' => [ '^.*/admin/exchange/export/profile.*$' => [
[ [
'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeExport', 'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeExport',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -50,7 +50,7 @@ return [
], ],
], ],
], ],
'^.*/backend/admin/exchange/dashboard.*$' => [ '^.*/admin/exchange/dashboard.*$' => [
[ [
'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeDashboard', 'dest' => '\Modules\Exchange\Controller\BackendController:viewExchangeDashboard',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,

View File

@ -4,7 +4,7 @@
<header><h1><?= $this->getHtml('Import') ?> - GSD</h1></header> <header><h1><?= $this->getHtml('Import') ?> - GSD</h1></header>
<div class="inner"> <div class="inner">
<form id="fImport" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/admin/exchange/import/profile?{?}&exchange=GSD&csrf={$CSRF}'); ?>"> <form id="fImport" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('{/api}admin/exchange/import/profile?{?}&exchange=GSD&csrf={$CSRF}'); ?>">
<table class="layout wf-100" style="table-layout: fixed"> <table class="layout wf-100" style="table-layout: fixed">
<tbody> <tbody>
<tr><td><label for="iHost"><?= $this->getHtml('Host') ?></label> <tr><td><label for="iHost"><?= $this->getHtml('Host') ?></label>

View File

@ -28,7 +28,7 @@ echo $this->getData('nav')->render();
<td class="wf-100"><?= $this->getHtml('Title') ?> <td class="wf-100"><?= $this->getHtml('Title') ?>
<tbody> <tbody>
<?php $count = 0; foreach ($interfaces as $key => $value) : ++$count; <?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('{/prefix}admin/exchange/export/profile?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>"> <tr data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Title') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a> <td data-label="<?= $this->getHtml('Title') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<?php endforeach; ?> <?php endforeach; ?>

View File

@ -28,7 +28,7 @@ echo $this->getData('nav')->render();
<td class="wf-100"><?= $this->getHtml('Title') ?> <td class="wf-100"><?= $this->getHtml('Title') ?>
<tbody> <tbody>
<?php $count = 0; foreach ($interfaces as $key => $value) : ++$count; <?php $count = 0; foreach ($interfaces as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/admin/exchange/import/profile?{?}&id=' . $value->getId()); ?> $url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/exchange/import/profile?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>"> <tr data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Title') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a> <td data-label="<?= $this->getHtml('Title') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<?php endforeach; ?> <?php endforeach; ?>

View File

@ -25,7 +25,7 @@
"load": [ "load": [
{ {
"pid": [ "pid": [
"/backend" "/"
], ],
"type": 5, "type": 5,
"from": "Exchange", "from": "Exchange",
@ -34,7 +34,7 @@
}, },
{ {
"pid": [ "pid": [
"/backend/admin/exchange" "/admin/exchange"
], ],
"type": 4, "type": 4,
"for": "Content", "for": "Content",