From 386dc0b7b77104979eee966d793edd3bd9f91c80 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 25 Jul 2017 19:09:46 +0200 Subject: [PATCH] Fix footer rendering --- Controller.php | 6 +++--- Theme/Backend/Lang/en.lang.php | 1 + Theme/Backend/profile-list.tpl.php | 2 +- Theme/Backend/profile-single.tpl.php | 14 +++++++------- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Controller.php b/Controller.php index 6d483a1..0fe981d 100644 --- a/Controller.php +++ b/Controller.php @@ -15,7 +15,7 @@ declare(strict_types=1); namespace Modules\Profile; -use Modules\Admin\Models\AccountMapper; +use Modules\Profile\Models\ProfileMapper; use phpOMS\Contract\RenderableInterface; use phpOMS\Message\RequestAbstract; use phpOMS\Message\ResponseAbstract; @@ -92,7 +92,7 @@ class Controller extends ModuleAbstract implements WebInterface $view = new View($this->app, $request, $response); $view->setTemplate('/Modules/Profile/Theme/Backend/profile-list'); - $view->setData('accounts', AccountMapper::getNewest(25)); + $view->setData('accounts', ProfileMapper::getNewest(25)); return $view; } @@ -112,7 +112,7 @@ class Controller extends ModuleAbstract implements WebInterface $view->setTemplate('/Modules/Profile/Theme/Backend/profile-single'); $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000301001, $request, $response)); - $view->setData('account', AccountMapper::get($request->getData('id'))); + $view->setData('account', ProfileMapper::get($request->getData('id'))); return $view; } diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index e8f439e..e07ffd7 100644 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -26,6 +26,7 @@ return ['Profile' => [ 'ON' => 'ON', 'Phone' => 'Phone', 'Profile' => 'Profile', + 'ProfileImage' => 'Profile Image', 'Profiles' => 'Profiles', 'Ranks' => 'Ranks', 'Registered' => 'Registered', diff --git a/Theme/Backend/profile-list.tpl.php b/Theme/Backend/profile-list.tpl.php index 5025a68..84a6b9d 100644 --- a/Theme/Backend/profile-list.tpl.php +++ b/Theme/Backend/profile-list.tpl.php @@ -36,7 +36,7 @@ $accounts = $this->getData('accounts'); getHtml('Activity') ?> - render(), ENT_COMPAT, 'utf-8'); ?> + render(); ?> $account) : $count++; $url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/profile/single?{?}&id=' . $account->getId()); ?> diff --git a/Theme/Backend/profile-single.tpl.php b/Theme/Backend/profile-single.tpl.php index da2a2fa..0d78a61 100644 --- a/Theme/Backend/profile-single.tpl.php +++ b/Theme/Backend/profile-single.tpl.php @@ -35,8 +35,8 @@ echo $this->getData('nav')->render(); -
getHtml('Name') ?> - getName3(), ENT_COMPAT, 'utf-8'); ?>, getName1(), ENT_COMPAT, 'utf-8'); ?> + getHtml('Name') ?><?= $this->getHtml('ProfileImage'); ?> + getAccount()->getName3(), ENT_COMPAT, 'utf-8'); ?>, getAccount()->getName1(), ENT_COMPAT, 'utf-8'); ?>
getHtml('Occupation') ?> Sailor @@ -48,7 +48,7 @@ echo $this->getData('nav')->render(); Gosling
getHtml('Email') ?> - getEmail(), ENT_COMPAT, 'utf-8'); ?> + getAccount()->getEmail(), ENT_COMPAT, 'utf-8'); ?>
Address @@ -72,13 +72,13 @@ echo $this->getData('nav')->render(); +01 12345-4567
getHtml('Registered') ?> - getCreatedAt()->format('Y-m-d'), ENT_COMPAT, 'utf-8'); ?> + getAccount()->getCreatedAt()->format('Y-m-d'), ENT_COMPAT, 'utf-8'); ?>
getHtml('LastLogin') ?> - getLastActive()->format('Y-m-d'), ENT_COMPAT, 'utf-8'); ?> + getAccount()->getLastActive()->format('Y-m-d'), ENT_COMPAT, 'utf-8'); ?>
getHtml('Status') ?> - getStatus(), ENT_COMPAT, 'utf-8'); ?> + getAccount()->getStatus(), ENT_COMPAT, 'utf-8'); ?>
@@ -96,7 +96,7 @@ echo $this->getData('nav')->render(); getHtml('Type', 'Media') ?> getHtml('Created', 'Media') ?> - render(), ENT_COMPAT, 'utf-8'); ?> + render(); ?> $value) : $c++; $url = \phpOMS\Uri\UriFactory::build('{/base}/{/lang}/backend/admin/group/settings?{?}&id=' . $value->getId()); ?>