diff options
author | Alex Legler <alex@a3li.li> | 2015-08-15 14:33:26 +0200 |
---|---|---|
committer | Alex Legler <alex@a3li.li> | 2015-08-15 14:33:26 +0200 |
commit | ec7ca3fbb067fcc6b124a22bd382391b095f64dd (patch) | |
tree | ca2ce931f4cdc189b28beb7587c861a894347c8c /TyrianTemplate.php | |
parent | Fix strings (diff) | |
download | skin-tyrian-ec7ca3fbb067fcc6b124a22bd382391b095f64dd.tar.gz skin-tyrian-ec7ca3fbb067fcc6b124a22bd382391b095f64dd.tar.bz2 skin-tyrian-ec7ca3fbb067fcc6b124a22bd382391b095f64dd.zip |
Support for the Echo extension
Diffstat (limited to 'TyrianTemplate.php')
-rw-r--r-- | TyrianTemplate.php | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/TyrianTemplate.php b/TyrianTemplate.php index 5619034..afef668 100644 --- a/TyrianTemplate.php +++ b/TyrianTemplate.php @@ -328,22 +328,38 @@ class TyrianTemplate extends BaseTemplate { /*************************************************************************************************/ function personaltools() { + $personal_tools = $this->getPersonalTools(); + $notification_tool = NULL; + ?> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <span class="glyphicon glyphicon-user" aria-label="<?php $this->msg( 'personaltools' ) ?>"></span> - <?php $this->msg( 'listfiles_user' ) ?> + <?php + if (isset($personal_tools['userpage'])) { + echo $personal_tools['userpage']['links'][0]['text']; + } else { + $this->msg( 'listfiles_user' ); + } ?> <span class="caret"></span> </a> <ul class="dropdown-menu" role="menu"> <?php - foreach ( $this->getPersonalTools() as $key => $item ) { - echo $this->makeListItem( $key, $item ); + foreach ( $personal_tools as $key => $item ) { + if ($key === 'notifications') { + $notification_tool = $item; + } else { + echo $this->makeListItem( $key, $item ); + } } ?> </ul> </li> - <?php + <?php + + if (!is_null($notification_tool)) { + echo $this->makeListItem('notifications', $notification_tool); + } } /*************************************************************************************************/ |