Make app,localization in url optional+tld+subdomain

This commit is contained in:
Dennis Eichhorn 2019-03-09 23:21:29 +01:00
parent 1df4f12841
commit ea1e3f41f7
7 changed files with 33 additions and 33 deletions

View File

@ -1,11 +1,11 @@
[ [
{ {
"id": 1001201001, "id": 1001201001,
"pid": "/backend", "pid": "/",
"type": 1, "type": 1,
"subtype": 1, "subtype": 1,
"name": "Messages", "name": "Messages",
"uri": "{/lang}/backend/messages/dashboard?{?}", "uri": "{/prefix}messages/dashboard?{?}",
"target": "self", "target": "self",
"icon": "fa fa-envelope", "icon": "fa fa-envelope",
"order": 10, "order": 10,
@ -15,11 +15,11 @@
"children": [ "children": [
{ {
"id": 1001202001, "id": 1001202001,
"pid": "/backend", "pid": "/",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Inbox", "name": "Inbox",
"uri": "{/lang}/backend/messages/dashboard?{?}", "uri": "{/prefix}messages/dashboard?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 1, "order": 1,
@ -30,11 +30,11 @@
}, },
{ {
"id": 1001203001, "id": 1001203001,
"pid": "/backend", "pid": "/",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Outbox", "name": "Outbox",
"uri": "{/lang}/backend/messages/outbox?{?}", "uri": "{/prefix}messages/outbox?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 5, "order": 5,
@ -45,11 +45,11 @@
}, },
{ {
"id": 1001204001, "id": 1001204001,
"pid": "/backend", "pid": "/",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Trash", "name": "Trash",
"uri": "{/lang}/backend/messages/trash?{?}", "uri": "{/prefix}messages/trash?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 10, "order": 10,
@ -60,11 +60,11 @@
}, },
{ {
"id": 1001205001, "id": 1001205001,
"pid": "/backend", "pid": "/",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Spam", "name": "Spam",
"uri": "{/lang}/backend/messages/spam?{?}", "uri": "{/prefix}messages/spam?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 15, "order": 15,
@ -75,11 +75,11 @@
}, },
{ {
"id": 1001206001, "id": 1001206001,
"pid": "/backend", "pid": "/",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Draft", "name": "Draft",
"uri": "{/lang}/backend/messages/draft?{?}", "uri": "{/prefix}messages/draft?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 20, "order": 20,
@ -90,11 +90,11 @@
}, },
{ {
"id": 1001207001, "id": 1001207001,
"pid": "/backend", "pid": "/",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Settings", "name": "Settings",
"uri": "{/lang}/backend/messages/settings?{?}", "uri": "{/prefix}messages/settings?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 50, "order": 50,

View File

@ -6,7 +6,7 @@ use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb; use phpOMS\Router\RouteVerb;
return [ return [
'^.*/backend/messages/dashboard.*$' => [ '^.*/messages/dashboard.*$' => [
[ [
'dest' => '\Modules\Messages\Controller\BackendController:viewMessageInbox', 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageInbox',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -17,7 +17,7 @@ return [
], ],
], ],
], ],
'^.*/backend/messages/outbox.*$' => [ '^.*/messages/outbox.*$' => [
[ [
'dest' => '\Modules\Messages\Controller\BackendController:viewMessageOutbox', 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageOutbox',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -28,7 +28,7 @@ return [
], ],
], ],
], ],
'^.*/backend/messages/trash.*$' => [ '^.*/messages/trash.*$' => [
[ [
'dest' => '\Modules\Messages\Controller\BackendController:viewMessageTrash', 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageTrash',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -39,7 +39,7 @@ return [
], ],
], ],
], ],
'^.*/backend/messages/spam.*$' => [ '^.*/messages/spam.*$' => [
[ [
'dest' => '\Modules\Messages\Controller\BackendController:viewMessageSpam', 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageSpam',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -50,7 +50,7 @@ return [
], ],
], ],
], ],
'^.*/backend/messages/settings.*$' => [ '^.*/messages/settings.*$' => [
[ [
'dest' => '\Modules\Messages\Controller\BackendController:viewMessageSettings', 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageSettings',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -61,7 +61,7 @@ return [
], ],
], ],
], ],
'^.*/backend/messages/mail/create.*$' => [ '^.*/messages/mail/create.*$' => [
[ [
'dest' => '\Modules\Messages\Controller\BackendController:viewMessageCreate', 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageCreate',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -72,7 +72,7 @@ return [
], ],
], ],
], ],
'^.*/backend/messages/mail/single.*$' => [ '^.*/messages/mail/single.*$' => [
[ [
'dest' => '\Modules\Messages\Controller\BackendController:viewMessageView', 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageView',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -83,7 +83,7 @@ return [
], ],
], ],
], ],
'^.*/api/messages/mail/single.*$' => [ '^.*/messages/mail/single.*$' => [
[ [
'dest' => '\Modules\Messages\Controller\BackendController:viewMessageView', 'dest' => '\Modules\Messages\Controller\BackendController:viewMessageView',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,

View File

@ -20,7 +20,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box w-100"> <section class="box w-100">
<ul class="btns floatLeft"> <ul class="btns floatLeft">
<li><a href="<?= \phpOMS\Uri\UriFactory::build('{/lang}/backend/messages/mail/create'); ?>"><i class="fa fa-pencil"></i> <?{?}= $this->getHtml('Create', 0, 0); ?></a> <li><a href="<?= \phpOMS\Uri\UriFactory::build('{/prefix}messages/mail/create'); ?>"><i class="fa fa-pencil"></i> <?{?}= $this->getHtml('Create', 0, 0); ?></a>
<li><a href=""><i class="fa fa-trash"></i> <?= $this->getHtml('Delete') ?></a> <li><a href=""><i class="fa fa-trash"></i> <?= $this->getHtml('Delete') ?></a>
</ul> </ul>
</section> </section>
@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td colspan="5"><?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage'])); ?> / <?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit'])); ?> <tr><td colspan="5"><?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage'])); ?> / <?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit'])); ?>
<tbody> <tbody>
<?php $count = 0; foreach ($unseen as $key => $value) : ++$count; <?php $count = 0; foreach ($unseen as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/messages/mail/single?{?}&id=' . $value->uid); ?> $url = \phpOMS\Uri\UriFactory::build('{/prefix}messages/mail/single?{?}&id=' . $value->uid); ?>
<tr> <tr>
<td><span class="check"><input type="checkbox"></span> <td><span class="check"><input type="checkbox"></span>
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>></a> <td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>></a>
@ -49,7 +49,7 @@ echo $this->getData('nav')->render(); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php foreach ($seen as $key => $value) : ++$count; <?php foreach ($seen as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/messages/mail/single?{?}&id=' . $value->uid); ?> $url = \phpOMS\Uri\UriFactory::build('{/prefix}messages/mail/single?{?}&id=' . $value->uid); ?>
<tr> <tr>
<td><span class="check"><input type="checkbox"></span> <td><span class="check"><input type="checkbox"></span>
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>></a> <td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>></a>

View File

@ -19,7 +19,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box w-100"> <section class="box w-100">
<ul class="btns floatLeft"> <ul class="btns floatLeft">
<li><a href="<?= \phpOMS\Uri\UriFactory::build('{/lang}/backend/messages/mail/create'); ?>"><i class="fa fa-pencil"></i> <?{?}= $this->getHtml('Create', 0, 0); ?></a> <li><a href="<?= \phpOMS\Uri\UriFactory::build('{/prefix}messages/mail/create'); ?>"><i class="fa fa-pencil"></i> <?{?}= $this->getHtml('Create', 0, 0); ?></a>
<li><a href=""><i class="fa fa-trash"></i> <?= $this->getHtml('Delete') ?></a> <li><a href=""><i class="fa fa-trash"></i> <?= $this->getHtml('Delete') ?></a>
</ul> </ul>
</section> </section>
@ -38,7 +38,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td colspan="5"><?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage'])); ?> / <?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit'])); ?> <tr><td colspan="5"><?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage'])); ?> / <?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit'])); ?>
<tbody> <tbody>
<?php $count = 0; foreach ($sent as $key => $value) : ++$count; <?php $count = 0; foreach ($sent as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/messages/mail/single?{?}&id=' . $value->uid); ?> $url = \phpOMS\Uri\UriFactory::build('{/prefix}messages/mail/single?{?}&id=' . $value->uid); ?>
<tr> <tr>
<td><span class="check"><input type="checkbox"></span> <td><span class="check"><input type="checkbox"></span>
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>></a> <td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>></a>

View File

@ -19,7 +19,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box w-100"> <section class="box w-100">
<ul class="btns floatLeft"> <ul class="btns floatLeft">
<li><a href="<?= \phpOMS\Uri\UriFactory::build('{/lang}/backend/messages/mail/create'); ?>"><i class="fa fa-pencil"></i> <?{?}= $this->getHtml('Create', 0, 0); ?></a> <li><a href="<?= \phpOMS\Uri\UriFactory::build('{/prefix}messages/mail/create'); ?>"><i class="fa fa-pencil"></i> <?{?}= $this->getHtml('Create', 0, 0); ?></a>
<li><a href=""><i class="fa fa-trash"></i> <?= $this->getHtml('Delete') ?></a> <li><a href=""><i class="fa fa-trash"></i> <?= $this->getHtml('Delete') ?></a>
</ul> </ul>
</section> </section>
@ -38,7 +38,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td colspan="5"><?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage'])); ?> / <?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit'])); ?> <tr><td colspan="5"><?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage'])); ?> / <?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit'])); ?>
<tbody> <tbody>
<?php $count = 0; foreach ($sent as $key => $value) : ++$count; <?php $count = 0; foreach ($sent as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/messages/mail/single?{?}&id=' . $value->uid); ?> $url = \phpOMS\Uri\UriFactory::build('{/prefix}messages/mail/single?{?}&id=' . $value->uid); ?>
<tr> <tr>
<td><span class="check"><input type="checkbox"></span> <td><span class="check"><input type="checkbox"></span>
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>></a> <td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>></a>

View File

@ -19,7 +19,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box w-100"> <section class="box w-100">
<ul class="btns floatLeft"> <ul class="btns floatLeft">
<li><a href="<?= \phpOMS\Uri\UriFactory::build('{/lang}/backend/messages/mail/create'); ?>"><i class="fa fa-pencil"></i> <?{?}= $this->getHtml('Create', 0, 0); ?></a> <li><a href="<?= \phpOMS\Uri\UriFactory::build('{/prefix}messages/mail/create'); ?>"><i class="fa fa-pencil"></i> <?{?}= $this->getHtml('Create', 0, 0); ?></a>
<li><a href=""><i class="fa fa-trash"></i> <?= $this->getHtml('Delete') ?></a> <li><a href=""><i class="fa fa-trash"></i> <?= $this->getHtml('Delete') ?></a>
</ul> </ul>
</section> </section>
@ -38,7 +38,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td colspan="5"><?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage'])); ?> / <?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit'])); ?> <tr><td colspan="5"><?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['usage'])); ?> / <?= $this->printHtml(\phpOMS\Utils\Converter\File::kilobyteSizeToString($quota['limit'])); ?>
<tbody> <tbody>
<?php $count = 0; foreach ($sent as $key => $value) : ++$count; <?php $count = 0; foreach ($sent as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/messages/mail/single?{?}&id=' . $value->uid); ?> $url = \phpOMS\Uri\UriFactory::build('{/prefix}messages/mail/single?{?}&id=' . $value->uid); ?>
<tr> <tr>
<td><span class="check"><input type="checkbox"></span> <td><span class="check"><input type="checkbox"></span>
<td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>></a> <td><a href="<?= $url; ?>"<?= $this->printHtml($value->seen == 0 ? ' class="unseen"' : ''); ?>></a>

View File

@ -25,7 +25,7 @@
"load": [ "load": [
{ {
"pid": [ "pid": [
"/backend/message" "/message"
], ],
"type": 4, "type": 4,
"for": 0, "for": 0,
@ -34,7 +34,7 @@
}, },
{ {
"pid": [ "pid": [
"/backend" "/"
], ],
"type": 5, "type": 5,
"from": "Messages", "from": "Messages",