diff --git a/application/controllers/DashboardsController.php b/application/controllers/DashboardsController.php index 13109cafb..a87e3a853 100644 --- a/application/controllers/DashboardsController.php +++ b/application/controllers/DashboardsController.php @@ -24,6 +24,11 @@ use ipl\Web\Url; use ipl\Web\Widget\Icon; use ipl\Web\Widget\Link; +/** + * Handles all kind of dashboard request actions + * + * See {@see Dashboard} for more information about dashboards + */ class DashboardsController extends CompatController { /** @var Dashboard */ @@ -55,7 +60,7 @@ class DashboardsController extends CompatController })->handleRequest($this->getServerRequest()); $this->content->getAttributes()->add('class', 'welcome-view'); - $this->dashboard->setWelcomeForm($welcomeForm); + $this->dashboard->addHtml($welcomeForm); } else { $pane = $this->getParam('pane'); if (! $pane) { diff --git a/library/Icinga/Web/Dashboard/Dashboard.php b/library/Icinga/Web/Dashboard/Dashboard.php index 26cb62321..ea670991d 100644 --- a/library/Icinga/Web/Dashboard/Dashboard.php +++ b/library/Icinga/Web/Dashboard/Dashboard.php @@ -10,7 +10,6 @@ use Icinga\Web\Dashboard\Common\DashboardEntries; use Icinga\Web\Dashboard\Common\DashboardEntry; use Icinga\Web\Dashboard\Common\DashboardManager; use ipl\Html\BaseHtmlElement; -use ipl\Html\Form; use ipl\Html\HtmlElement; use ipl\Web\Url; use ipl\Web\Widget\Tabs; @@ -84,13 +83,6 @@ class Dashboard extends BaseHtmlElement implements DashboardEntry */ private $tabParam = 'pane'; - /** - * A welcome form rendered when there is no dashboard panes - * - * @var Form - */ - private $welcomeForm; - /** * Set the given tab name as active * @@ -219,13 +211,6 @@ class Dashboard extends BaseHtmlElement implements DashboardEntry throw new ConfigurationError('Could not determine active pane'); } - public function setWelcomeForm(Form $form) - { - $this->welcomeForm = $form; - - return $this; - } - protected function assemble() { $activeHome = $this->getActiveHome(); @@ -250,8 +235,6 @@ class Dashboard extends BaseHtmlElement implements DashboardEntry . ' You will always be able to edit them afterwards.' ); $this->addHtml(HtmlElement::create('p', null, $message)); - - $this->addHtml($this->welcomeForm); } elseif (! $activeHome->hasEntries()) { $this->addHtml(HtmlElement::create('h1', null, t('No dashboard added to this dashboard home.'))); } else {