mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
lib: Remove UserNavigationItemRenderer
This commit is contained in:
parent
d6432cd881
commit
e07e16d7a1
@ -293,10 +293,7 @@ class Web extends EmbeddedWeb
|
|||||||
'label' => $this->user->getUsername(),
|
'label' => $this->user->getUsername(),
|
||||||
'icon' => 'user',
|
'icon' => 'user',
|
||||||
'url' => 'preference',
|
'url' => 'preference',
|
||||||
'priority' => 900,
|
'priority' => 900
|
||||||
'renderer' => array(
|
|
||||||
'UserNavigationItemRenderer'
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
'logout' => array(
|
'logout' => array(
|
||||||
'cssClass' => 'user-nav-item',
|
'cssClass' => 'user-nav-item',
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
|
||||||
|
|
||||||
namespace Icinga\Web\Navigation\Renderer;
|
|
||||||
|
|
||||||
use Icinga\Web\Navigation\NavigationItem;
|
|
||||||
|
|
||||||
class UserNavigationItemRenderer extends NavigationItemRenderer
|
|
||||||
{
|
|
||||||
public function getAvatar()
|
|
||||||
{
|
|
||||||
// Temporarily disabled as of layout issues. Should be fixed once
|
|
||||||
// we have avatars
|
|
||||||
return '';
|
|
||||||
|
|
||||||
return '<img class="pull-left user-avatar"
|
|
||||||
src="/icingaweb2/static/gravatar?email=icinga%40localhost"
|
|
||||||
alt="Avatar"
|
|
||||||
aria-hidden="true">';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function render(NavigationItem $item = null)
|
|
||||||
{
|
|
||||||
return '<div class="clearfix">' . $this->getAvatar() . parent::render($item) . '</div>';
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user