Make app,localization in url optional+tld+subdomain

This commit is contained in:
Dennis Eichhorn 2019-03-09 23:21:29 +01:00
parent 439567e21d
commit 9805852139
8 changed files with 24 additions and 24 deletions

View File

@ -1,11 +1,11 @@
[ [
{ {
"id": 1001101001, "id": 1001101001,
"pid": "/backend", "pid": "/",
"type": 1, "type": 1,
"subtype": 1, "subtype": 1,
"name": "Tasks", "name": "Tasks",
"uri": "{/lang}/backend/task/dashboard?{?}", "uri": "{/prefix}task/dashboard?{?}",
"target": "self", "target": "self",
"icon": "fa fa-bolt", "icon": "fa fa-bolt",
"order": 15, "order": 15,
@ -15,11 +15,11 @@
"children": [ "children": [
{ {
"id": 1001102001, "id": 1001102001,
"pid": "/backend/task", "pid": "/task",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "List", "name": "List",
"uri": "{/lang}/backend/task/dashboard?{?}", "uri": "{/prefix}task/dashboard?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 1, "order": 1,
@ -29,11 +29,11 @@
"children": [ "children": [
{ {
"id": 1001102101, "id": 1001102101,
"pid": "/backend/task", "pid": "/task",
"type": 0, "type": 0,
"subtype": 1, "subtype": 1,
"name": "Tasks", "name": "Tasks",
"uri": "{/lang}/backend/task/single?{?}", "uri": "{/prefix}task/single?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 1, "order": 1,
@ -46,11 +46,11 @@
}, },
{ {
"id": 1001103001, "id": 1001103001,
"pid": "/backend/task", "pid": "/task",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Create", "name": "Create",
"uri": "{/lang}/backend/task/create?{?}", "uri": "{/prefix}task/create?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 10, "order": 10,
@ -61,11 +61,11 @@
}, },
{ {
"id": 1001104001, "id": 1001104001,
"pid": "/backend/task", "pid": "/task",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Analysis", "name": "Analysis",
"uri": "{/lang}/backend/task/analysis?{?}", "uri": "{/prefix}task/analysis?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 20, "order": 20,

View File

@ -6,7 +6,7 @@ use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb; use phpOMS\Router\RouteVerb;
return [ return [
'^.*/api/task(\?.*|$)' => [ '^.*/task(\?.*|$)' => [
[ [
'dest' => '\Modules\Tasks\Controller\ApiController:apiTaskCreate', 'dest' => '\Modules\Tasks\Controller\ApiController:apiTaskCreate',
'verb' => RouteVerb::PUT, 'verb' => RouteVerb::PUT,
@ -35,7 +35,7 @@ return [
], ],
], ],
], ],
'^.*/api/task/element.*$' => [ '^.*/task/element.*$' => [
[ [
'dest' => '\Modules\Tasks\Controller\ApiController:apiTaskElementCreate', 'dest' => '\Modules\Tasks\Controller\ApiController:apiTaskElementCreate',
'verb' => RouteVerb::PUT, 'verb' => RouteVerb::PUT,

View File

@ -6,7 +6,7 @@ use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb; use phpOMS\Router\RouteVerb;
return [ return [
'^.*/backend/task/dashboard.*$' => [ '^.*/task/dashboard.*$' => [
[ [
'dest' => '\Modules\Tasks\Controller\BackendController:viewTaskDashboard', 'dest' => '\Modules\Tasks\Controller\BackendController:viewTaskDashboard',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -17,7 +17,7 @@ return [
], ],
], ],
], ],
'^.*/backend/task/single.*$' => [ '^.*/task/single.*$' => [
[ [
'dest' => '\Modules\Tasks\Controller\BackendController:viewTaskView', 'dest' => '\Modules\Tasks\Controller\BackendController:viewTaskView',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -28,7 +28,7 @@ return [
], ],
], ],
], ],
'^.*/backend/task/create.*$' => [ '^.*/task/create.*$' => [
[ [
'dest' => '\Modules\Tasks\Controller\BackendController:viewTaskCreate', 'dest' => '\Modules\Tasks\Controller\BackendController:viewTaskCreate',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -39,7 +39,7 @@ return [
], ],
], ],
], ],
'^.*/backend/task/analysis.*$' => [ '^.*/task/analysis.*$' => [
[ [
'dest' => '\Modules\Tasks\Controller\BackendController:viewTaskAnalysis', 'dest' => '\Modules\Tasks\Controller\BackendController:viewTaskAnalysis',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,

View File

@ -7,7 +7,7 @@
<tfoot> <tfoot>
<tbody> <tbody>
<?php $c = 0; foreach ($this->tasks as $key => $task) : $c++; <?php $c = 0; foreach ($this->tasks as $key => $task) : $c++;
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/task/single?{?}&id=' . $task->getId()); $url = \phpOMS\Uri\UriFactory::build('{/prefix}task/single?{?}&id=' . $task->getId());
$color = 'darkred'; $color = 'darkred';
if ($task->getStatus() === \Modules\Tasks\Models\TaskStatus::DONE) { $color = 'green'; } if ($task->getStatus() === \Modules\Tasks\Models\TaskStatus::DONE) { $color = 'green'; }
elseif ($task->getStatus() === \Modules\Tasks\Models\TaskStatus::OPEN) { $color = 'darkblue'; } elseif ($task->getStatus() === \Modules\Tasks\Models\TaskStatus::OPEN) { $color = 'darkblue'; }

View File

@ -25,7 +25,7 @@ echo $this->getData('nav')->render(); ?>
<header><h1><?= $this->getHtml('Task') ?></h1></header> <header><h1><?= $this->getHtml('Task') ?></h1></header>
<div class="inner"> <div class="inner">
<form id="fTask" method="PUT" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/task?{?}&csrf={$CSRF}'); ?>"> <form id="fTask" method="PUT" action="<?= \phpOMS\Uri\UriFactory::build('{/api}task?{?}&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="iReceiver"><?= $this->getHtml('To') ?></label> <tr><td><label for="iReceiver"><?= $this->getHtml('To') ?></label>

View File

@ -34,7 +34,7 @@ echo $this->getData('nav')->render(); ?>
<tfoot> <tfoot>
<tbody> <tbody>
<?php $c = 0; foreach ($tasks as $key => $task) : $c++; <?php $c = 0; foreach ($tasks as $key => $task) : $c++;
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/task/single?{?}&id=' . $task->getId()); $url = \phpOMS\Uri\UriFactory::build('{/prefix}task/single?{?}&id=' . $task->getId());
$color = 'darkred'; $color = 'darkred';
if ($task->getStatus() === TaskStatus::DONE) { $color = 'green'; } if ($task->getStatus() === TaskStatus::DONE) { $color = 'green'; }
elseif ($task->getStatus() === TaskStatus::OPEN) { $color = 'darkblue'; } elseif ($task->getStatus() === TaskStatus::OPEN) { $color = 'darkblue'; }
@ -65,7 +65,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box wf-100"> <section class="box wf-100">
<header><h1><?= $this->getHtml('Settings') ?></h1></header> <header><h1><?= $this->getHtml('Settings') ?></h1></header>
<div class="inner"> <div class="inner">
<form id="iTaskInterval" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/backend/task/dashboard?{?}') ?>" method="post"> <form id="iTaskInterval" action="<?= \phpOMS\Uri\UriFactory::build('{/api}task/dashboard?{?}') ?>" method="post">
<table class="layout wf-100"> <table class="layout wf-100">
<tr><td><label for="iIntervarl"><?= $this->getHtml('Interval') ?></label> <tr><td><label for="iIntervarl"><?= $this->getHtml('Interval') ?></label>
<tr><td><select id="iIntervarl" name="interval"> <tr><td><select id="iIntervarl" name="interval">

View File

@ -131,7 +131,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box wf-100"> <section class="box wf-100">
<div class="inner"> <div class="inner">
<form id="taskElementCreate" method="PUT" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/task/element?{?}&csrf={$CSRF}'); ?>"> <form id="taskElementCreate" method="PUT" action="<?= \phpOMS\Uri\UriFactory::build('{/api}task/element?{?}&csrf={$CSRF}'); ?>">
<table class="layout wf-100" style="table-layout: fixed"> <table class="layout wf-100" style="table-layout: fixed">
<tr><td><label for="iMessage"><?= $this->getHtml('Message') ?></label> <tr><td><label for="iMessage"><?= $this->getHtml('Message') ?></label>
<tr><td><?= $this->getData('editor')->render('task-editor'); ?> <tr><td><?= $this->getData('editor')->render('task-editor'); ?>

View File

@ -28,7 +28,7 @@
"load": [ "load": [
{ {
"pid": [ "pid": [
"/backend/task" "/task"
], ],
"type": 4, "type": 4,
"for": 0, "for": 0,
@ -37,7 +37,7 @@
}, },
{ {
"pid": [ "pid": [
"/backend" "/"
], ],
"type": 4, "type": 4,
"from": "Tasks", "from": "Tasks",
@ -46,7 +46,7 @@
}, },
{ {
"pid": [ "pid": [
"/backend" "/"
], ],
"type": 5, "type": 5,
"from": "Tasks", "from": "Tasks",