Dashboard: Remove extra top margin when dashboard layout as no title or toolbar (eg. in dashboard pages)

This commit is contained in:
Molkobain
2021-12-04 14:14:11 +01:00
parent 827a108a38
commit 9f0e2c0a3a
2 changed files with 24 additions and 4 deletions

View File

@@ -53,6 +53,15 @@ class DashboardLayout extends UIBlock
return array_merge($this->aDashboardRows, [$this->oToolbar]);
}
/**
* @see static::$sTitle
* @return bool
*/
public function HasTitle(): bool
{
return strlen($this->sTitle) > 0;
}
/**
* @return string
*/
@@ -61,6 +70,15 @@ class DashboardLayout extends UIBlock
return $this->sTitle;
}
/**
* @see static::$oToolbar
* @return bool
*/
public function HasToolbar(): bool
{
return $this->oToolbar->HasSubBlocks();
}
/**
* @return \Combodo\iTop\Application\UI\Base\Layout\UIContentBlock
*/