From 98f1e9028e93bd9c095bcb37924dbd0d1c46f091 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 28 Sep 2015 16:40:16 +0200 Subject: [PATCH] Fix user menu CSS classes refs #5543 --- library/Icinga/Application/Web.php | 6 ++++-- .../Navigation/Renderer/LogoutNavigationItemRenderer.php | 2 +- .../Web/Navigation/Renderer/UserNavigationItemRenderer.php | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/library/Icinga/Application/Web.php b/library/Icinga/Application/Web.php index 2ca73c63a..f1c1da53c 100644 --- a/library/Icinga/Application/Web.php +++ b/library/Icinga/Application/Web.php @@ -309,6 +309,7 @@ class Web extends EmbeddedWeb 'priority' => 920 ) ), + 'cssClass' => 'user-nav-item', 'label' => $this->user->getUsername(), 'url' => 'account', 'priority' => 900, @@ -317,13 +318,14 @@ class Web extends EmbeddedWeb ), ), 'logout' => array( + 'cssClass' => 'user-nav-item', 'label' => t('Logout'), - 'url' => 'authentication/logout', 'priority' => 990, 'renderer' => array( 'LogoutNavigationItemRenderer', 'target' => '_self' - ) + ), + 'url' => 'authentication/logout' ) ); diff --git a/library/Icinga/Web/Navigation/Renderer/LogoutNavigationItemRenderer.php b/library/Icinga/Web/Navigation/Renderer/LogoutNavigationItemRenderer.php index 3f92d929e..1dad7c434 100644 --- a/library/Icinga/Web/Navigation/Renderer/LogoutNavigationItemRenderer.php +++ b/library/Icinga/Web/Navigation/Renderer/LogoutNavigationItemRenderer.php @@ -9,6 +9,6 @@ class LogoutNavigationItemRenderer extends NavigationItemRenderer { public function render(NavigationItem $item = null) { - return '
' . parent::render($item) . '
'; + return parent::render($item); } } diff --git a/library/Icinga/Web/Navigation/Renderer/UserNavigationItemRenderer.php b/library/Icinga/Web/Navigation/Renderer/UserNavigationItemRenderer.php index 36cfd0709..4566cc774 100644 --- a/library/Icinga/Web/Navigation/Renderer/UserNavigationItemRenderer.php +++ b/library/Icinga/Web/Navigation/Renderer/UserNavigationItemRenderer.php @@ -17,6 +17,6 @@ class UserNavigationItemRenderer extends NavigationItemRenderer public function render(NavigationItem $item = null) { - return '
' . $this->getAvatar() . parent::render($item) . '
'; + return '
' . $this->getAvatar() . parent::render($item) . '
'; } }