Make app,localization in url optional+tld+subdomain

This commit is contained in:
Dennis Eichhorn 2019-03-09 23:21:29 +01:00
parent 8d05848ecb
commit 9983fd416d
7 changed files with 26 additions and 26 deletions

View File

@ -1,11 +1,11 @@
[ [
{ {
"id": 1001901001, "id": 1001901001,
"pid": "/backend", "pid": "/",
"type": 2, "type": 2,
"subtype": 0, "subtype": 0,
"name": "Marketing", "name": "Marketing",
"uri": "{/lang}/backend/marketing/dashboard?{?}", "uri": "{/prefix}marketing/dashboard?{?}",
"target": "self", "target": "self",
"icon": "fa fa-paint-brush", "icon": "fa fa-paint-brush",
"order": 60, "order": 60,
@ -15,11 +15,11 @@
"children": [ "children": [
{ {
"id": 1001902001, "id": 1001902001,
"pid": "/backend", "pid": "/",
"type": 2, "type": 2,
"subtype": 1, "subtype": 1,
"name": "Promotions", "name": "Promotions",
"uri": "{/lang}/backend/marketing/promotion/list?{?}", "uri": "{/prefix}marketing/promotion/list?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 1, "order": 1,
@ -29,11 +29,11 @@
"children": [ "children": [
{ {
"id": 1001902101, "id": 1001902101,
"pid": "/backend/marketing/promotion", "pid": "/marketing/promotion",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "List", "name": "List",
"uri": "{/lang}/backend/marketing/promotion/list?{?}", "uri": "{/prefix}marketing/promotion/list?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 1, "order": 1,
@ -44,11 +44,11 @@
}, },
{ {
"id": 1001902201, "id": 1001902201,
"pid": "/backend/marketing/promotion", "pid": "/marketing/promotion",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Create", "name": "Create",
"uri": "{/lang}/backend/marketing/promotion/create?{?}", "uri": "{/prefix}marketing/promotion/create?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 5, "order": 5,
@ -61,11 +61,11 @@
}, },
{ {
"id": 1001903001, "id": 1001903001,
"pid": "/backend", "pid": "/",
"type": 2, "type": 2,
"subtype": 1, "subtype": 1,
"name": "Events", "name": "Events",
"uri": "{/lang}/backend/marketing/event/list?{?}", "uri": "{/prefix}marketing/event/list?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 5, "order": 5,
@ -75,11 +75,11 @@
"children": [ "children": [
{ {
"id": 1001903101, "id": 1001903101,
"pid": "/backend/marketing/event", "pid": "/marketing/event",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "List", "name": "List",
"uri": "{/lang}/backend/marketing/event/list?{?}", "uri": "{/prefix}marketing/event/list?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 1, "order": 1,
@ -90,11 +90,11 @@
}, },
{ {
"id": 1001903201, "id": 1001903201,
"pid": "/backend/marketing/event", "pid": "/marketing/event",
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Create", "name": "Create",
"uri": "{/lang}/backend/marketing/event/create?{?}", "uri": "{/prefix}marketing/event/create?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 5, "order": 5,

View File

@ -6,7 +6,7 @@ use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb; use phpOMS\Router\RouteVerb;
return [ return [
'^.*/backend/marketing/promotion/list.*$' => [ '^.*/marketing/promotion/list.*$' => [
[ [
'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingPromotionList', 'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingPromotionList',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -17,7 +17,7 @@ return [
], ],
], ],
], ],
'^.*/backend/marketing/promotion/create.*$' => [ '^.*/marketing/promotion/create.*$' => [
[ [
'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingPromotionCreate', 'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingPromotionCreate',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -28,7 +28,7 @@ return [
], ],
], ],
], ],
'^.*/backend/marketing/promotion/profile.*$' => [ '^.*/marketing/promotion/profile.*$' => [
[ [
'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingPromotionProfile', 'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingPromotionProfile',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -39,7 +39,7 @@ return [
], ],
], ],
], ],
'^.*/backend/marketing/event/list.*$' => [ '^.*/marketing/event/list.*$' => [
[ [
'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingEventList', 'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingEventList',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -50,7 +50,7 @@ return [
], ],
], ],
], ],
'^.*/backend/marketing/event/create.*$' => [ '^.*/marketing/event/create.*$' => [
[ [
'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingEventCreate', 'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingEventCreate',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,
@ -61,7 +61,7 @@ return [
], ],
], ],
], ],
'^.*/backend/marketing/event/profile.*$' => [ '^.*/marketing/event/profile.*$' => [
[ [
'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingEventProfile', 'dest' => '\Modules\Marketing\Controller\BackendController:viewMarketingEventProfile',
'verb' => RouteVerb::GET, 'verb' => RouteVerb::GET,

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('Event'); ?></h1></header> <header><h1><?= $this->getHtml('Event'); ?></h1></header>
<div class="inner"> <div class="inner">
<form action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/helper/template'); ?>" method="post"> <form action="<?= \phpOMS\Uri\UriFactory::build('{/api}helper/template'); ?>" method="post">
<table class="layout wf-100"> <table class="layout wf-100">
<tbody> <tbody>
<tr><td colspan="2"><label for="iTitle"><?= $this->getHtml('Type'); ?></label> <tr><td colspan="2"><label for="iTitle"><?= $this->getHtml('Type'); ?></label>

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('Promotion'); ?></h1></header> <header><h1><?= $this->getHtml('Promotion'); ?></h1></header>
<div class="inner"> <div class="inner">
<form action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/marketing/promotion'); ?>" method="post"> <form action="<?= \phpOMS\Uri\UriFactory::build('{/api}marketing/promotion'); ?>" method="post">
<table class="layout wf-100"> <table class="layout wf-100">
<tbody> <tbody>
<tr><td colspan="2"><label for="iTitle"><?= $this->getHtml('Type'); ?></label> <tr><td colspan="2"><label for="iTitle"><?= $this->getHtml('Type'); ?></label>

View File

@ -35,7 +35,7 @@ echo $this->getData('nav')->render(); ?>
<td colspan="5"> <td colspan="5">
<tbody> <tbody>
<?php $count = 0; foreach ($list as $key => $value) : ++$count; <?php $count = 0; foreach ($list as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/lang}/backend/marketing/promotion/profile?{?}&id=' . $value->getId());?> $url = \phpOMS\Uri\UriFactory::build('{/prefix}marketing/promotion/profile?{?}&id=' . $value->getId());?>
<tr data-href="<?= $url; ?>"> <tr data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Title') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a> <td data-label="<?= $this->getHtml('Title') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td data-label="<?= $this->getHtml('Start') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getStart()->format('Y-m-d')); ?></a> <td data-label="<?= $this->getHtml('Start') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getStart()->format('Y-m-d')); ?></a>

View File

@ -20,7 +20,7 @@ echo $this->getData('nav')->render(); ?>
<section class="box wf-100"> <section class="box wf-100">
<header><h1><?= $this->printHtml($promotion->getName()); ?></h1></header> <header><h1><?= $this->printHtml($promotion->getName()); ?></h1></header>
<div class="inner"> <div class="inner">
<form id="fProject" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('{/lang}/api/marketing/promotion?{?}&csrf={$CSRF}'); ?>"> <form id="fProject" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('{/api}marketing/promotion?{?}&csrf={$CSRF}'); ?>">
<table class="layout wf-100"> <table class="layout wf-100">
<tbody> <tbody>
<tr><td colspan="2"><label for="iName"><?= $this->getHtml('Name') ?></label> <tr><td colspan="2"><label for="iName"><?= $this->getHtml('Name') ?></label>

View File

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