lib: Remove UserNavigationItemRenderer

This commit is contained in:
Eric Lippmann 2015-10-22 14:26:53 +02:00
parent d6432cd881
commit e07e16d7a1
2 changed files with 1 additions and 30 deletions

View File

@ -293,10 +293,7 @@ class Web extends EmbeddedWeb
'label' => $this->user->getUsername(),
'icon' => 'user',
'url' => 'preference',
'priority' => 900,
'renderer' => array(
'UserNavigationItemRenderer'
),
'priority' => 900
),
'logout' => array(
'cssClass' => 'user-nav-item',

View File

@ -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>';
}
}