Skip to content

Commit

Permalink
lib: Fix navigation usage in the limiter widget
Browse files Browse the repository at this point in the history
refs #5543
  • Loading branch information
lippserd committed Sep 27, 2015
1 parent d79a160 commit a9f0aa6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions library/Icinga/Web/Widget/Limiter.php
Expand Up @@ -80,7 +80,7 @@ public function render()
$navigation = new Navigation();
$navigation->setLayout(Navigation::LAYOUT_TABS);
foreach (static::$limits as $limit => $label) {
$navigationItem = new NavigationItem();
$navigationItem = new NavigationItem($limit);
$navigationItem
->setActive($activeLimit === $limit)
->setAttribute(
Expand All @@ -90,17 +90,15 @@ public function render()
$limit
)
)
->setId($limit)
->setLabel($label)
->setUrl($url->with(array('limit' => $limit)));
$navigation->addItem($navigationItem);
}
if ($activeLimit === 0) {
$navigationItem = new NavigationItem();
$navigationItem = new NavigationItem(0);
$navigationItem
->setActive(true)
->setAttribute('title', t('Show all items on this page'))
->setId(0)
->setLabel(t('all'));
$navigation->addItem($navigationItem);
}
Expand Down

0 comments on commit a9f0aa6

Please sign in to comment.