ServiceController: show host if any

This commit is contained in:
Thomas Gelf 2016-08-23 13:48:44 +00:00
parent e639790d52
commit 9ccab4c9cf
2 changed files with 13 additions and 1 deletions

View File

@ -80,6 +80,14 @@ class ServiceController extends ObjectController
public function editAction()
{
parent::editAction();
if ($this->host) {
$this->view->subtitle = sprintf(
$this->translate('(on %s)'),
$this->host->object_name
);
}
$object = $this->object;
if ($object->isTemplate()
&& $object->getResolvedProperty('check_command_id')

View File

@ -1,6 +1,10 @@
<div class="controls">
<?= $this->tabs ?>
<h1><?= $this->escape($this->title) ?></h1>
<h1><?= $this->escape($this->title) ?><?php
if ($this->subtitle) {
echo ' <small>' . $this->escape($this->subtitle) . '</small>';
}
?></h1>
<span class="action-links">
<?= $this->actionLinks ?>
<?= $this->render('object/deploymentLink.phtml') ?>