From e030a93927a5d90adb12a3e7da2a539256070097 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 10 Dec 2022 22:17:54 +0100 Subject: [PATCH] fix urls --- Admin/Install/Navigation.install.json | 14 +++++++------- .../Components/AccountGroupSelector/base.tpl.php | 4 ++-- Theme/Backend/profile-list.tpl.php | 10 +++++----- Theme/Backend/profile-single.tpl.php | 4 ++-- info.json | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index 8fa326f..a80bf00 100755 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -5,7 +5,7 @@ "type": 2, "subtype": 1, "name": "Profiles", - "uri": "{/prefix}profile/list", + "uri": "{/lang}/{/app}/profile/list", "target": "self", "icon": null, "order": 10, @@ -19,7 +19,7 @@ "type": 3, "subtype": 1, "name": "List", - "uri": "{/prefix}profile/list", + "uri": "{/lang}/{/app}/profile/list", "target": "self", "icon": null, "order": 1, @@ -34,7 +34,7 @@ "type": 5, "subtype": 1, "name": "Profile", - "uri": "{/prefix}profile/single/front?{?}", + "uri": "{/lang}/{/app}/profile/single/front?{?}", "target": "self", "icon": null, "order": 3, @@ -49,7 +49,7 @@ "type": 5, "subtype": 1, "name": "Settings", - "uri": "{/prefix}profile/single/settings?{?}", + "uri": "{/lang}/{/app}/profile/single/settings?{?}", "target": "self", "icon": null, "order": 999, @@ -66,7 +66,7 @@ "type": 3, "subtype": 1, "name": "Overview", - "uri": "{/prefix}admin/module/settings?{?}", + "uri": "{/lang}/{/app}/admin/module/settings?{?}", "target": "self", "icon": null, "order": 1, @@ -81,7 +81,7 @@ "type": 3, "subtype": 1, "name": "Settings", - "uri": "{/prefix}admin/module/settings/profile/settings?{?}", + "uri": "{/lang}/{/app}/admin/module/settings/profile/settings?{?}", "target": "self", "icon": null, "order": 1, @@ -96,7 +96,7 @@ "type": 3, "subtype": 1, "name": "Create", - "uri": "{/prefix}admin/module/settings/profile/create?{?}", + "uri": "{/lang}/{/app}/admin/module/settings/profile/create?{?}", "target": "self", "icon": null, "order": 2, diff --git a/Theme/Backend/Components/AccountGroupSelector/base.tpl.php b/Theme/Backend/Components/AccountGroupSelector/base.tpl.php index 819e55b..773776d 100755 --- a/Theme/Backend/Components/AccountGroupSelector/base.tpl.php +++ b/Theme/Backend/Components/AccountGroupSelector/base.tpl.php @@ -6,9 +6,9 @@ { "key": 1, "listener": "click", "action": [ {"key": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "getId(); ?>"}, - {"key": 2, "type": "message.request", "uri": "", "method": "GET", "request_type": "json"}, + {"key": 2, "type": "message.request", "uri": "", "method": "GET", "request_type": "json"}, {"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1}, - {"key": 4, "type": "message.request", "uri": "", "method": "GET", "request_type": "json"}, + {"key": 4, "type": "message.request", "uri": "", "method": "GET", "request_type": "json"}, {"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name/0"}, "position": -1} ] } diff --git a/Theme/Backend/profile-list.tpl.php b/Theme/Backend/profile-list.tpl.php index 9c650c4..947d0b5 100755 --- a/Theme/Backend/profile-list.tpl.php +++ b/Theme/Backend/profile-list.tpl.php @@ -21,8 +21,8 @@ use phpOMS\Uri\UriFactory; */ $accounts = $this->getData('accounts') ?? []; -$previous = empty($accounts) ? 'profile/list' : 'profile/list?{?}&id=' . \reset($accounts)->getId() . '&ptype=p'; -$next = empty($accounts) ? 'profile/list' : 'profile/list?{?}&id=' . \end($accounts)->getId() . '&ptype=n'; +$previous = empty($accounts) ? '{/lang}/{/app}profile/list' : '{/lang}/{/app}/profile/list?{?}&id=' . \reset($accounts)->getId() . '&ptype=p'; +$next = empty($accounts) ? '{/lang}/{/app}profile/list' : '{/lang}/{/app}/profile/list?{?}&id=' . \end($accounts)->getId() . '&ptype=n'; ?>
@@ -60,14 +60,14 @@ $next = empty($accounts) ? 'profile/list' : 'profile/list?{?}&id=' . \end($a $account) : ++$count; - $url = UriFactory::build('profile/single?{?}&id=' . $account->getId()); + $url = UriFactory::build('{/lang}/{/app}/profile/single?{?}&id=' . $account->getId()); ?> <?= $this->getHtml('IMG_alt_user'); ?> + ? UriFactory::build($this->getData('defaultImage')->getPath()) + : UriFactory::build($account->image->getPath()); ?>"> printHtml($account->account->name3 . ' ' . $account->account->name2 . ' ' . $account->account->name1); ?> printHtml($account->account->getLastActive()->format('Y-m-d')); ?> diff --git a/Theme/Backend/profile-single.tpl.php b/Theme/Backend/profile-single.tpl.php index 17e8305..0d8262a 100755 --- a/Theme/Backend/profile-single.tpl.php +++ b/Theme/Backend/profile-single.tpl.php @@ -72,8 +72,8 @@ echo $this->getData('nav')->render(); itemprop="logo" loading="lazy" src="image instanceof NullMedia - ? UriFactory::build('' . $this->getData('defaultImage')->getPath()) - : UriFactory::build('' . $profile->image->getPath()); ?>" + ? UriFactory::build( $this->getData('defaultImage')->getPath()) + : UriFactory::build( $profile->image->getPath()); ?>" width="100px">
request->header->account === $account->getId()) : ?>