do not try to render Seminarybar if no Seminary is present
This commit is contained in:
parent
d1a7fb2761
commit
f10e10e6a7
2 changed files with 9 additions and 3 deletions
|
|
@ -35,12 +35,14 @@
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
if(is_null(SeminaryController::$seminary)) {
|
||||
return;
|
||||
}
|
||||
// Do not render at first
|
||||
$this->set('render', false);
|
||||
|
||||
// Get Seminary
|
||||
$seminary = SeminaryController::$seminary;
|
||||
if(is_null($seminary)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get Character
|
||||
$character = SeminaryController::$character;
|
||||
|
|
@ -79,6 +81,8 @@
|
|||
$this->set('lastQuest', $lastQuest);
|
||||
$this->set('lastAchievement', $lastAchievement);
|
||||
$this->set('characterGroups', $characterGroups);
|
||||
// Render now
|
||||
$this->set('render', true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<?php if($render) : ?>
|
||||
<section class="cf">
|
||||
<h1><?=$character['name']?></h1>
|
||||
<img src="<?=$linker->link(array('media','avatar',$seminary['url'],$character['charactertype_url'],$character['xplevel']['level']))?>" class="char">
|
||||
|
|
@ -46,3 +47,4 @@
|
|||
<p><i class="fa fa-users fa-fw"></i><a href="<?=$linker->link(array('charactergroups','group',$seminary['url'],$group['charactergroupsgroup_url'],$group['url']))?>"><?=sprintf(_('Show %s-Profile'),$group['charactergroupsgroup_name'])?></a></p>
|
||||
<?php endforeach ?>
|
||||
</section>
|
||||
<?php endif ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue