From e93d626d09a73af9e3fdbbc7f7f2cf952f2c7d9d Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 22 Nov 2016 15:28:37 +0100 Subject: [PATCH] Controller, css: add action bar --- library/Businessprocess/Controller.php | 14 ++++++++++---- public/css/module.less | 8 ++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/library/Businessprocess/Controller.php b/library/Businessprocess/Controller.php index 8c0023c..070adbb 100644 --- a/library/Businessprocess/Controller.php +++ b/library/Businessprocess/Controller.php @@ -2,17 +2,14 @@ namespace Icinga\Module\Businessprocess; -use Exception; use Icinga\Application\Icinga; use Icinga\Module\Businessprocess\BusinessProcess; -use Icinga\Module\Businessprocess\Form\ProcessForm; -use Icinga\Module\Businessprocess\Form\SimulationForm; use Icinga\Module\Businessprocess\Storage\LegacyStorage; +use Icinga\Module\Businessprocess\Web\Component\ActionBar; use Icinga\Module\Monitoring\Backend; use Icinga\Web\Controller as ModuleController; use Icinga\Web\Notification; use Icinga\Module\Businessprocess\Web\Form\FormLoader; -use Icinga\Web\Url; use Icinga\Web\Widget; class Controller extends ModuleController @@ -46,6 +43,15 @@ class Controller extends ModuleController return $this->url; } + protected function actions() + { + if ($this->view->actions === null) { + $this->view->actions = ActionBar::create(); + } + + return $this->view->actions; + } + protected function tabs() { if ($this->view->tabs === null) { diff --git a/public/css/module.less b/public/css/module.less index 3ef8fc1..a49ecdc 100644 --- a/public/css/module.less +++ b/public/css/module.less @@ -28,6 +28,14 @@ display: inline; } +.action-bar a { + color: @icinga-blue; + &:hover::before { + text-decoration: none; + } + margin-right: 1em; +} + h1 a:focus { outline: none; }