Skip to content

Commit

Permalink
Fix badge markup in the BadgeMenuItemRenderer
Browse files Browse the repository at this point in the history
refs #5543
  • Loading branch information
lippserd committed Sep 27, 2015
1 parent 4c798d4 commit 30ed3ad
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions library/Icinga/Web/Menu/BadgeMenuItemRenderer.php
Expand Up @@ -42,7 +42,7 @@ abstract public function getTitle();
*/
public function render(Menu $menu)
{
return $this->renderBadge() . $this->createLink($menu);
return '<div class="clearfix">' . $this->renderBadge() . $this->createLink($menu) . '</div>';
}

/**
Expand All @@ -53,10 +53,11 @@ public function render(Menu $menu)
protected function renderBadge()
{
if ($count = $this->getCount()) {
$view = $this->getView();
return sprintf(
'<div title="%s" class="badge-container"><span class="badge badge-%s">%s</span></div>',
$this->getView()->escape($this->getTitle()),
$this->getView()->escape($this->getState()),
'<span title="%s" class="badge pull-right state-%s">%s</span>',
$view->escape($this->getTitle()),
$view->escape($this->getState()),
$count
);
}
Expand Down

0 comments on commit 30ed3ad

Please sign in to comment.