ActionController: check view->compact

fixes #2141
This commit is contained in:
Thomas Gelf 2021-07-13 01:00:40 +02:00
parent cc8cbf66f7
commit 44ca8890f2
2 changed files with 3 additions and 1 deletions

View File

@ -47,6 +47,7 @@ next patch release (will be 1.8.1)
* FIX: show Services applied with Rules involving applied Hostgroups (#2313)
* FIX: show "deactivated" services as such also for read-only users (#2344)
* FIX: Overrides for Services belonging to Sets on root Host Templates (#2333)
* FIX: show no header tabs for search result in web 2.8+ (#2141)
### Icinga Configuration
* FIX: rare race condition, where generated config might miss some files (#2351)

View File

@ -216,7 +216,8 @@ abstract class ActionController extends Controller implements ControlsAndContent
$viewRenderer = new SimpleViewRenderer();
$viewRenderer->replaceZendViewRenderer();
$this->view = $viewRenderer->view;
if ($this->getOriginalUrl()->getParam('view') === 'compact') {
// Hint -> $this->view->compact is the only way since v2.8.0
if ($this->view->compact || $this->getOriginalUrl()->getParam('view') === 'compact') {
if ($this->view->controls) {
$this->controls()->getAttributes()->add('style', 'display: none;');
}