From 53a9624db6e655a6b66c87b8c5145a17c9fb06ef Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 20 Jul 2017 17:00:03 +0200 Subject: [PATCH] Service: links, actions --- application/controllers/ServiceController.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/application/controllers/ServiceController.php b/application/controllers/ServiceController.php index 7d69d935..9e3efe5a 100644 --- a/application/controllers/ServiceController.php +++ b/application/controllers/ServiceController.php @@ -8,6 +8,7 @@ use Icinga\Module\Director\Web\Controller\ObjectController; use Icinga\Module\Director\Objects\IcingaServiceSet; use Icinga\Module\Director\Objects\IcingaService; use Icinga\Module\Director\Objects\IcingaHost; +use ipl\Html\Link; class ServiceController extends ObjectController { @@ -110,19 +111,18 @@ class ServiceController extends ObjectController /** @var IcingaService $object */ $object = $this->object; + $this->addTitle($object->getObjectName()); if ($this->host) { - $this->view->actionLinks = $this->view->qlink( + $this->actions()->add(Link::create( $this->translate('back'), 'director/host/services', - array('name' => $this->host->object_name), - array('class' => 'icon-left-big') - ); + ['name' => $this->host->getObjectName()], + ['class' => 'icon-left-big'] + )); } - $form = $this - ->loadForm('icingaService') - ->setDb($this->db()); + $form = IcingaServiceForm::load()->setDb($this->db()); if ($this->host && $object->usesVarOverrides()) { $fake = IcingaService::create(array( @@ -142,7 +142,6 @@ class ServiceController extends ObjectController $form->handleRequest(); $this->actions()->add($this->createCloneLink()); - $this->view->title = $object->object_name; if ($this->host) { $this->view->subtitle = sprintf( $this->translate('(on %s)'),