mirror of
https://github.com/Karaka-Management/oms-Profile.git
synced 2026-02-17 07:48:41 +00:00
Improve profile layout
This commit is contained in:
parent
113e03d379
commit
270308822a
|
|
@ -15,6 +15,7 @@ declare(strict_types=1);
|
||||||
namespace Modules\Profile\Models;
|
namespace Modules\Profile\Models;
|
||||||
|
|
||||||
use Modules\Admin\Models\Account;
|
use Modules\Admin\Models\Account;
|
||||||
|
use Modules\Admin\Models\NullAccount;
|
||||||
use Modules\Media\Models\Media;
|
use Modules\Media\Models\Media;
|
||||||
use Modules\Media\Models\NullMedia;
|
use Modules\Media\Models\NullMedia;
|
||||||
|
|
||||||
|
|
@ -78,7 +79,7 @@ class Profile
|
||||||
|
|
||||||
public function getAccount() : Account
|
public function getAccount() : Account
|
||||||
{
|
{
|
||||||
return $this->account;
|
return $this->account ?? new NullAccount();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setBirthday(\DateTime $birthday) /* : void */
|
public function setBirthday(\DateTime $birthday) /* : void */
|
||||||
|
|
|
||||||
|
|
@ -29,13 +29,12 @@ echo $this->getData('nav')->render();
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-md-6">
|
<div class="col-xs-12 col-md-6">
|
||||||
<section itemscope itemtype="http://schema.org/Person" class="box wf-100">
|
<section itemscope itemtype="http://schema.org/Person" class="box wf-100">
|
||||||
<header><h1><?= $this->getHtml('Profile') ?></h1></header>
|
<header><h1><span itemprop="familyName"><?= $this->printHtml($account->getAccount()->getName3()); ?></span>, <span itemprop="givenName"><?= $this->printHtml($account->getAccount()->getName1()); ?></span></h1></header>
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<!-- @formatter:off -->
|
<!-- @formatter:off -->
|
||||||
|
<span class="rf"><img class="m-profile rf" alt="<?= $this->getHtml('ProfileImage'); ?>" src="<?= $account->getImage() instanceof \Modules\Media\Models\NullMedia ? \phpOMS\Uri\UriFactory::build('{/base}/Web/Backend/img/user_default_' . mt_rand(1, 6) .'.png') : \phpOMS\Uri\UriFactory::build('{/base}/' . $account->getImage()->getPath()); ?>">
|
||||||
|
</span>
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<tr>
|
|
||||||
<th><?= $this->getHtml('Name') ?><img class="m-profile" alt="<?= $this->getHtml('ProfileImage'); ?>" src="<?= $account->getImage() instanceof \Modules\Media\Models\NullMedia ? \phpOMS\Uri\UriFactory::build('{/base}/Web/Backend/img/user_default_' . mt_rand(1, 6) .'.png') : \phpOMS\Uri\UriFactory::build('{/base}/' . $account->getImage()->getPath()); ?>">
|
|
||||||
<td><span itemprop="familyName"><?= $this->printHtml($account->getAccount()->getName3()); ?></span>, <span itemprop="givenName"><?= $this->printHtml($account->getAccount()->getName1()); ?></span>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= $this->getHtml('Occupation') ?>
|
<th><?= $this->getHtml('Occupation') ?>
|
||||||
<td itemprop="jobTitle">Sailor
|
<td itemprop="jobTitle">Sailor
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user