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

View File

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

View File

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

View File

@ -7,7 +7,7 @@
<tfoot>
<tbody>
<?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';
if ($task->getStatus() === \Modules\Tasks\Models\TaskStatus::DONE) { $color = 'green'; }
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>
<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">
<tbody>
<tr><td><label for="iReceiver"><?= $this->getHtml('To') ?></label>

View File

@ -34,7 +34,7 @@ echo $this->getData('nav')->render(); ?>
<tfoot>
<tbody>
<?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';
if ($task->getStatus() === TaskStatus::DONE) { $color = 'green'; }
elseif ($task->getStatus() === TaskStatus::OPEN) { $color = 'darkblue'; }
@ -65,7 +65,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box wf-100">
<header><h1><?= $this->getHtml('Settings') ?></h1></header>
<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">
<tr><td><label for="iIntervarl"><?= $this->getHtml('Interval') ?></label>
<tr><td><select id="iIntervarl" name="interval">

View File

@ -131,7 +131,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box wf-100">
<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">
<tr><td><label for="iMessage"><?= $this->getHtml('Message') ?></label>
<tr><td><?= $this->getData('editor')->render('task-editor'); ?>

View File

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