Make app,localization in url optional+tld+subdomain

This commit is contained in:
Dennis Eichhorn 2019-03-09 23:21:29 +01:00
parent 50a2fbfc0a
commit ea402015ba
6 changed files with 20 additions and 20 deletions

View File

@ -1,7 +1,7 @@
[
{
"id": 1002401001,
"pid": "/backend",
"pid": "/",
"type": 2,
"subtype": 0,
"name": "HumanResourceManagement",
@ -15,11 +15,11 @@
"children": [
{
"id": 1002402001,
"pid": "/backend",
"pid": "/",
"type": 2,
"subtype": 1,
"name": "Employees",
"uri": "{/lang}/backend/hr/staff/list?{?}",
"uri": "{/prefix}hr/staff/list?{?}",
"target": "self",
"icon": null,
"order": 1,
@ -29,11 +29,11 @@
"children": [
{
"id": 1002402101,
"pid": "/backend/hr/staff",
"pid": "/hr/staff",
"type": 3,
"subtype": 1,
"name": "List",
"uri": "{/lang}/backend/hr/staff/list?{?}",
"uri": "{/prefix}hr/staff/list?{?}",
"target": "self",
"icon": null,
"order": 1,
@ -45,11 +45,11 @@
},
{
"id": 1002402201,
"pid": "/backend/hr/staff",
"pid": "/hr/staff",
"type": 3,
"subtype": 1,
"name": "Create",
"uri": "{/lang}/backend/hr/staff/create?{?}",
"uri": "{/prefix}hr/staff/create?{?}",
"target": "self",
"icon": null,
"order": 5,
@ -63,11 +63,11 @@
},
{
"id": 1002403001,
"pid": "/backend",
"pid": "/",
"type": 2,
"subtype": 1,
"name": "Departments",
"uri": "{/lang}/backend/hr/department/list?{?}",
"uri": "{/prefix}hr/department/list?{?}",
"target": "self",
"icon": null,
"order": 1,
@ -77,11 +77,11 @@
"children": [
{
"id": 1002403101,
"pid": "/backend/hr/department",
"pid": "/hr/department",
"type": 3,
"subtype": 1,
"name": "List",
"uri": "{/lang}/backend/hr/department/list?{?}",
"uri": "{/prefix}hr/department/list?{?}",
"target": "self",
"icon": null,
"order": 1,

View File

@ -6,7 +6,7 @@ use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb;
return [
'^.*/backend/hr/staff/list.*$' => [
'^.*/hr/staff/list.*$' => [
[
'dest' => '\Modules\HumanResourceManagement\Controller\BackendController:viewHrStaffList',
'verb' => RouteVerb::GET,
@ -17,7 +17,7 @@ return [
],
],
],
'^.*/backend/hr/staff/profile.*$' => [
'^.*/hr/staff/profile.*$' => [
[
'dest' => '\Modules\HumanResourceManagement\Controller\BackendController:viewHrStaffProfile',
'verb' => RouteVerb::GET,
@ -28,7 +28,7 @@ return [
],
],
],
'^.*/backend/hr/staff/create.*$' => [
'^.*/hr/staff/create.*$' => [
[
'dest' => '\Modules\HumanResourceManagement\Controller\BackendController:viewHrStaffCreate',
'verb' => RouteVerb::GET,
@ -39,7 +39,7 @@ return [
],
],
],
'^.*/backend/hr/department/list.*$' => [
'^.*/hr/department/list.*$' => [
[
'dest' => '\Modules\HumanResourceManagement\Controller\BackendController:viewHrDepartmentList',
'verb' => RouteVerb::GET,

View File

@ -40,7 +40,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td colspan="4">
<tbody>
<?php $c = 0; foreach ($departments as $key => $value) : $c++;
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/hr/department/single?{?}&id=' . $value->getId()); ?>
$url = \phpOMS\Uri\UriFactory::build('{/prefix}hr/department/single?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('ID', 0, 0) ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>

View File

@ -25,7 +25,7 @@
</table>
<!-- @formatter:on -->
<div class="cT">
<a href="<?= \phpOMS\Uri\UriFactory::build('{/lang}/backend/sales/analysis/clients/dashboard'); ?>"
<a href="<?= \phpOMS\Uri\UriFactory::build('{/prefix}sales/analysis/clients/dashboard'); ?>"
class="button"><?= $this->printHtml($this->app->accountManager->get($request->getHeader()->getAccount())->getL11n()->lang[0]['More'] ); ?></a>
</div>
</div>

View File

@ -42,7 +42,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td colspan="5">
<tbody>
<?php $c = 0; foreach ($employees as $key => $value) : $c++;
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/hr/staff/profile?{?}&id=' . $value->getId()); ?>
$url = \phpOMS\Uri\UriFactory::build('{/prefix}hr/staff/profile?{?}&id=' . $value->getId()); ?>
<tr data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('ID', 0, 0) ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getAccount()->getName1()); ?></a>

View File

@ -26,7 +26,7 @@
"load": [
{
"pid": [
"/backend/hr"
"/hr"
],
"type": 4,
"for": 0,
@ -35,7 +35,7 @@
},
{
"pid": [
"/backend"
"/"
],
"type": 5,
"from": "HumanResourceManagement",