Skip to content

Commit

Permalink
Tab: Use the title as caption if there is no label set yet
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Meyer committed Mar 11, 2015
1 parent 4a5e6bf commit ba0154a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion library/Icinga/Web/Widget/Tab.php
Expand Up @@ -140,6 +140,10 @@ public function setLabel($label)
*/
public function getLabel()
{
if (! $this->label) {
return $this->title;
}

return $this->label;
}

Expand Down Expand Up @@ -238,7 +242,7 @@ public function render()
$classes[] = 'active';
}

$caption = $view->escape($this->label);
$caption = $view->escape($this->getLabel());
$tagParams = $this->tagParams;

if ($this->title) {
Expand Down

0 comments on commit ba0154a

Please sign in to comment.