aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2015-08-15 14:33:26 +0200
committerAlex Legler <alex@a3li.li>2015-08-15 14:33:26 +0200
commitec7ca3fbb067fcc6b124a22bd382391b095f64dd (patch)
treeca2ce931f4cdc189b28beb7587c861a894347c8c /TyrianTemplate.php
parentFix strings (diff)
downloadskin-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.php24
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);
+ }
}
/*************************************************************************************************/