Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #5543
- Loading branch information
Showing
4 changed files
with
49 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
library/Icinga/Web/Navigation/Renderer/LogoutNavigationItemRenderer.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */ | ||
|
||
namespace Icinga\Web\Navigation\Renderer; | ||
|
||
use Icinga\Web\Navigation\NavigationItem; | ||
|
||
class LogoutNavigationItemRenderer extends NavigationItemRenderer | ||
{ | ||
public function render(NavigationItem $item = null) | ||
{ | ||
return '<div class="user-nav-item">' . parent::render($item) . '</div>'; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
library/Icinga/Web/Navigation/Renderer/UserNavigationItemRenderer.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?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() | ||
{ | ||
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="user-nav-item clearfix">' . $this->getAvatar() . parent::render($item) . '</div>'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,3 +143,8 @@ a.button { | |
.bg-color-critical(); | ||
} | ||
} | ||
|
||
.user-avatar { | ||
height: 16px; | ||
width: 16px; | ||
} |