Make app,localization in url optional+tld+subdomain

This commit is contained in:
Dennis Eichhorn 2019-03-09 23:21:29 +01:00
parent fed724bcdc
commit ad62a62083
6 changed files with 17 additions and 17 deletions

View File

@ -1,11 +1,11 @@
[ [
{ {
"id": 1003601001, "id": 1003601001,
"pid": "/backend", "pid": "/",
"type": 2, "type": 2,
"subtype": 1, "subtype": 1,
"name": "Checklist", "name": "Checklist",
"uri": "{/lang}/backend/checklist/list?{?}", "uri": "{/prefix}checklist/list?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 65, "order": 65,
@ -15,11 +15,11 @@
"children": [ "children": [
{ {
"id": 1003602001, "id": 1003602001,
"pid": "/backend/checklist", "pid": "/checklist",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "List", "name": "List",
"uri": "{/lang}/backend/checklist/list?{?}", "uri": "{/prefix}checklist/list?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 1, "order": 1,
@ -30,11 +30,11 @@
}, },
{ {
"id": 1003603001, "id": 1003603001,
"pid": "/backend/checklist", "pid": "/checklist",
"type": 3, "type": 3,
"subtype": 5, "subtype": 5,
"name": "Templates", "name": "Templates",
"uri": "{/lang}/backend/checklist/template/list?{?}", "uri": "{/prefix}checklist/template/list?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 5, "order": 5,
@ -45,11 +45,11 @@
}, },
{ {
"id": 1003604001, "id": 1003604001,
"pid": "/backend/checklist", "pid": "/checklist",
"type": 3, "type": 3,
"subtype": 5, "subtype": 5,
"name": "CreateTemplate", "name": "CreateTemplate",
"uri": "{/lang}/backend/checklist/template/create?{?}", "uri": "{/prefix}checklist/template/create?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 15, "order": 15,

View File

@ -6,7 +6,7 @@ use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb; use phpOMS\Router\RouteVerb;
return [ return [
'^.*/backend/checklist/list.*$' => [ '^.*/checklist/list.*$' => [
[ [
'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistList', 'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistList',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -17,7 +17,7 @@ return [
], ],
], ],
], ],
'^.*/backend/checklist/template/list.*$' => [ '^.*/checklist/template/list.*$' => [
[ [
'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistTemplateList', 'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistTemplateList',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -28,7 +28,7 @@ return [
], ],
], ],
], ],
'^.*/backend/checklist/template/create.*$' => [ '^.*/checklist/template/create.*$' => [
[ [
'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistTemplateCreate', 'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistTemplateCreate',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -39,7 +39,7 @@ return [
], ],
], ],
], ],
'^.*/backend/checklist/template/view.*$' => [ '^.*/checklist/template/view.*$' => [
[ [
'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistTemplateView', 'dest' => '\Modules\Checklist\Controller\BackendController:viewChecklistTemplateView',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,

View File

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

View File

@ -21,7 +21,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box wf-100"> <section class="box wf-100">
<header><h1><?= $this->getHtml('General') ?></h1></header> <header><h1><?= $this->getHtml('General') ?></h1></header>
<div class="inner"> <div class="inner">
<form id="fChecklist" method="put" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/checklist/template?{?}&csrf={$CSRF}'); ?>"> <form id="fChecklist" method="put" action="<?= \phpOMS\Uri\UriFactory::build('{/api}checklist/template?{?}&csrf={$CSRF}'); ?>">
<table class="layout wf-100"> <table class="layout wf-100">
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label><td> <tr><td><label for="iName"><?= $this->getHtml('Name') ?></label><td>
<tr><td><input type="text" id="iName" name="name" required><td> <tr><td><input type="text" id="iName" name="name" required><td>

View File

@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td colspan="5"> <tr><td colspan="5">
<tbody> <tbody>
<?php $c = 0; foreach ([] as $key => $value) : $c++; <?php $c = 0; foreach ([] as $key => $value) : $c++;
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/checklist/single?{?}&id=' . $value->getId()); ?> $url = \phpOMS\Uri\UriFactory::build('{/prefix}checklist/single?{?}&id=' . $value->getId()); ?>
<tr> <tr>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a> <td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a> <td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>

View File

@ -27,7 +27,7 @@
"load": [ "load": [
{ {
"pid": [ "pid": [
"/backend/checklist" "/checklist"
], ],
"type": 4, "type": 4,
"for": "Content", "for": "Content",
@ -36,7 +36,7 @@
}, },
{ {
"pid": [ "pid": [
"/backend" "/"
], ],
"type": 5, "type": 5,
"from": "Checklist", "from": "Checklist",