Make app,localization in url optional+tld+subdomain

This commit is contained in:
Dennis Eichhorn 2019-03-09 23:21:29 +01:00
parent 53c3e4c77f
commit b89fea0cf0
7 changed files with 15 additions and 15 deletions

View File

@ -1,11 +1,11 @@
[ [
{ {
"id": 1005201001, "id": 1005201001,
"pid": "/backend", "pid": "/",
"type": 2, "type": 2,
"subtype": 1, "subtype": 1,
"name": "Draw", "name": "Draw",
"uri": "{/lang}/backend/draw/list?{?}", "uri": "{/prefix}draw/list?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 70, "order": 70,
@ -15,11 +15,11 @@
"children": [ "children": [
{ {
"id": 1005202001, "id": 1005202001,
"pid": "/backend/draw", "pid": "/draw",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "List", "name": "List",
"uri": "{/lang}/backend/draw/list?{?}", "uri": "{/prefix}draw/list?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 1, "order": 1,
@ -30,11 +30,11 @@
}, },
{ {
"id": 1005202101, "id": 1005202101,
"pid": "/backend/draw", "pid": "/draw",
"type": 3, "type": 3,
"subtype": 5, "subtype": 5,
"name": "Create", "name": "Create",
"uri": "{/lang}/backend/draw/create?{?}", "uri": "{/prefix}draw/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 [
'^.*/api/draw.*$' => [ '^.*/draw.*$' => [
[ [
'dest' => '\Modules\Draw\Controller\ApiController:apiDrawCreate', 'dest' => '\Modules\Draw\Controller\ApiController:apiDrawCreate',
'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/draw/create.*$' => [ '^.*/draw/create.*$' => [
[ [
'dest' => '\Modules\Draw\Controller\BackendController:setUpDrawEditor', 'dest' => '\Modules\Draw\Controller\BackendController:setUpDrawEditor',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -26,7 +26,7 @@ return [
], ],
], ],
], ],
'^.*/backend/draw/list.*$' => [ '^.*/draw/list.*$' => [
[ [
'dest' => '\Modules\Draw\Controller\BackendController:viewDrawList', 'dest' => '\Modules\Draw\Controller\BackendController:viewDrawList',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -37,7 +37,7 @@ return [
], ],
], ],
], ],
'^.*/backend/draw/single.*$' => [ '^.*/draw/single.*$' => [
[ [
'dest' => '\Modules\Draw\Controller\BackendController:setUpDrawEditor', 'dest' => '\Modules\Draw\Controller\BackendController:setUpDrawEditor',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,

View File

@ -20,7 +20,7 @@ echo $this->getData('nav')->render(); ?>
<div class="col-xs-12"> <div class="col-xs-12">
<section class="box wf-100"> <section class="box wf-100">
<div class="inner"> <div class="inner">
<form id="drawForm" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/draw?{?}&csrf={$CSRF}'); ?>" method="POST"> <form id="drawForm" action="<?= \phpOMS\Uri\UriFactory::build('{/api}draw?{?}&csrf={$CSRF}'); ?>" method="POST">
<div class="ipt-wrap"> <div class="ipt-wrap">
<div class="ipt-first"><input type="text" id="iTitle" name="title" class="wf-100"></div> <div class="ipt-first"><input type="text" id="iTitle" name="title" class="wf-100"></div>
<div class="ipt-second"><input type="submit" value="<?= $this->getHtml('Create', 0, 0); ?>"></div> <div class="ipt-second"><input type="submit" value="<?= $this->getHtml('Create', 0, 0); ?>"></div>

View File

@ -37,7 +37,7 @@ echo $this->getData('nav')->render(); ?>
<td colspan="3"> <td colspan="3">
<tbody> <tbody>
<?php $count = 0; foreach ($images as $key => $value) : ++$count; <?php $count = 0; foreach ($images as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/draw/single?{?}&id=' . $value->getId()); ?> $url = \phpOMS\Uri\UriFactory::build('{/prefix}draw/single?{?}&id=' . $value->getId()); ?>
<tr> <tr>
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getMedia()->getName()); ?></a> <td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getMedia()->getName()); ?></a>
<td data-label="<?= $this->getHtml('Creator') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getMedia()->getCreatedBy()->getName()); ?></a> <td data-label="<?= $this->getHtml('Creator') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getMedia()->getCreatedBy()->getName()); ?></a>

View File

@ -22,7 +22,7 @@ echo $this->getData('nav')->render(); ?>
<div class="col-xs-12"> <div class="col-xs-12">
<section class="box wf-100"> <section class="box wf-100">
<div class="inner"> <div class="inner">
<form id="drawForm" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/draw?{?}&csrf={$CSRF}'); ?>" method="POST"> <form id="drawForm" action="<?= \phpOMS\Uri\UriFactory::build('{/api}draw?{?}&csrf={$CSRF}'); ?>" method="POST">
<div class="ipt-wrap"> <div class="ipt-wrap">
<div class="ipt-first"><input type="text" id="iTitle" name="title" class="wf-100" value="<?= $this->printHtml($image->getMedia()->getName()); ?>"></div> <div class="ipt-first"><input type="text" id="iTitle" name="title" class="wf-100" value="<?= $this->printHtml($image->getMedia()->getName()); ?>"></div>
<div class="ipt-second"><input type="submit" value="<?= $this->getHtml('Save', 0, 0); ?>"></div> <div class="ipt-second"><input type="submit" value="<?= $this->getHtml('Save', 0, 0); ?>"></div>

View File

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