hide map menu button if no map is set for the Seminary
This commit is contained in:
parent
1f1d91850e
commit
36cb0180cf
2 changed files with 13 additions and 1 deletions
|
@ -20,6 +20,12 @@
|
|||
*/
|
||||
class SeminarymenuController extends \hhu\z\Controller
|
||||
{
|
||||
/**
|
||||
* Required models
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $models = array('map');
|
||||
|
||||
|
||||
|
||||
|
@ -46,6 +52,12 @@
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
// Get map of Seminary
|
||||
$map = $this->Map->getMapOfSeminary(\hhu\z\controllers\SeminaryController::$seminary['id']);
|
||||
|
||||
|
||||
// Pass data to view
|
||||
$this->set('map', $map);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
<li><a href="<?=$linker->link(array('charactergroups','index',$loggedSeminary['url']))?>"><i class="fa fa-users fa-fw"></i><?=_('Character Groups')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('achievements','index',$loggedSeminary['url']))?>"><i class="fa fa-trophy fa-fw"></i><?=_('Achievements')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('library','index',$loggedSeminary['url']))?>"><i class="fa fa-book fa-fw"></i><?=_('Library')?></a></li>
|
||||
<li><a href="<?=$linker->link(array('map','index',$loggedSeminary['url']))?>"><i class="fa fa-map-marker fa-fw"></i><?=_('Map')?></a></li>
|
||||
<?php if(!is_null($map)) : ?><li><a href="<?=$linker->link(array('map','index',$loggedSeminary['url']))?>"><i class="fa fa-map-marker fa-fw"></i><?=_('Map')?></a></li><?php endif ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
|
|
Loading…
Add table
Reference in a new issue