diff --git a/library/Icinga/Web/Widget/FilterEditor.php b/library/Icinga/Web/Widget/FilterEditor.php index bc82f8939..7f86a9db2 100644 --- a/library/Icinga/Web/Widget/FilterEditor.php +++ b/library/Icinga/Web/Widget/FilterEditor.php @@ -284,8 +284,38 @@ class FilterEditor extends AbstractWidget } } + public function renderSearch() + { + $html = '
'; + + if ($this->filter->isEmpty()) { + $title = t('Filter this list'); + } else { + $title = t('Modify this filter'); + if (! $this->filter->isEmpty()) { + $title .= ': ' . $this->filter; + } + } + return $html + . '' + . '' + . ''; + } + public function render() { + if (! $this->url()->getParam('modifyFilter')) { + return $this->renderSearch() . $this->shorten($this->filter, 50); + } + return '